@jakende/media-info-cli 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -500,10 +500,24 @@ def _print_progress(message: str) -> None:
500
500
 
501
501
  class SpinnerProgress:
502
502
  frames = (
503
- "[#####-----]",
504
- "[--#####---]",
505
- "[----#####-]",
506
- "[---#####--]",
503
+ "[>---------]",
504
+ "[->--------]",
505
+ "[-->-------]",
506
+ "[--->------]",
507
+ "[---->-----]",
508
+ "[----->----]",
509
+ "[------>---]",
510
+ "[------->--]",
511
+ "[-------->-]",
512
+ "[--------->]",
513
+ "[--------<-]",
514
+ "[-------<--]",
515
+ "[------<---]",
516
+ "[-----<----]",
517
+ "[----<-----]",
518
+ "[---<------]",
519
+ "[--<-------]",
520
+ "[-<--------]",
507
521
  )
508
522
  active_prefixes = (
509
523
  "Downloading:",
@@ -572,13 +586,15 @@ class SpinnerProgress:
572
586
  frame = self.frames[self._frame_index % len(self.frames)]
573
587
  self._frame_index += 1
574
588
  self._render_active(message, frame=frame)
575
- self._stop_event.wait(0.18)
589
+ self._stop_event.wait(0.10)
576
590
 
577
591
  def _render_active(self, message: str, frame: str | None = None) -> None:
578
592
  frame = frame or self.frames[self._frame_index % len(self.frames)]
579
593
  phase = self._active_phase(message)
580
- _viewport_line(0, f"WORKING {frame} {phase}", Style.bold + Style.cyan)
581
- _viewport_line(1, message, Style.cyan)
594
+ label = self._active_label(phase)
595
+ detail = self._active_detail(message)
596
+ _viewport_line(0, f"{label:<18} {frame} {phase}", Style.bold + Style.cyan)
597
+ _viewport_line(1, detail, Style.cyan)
582
598
 
583
599
  def _append_log(self, message: str) -> None:
584
600
  self._log_messages.append(message)
@@ -601,6 +617,23 @@ class SpinnerProgress:
601
617
  stripped = message.split("] ", maxsplit=1)[-1]
602
618
  return stripped.split(":", maxsplit=1)[0].upper()
603
619
 
620
+ @staticmethod
621
+ def _active_detail(message: str) -> str:
622
+ stripped = message.split("] ", maxsplit=1)[-1]
623
+ if ":" not in stripped:
624
+ return message
625
+ phase, detail = stripped.split(":", maxsplit=1)
626
+ return f"{phase.strip()}: {detail.strip()}"
627
+
628
+ @staticmethod
629
+ def _active_label(phase: str) -> str:
630
+ labels = {
631
+ "DOWNLOADING": "TUNING IN",
632
+ "CONVERTING TO MP3": "MIXING AUDIO",
633
+ "TRANSCRIBING": "WRITING WORDS",
634
+ }
635
+ return labels.get(phase, "WORKING")
636
+
604
637
  @staticmethod
605
638
  def _format_log_message(message: str) -> str:
606
639
  if message.startswith("ERROR:"):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jakende/media-info-cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Terminal app for downloading media from YouTube or RSS feeds, converting to MP3, and generating Whisper transcripts.",
5
5
  "license": "MIT",
6
6
  "bin": {
package/pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "media-information-download"
7
- version = "0.1.4"
7
+ version = "0.1.5"
8
8
  description = "Terminal app for downloading media from YouTube or RSS feeds, converting to MP3, and generating Whisper transcripts."
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }