talklib 3.3.1__tar.gz → 3.4.1__tar.gz
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.
- {talklib-3.3.1/src/talklib.egg-info → talklib-3.4.1}/PKG-INFO +1 -1
- {talklib-3.3.1 → talklib-3.4.1}/pyproject.toml +1 -1
- {talklib-3.3.1 → talklib-3.4.1}/src/talklib/pod.py +18 -1
- {talklib-3.3.1 → talklib-3.4.1/src/talklib.egg-info}/PKG-INFO +1 -1
- {talklib-3.3.1 → talklib-3.4.1}/LICENSE.txt +0 -0
- {talklib-3.3.1 → talklib-3.4.1}/README.md +0 -0
- {talklib-3.3.1 → talklib-3.4.1}/requirements.txt +0 -0
- {talklib-3.3.1 → talklib-3.4.1}/setup.cfg +0 -0
- {talklib-3.3.1 → talklib-3.4.1}/src/talklib/__init__.py +0 -0
- {talklib-3.3.1 → talklib-3.4.1}/src/talklib/cli.py +0 -0
- {talklib-3.3.1 → talklib-3.4.1}/src/talklib/ev.py +0 -0
- {talklib-3.3.1 → talklib-3.4.1}/src/talklib/ffmpeg.py +0 -0
- {talklib-3.3.1 → talklib-3.4.1}/src/talklib/notify.py +0 -0
- {talklib-3.3.1 → talklib-3.4.1}/src/talklib/show.py +0 -0
- {talklib-3.3.1 → talklib-3.4.1}/src/talklib/utils.py +0 -0
- {talklib-3.3.1 → talklib-3.4.1}/src/talklib.egg-info/SOURCES.txt +0 -0
- {talklib-3.3.1 → talklib-3.4.1}/src/talklib.egg-info/dependency_links.txt +0 -0
- {talklib-3.3.1 → talklib-3.4.1}/src/talklib.egg-info/entry_points.txt +0 -0
- {talklib-3.3.1 → talklib-3.4.1}/src/talklib.egg-info/requires.txt +0 -0
- {talklib-3.3.1 → talklib-3.4.1}/src/talklib.egg-info/top_level.txt +0 -0
|
@@ -360,6 +360,8 @@ class TLPod(BaseModel):
|
|
|
360
360
|
bucket_folder: str = Field(default=None)
|
|
361
361
|
max_episodes_in_feed: int = Field(ge=1, default=5)
|
|
362
362
|
override_filename: bool = False
|
|
363
|
+
short_timestamp: bool = False
|
|
364
|
+
preroll: bool = True
|
|
363
365
|
audio_folders:list = EV().destinations
|
|
364
366
|
notifications: Type[Notifications] = Notifications()
|
|
365
367
|
episode: Type[Episode] = Episode()
|
|
@@ -381,7 +383,10 @@ class TLPod(BaseModel):
|
|
|
381
383
|
prefix = f"{self.display_name} (podcast)"
|
|
382
384
|
Notifications.prefix = prefix
|
|
383
385
|
|
|
384
|
-
|
|
386
|
+
if self.short_timestamp:
|
|
387
|
+
self.display_name = f"{self.display_name} ({self.short_timestamp_for_display_name()})"
|
|
388
|
+
else:
|
|
389
|
+
self.display_name = f"{self.display_name} ({datetime.now().strftime('%a, %d %b')})"
|
|
385
390
|
|
|
386
391
|
return self
|
|
387
392
|
|
|
@@ -396,6 +401,15 @@ class TLPod(BaseModel):
|
|
|
396
401
|
# raise e
|
|
397
402
|
|
|
398
403
|
# return self
|
|
404
|
+
def short_timestamp_for_display_name(self):
|
|
405
|
+
day_of_week: str = datetime.now().strftime("%A") # Weekday as locale’s full name.
|
|
406
|
+
hour: str = datetime.now().strftime('%I') # Hour (12-hour clock) as a zero-padded decimal number.
|
|
407
|
+
ampm: str = datetime.now().strftime("%p") # Locale’s equivalent of either AM or PM.
|
|
408
|
+
|
|
409
|
+
if hour == "00":
|
|
410
|
+
hour = "12"
|
|
411
|
+
|
|
412
|
+
return f"{day_of_week} {hour}{ampm}"
|
|
399
413
|
|
|
400
414
|
def get_filename_to_match(self) -> str:
|
|
401
415
|
if self.override_filename:
|
|
@@ -472,6 +486,9 @@ class TLPod(BaseModel):
|
|
|
472
486
|
raise ffmpeg_exception
|
|
473
487
|
|
|
474
488
|
def concat(self, preroll:str, program_audio: str, output_filename: str):
|
|
489
|
+
if not self.preroll:
|
|
490
|
+
os.rename(program_audio, output_filename)
|
|
491
|
+
return output_filename
|
|
475
492
|
self.notifications.prep_syslog(message="concatenating preroll and program audio together...")
|
|
476
493
|
subprocess.run(f'ffmpeg -hide_banner -loglevel quiet -i "concat:{preroll}|{program_audio}" -c copy {output_filename}')
|
|
477
494
|
self.notifications.prep_syslog(message=f"files successfully concatenated as: {output_filename}")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|