talklib 3.7.2__tar.gz → 3.7.4__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.7.2/src/talklib.egg-info → talklib-3.7.4}/PKG-INFO +2 -2
- {talklib-3.7.2 → talklib-3.7.4}/pyproject.toml +2 -2
- {talklib-3.7.2 → talklib-3.7.4}/src/talklib/show.py +9 -25
- {talklib-3.7.2 → talklib-3.7.4/src/talklib.egg-info}/PKG-INFO +2 -2
- {talklib-3.7.2 → talklib-3.7.4}/LICENSE.txt +0 -0
- {talklib-3.7.2 → talklib-3.7.4}/README.md +0 -0
- {talklib-3.7.2 → talklib-3.7.4}/requirements.txt +0 -0
- {talklib-3.7.2 → talklib-3.7.4}/setup.cfg +0 -0
- {talklib-3.7.2 → talklib-3.7.4}/src/talklib/__init__.py +0 -0
- {talklib-3.7.2 → talklib-3.7.4}/src/talklib/cli.py +0 -0
- {talklib-3.7.2 → talklib-3.7.4}/src/talklib/ev.py +0 -0
- {talklib-3.7.2 → talklib-3.7.4}/src/talklib/ffmpeg.py +0 -0
- {talklib-3.7.2 → talklib-3.7.4}/src/talklib/notify.py +0 -0
- {talklib-3.7.2 → talklib-3.7.4}/src/talklib/pod.py +0 -0
- {talklib-3.7.2 → talklib-3.7.4}/src/talklib/utils.py +0 -0
- {talklib-3.7.2 → talklib-3.7.4}/src/talklib.egg-info/SOURCES.txt +0 -0
- {talklib-3.7.2 → talklib-3.7.4}/src/talklib.egg-info/dependency_links.txt +0 -0
- {talklib-3.7.2 → talklib-3.7.4}/src/talklib.egg-info/entry_points.txt +0 -0
- {talklib-3.7.2 → talklib-3.7.4}/src/talklib.egg-info/requires.txt +0 -0
- {talklib-3.7.2 → talklib-3.7.4}/src/talklib.egg-info/top_level.txt +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: talklib
|
|
3
|
-
Version: 3.7.
|
|
3
|
+
Version: 3.7.4
|
|
4
4
|
Summary: A package to automate processing of shows/segments airing on the TL
|
|
5
5
|
Author-email: Ben Weddle <ben.weddle@gmail.com>
|
|
6
6
|
Maintainer-email: Ben Weddle <ben.weddle@gmail.com>
|
|
7
7
|
License-Expression: MIT-open-group
|
|
8
8
|
Project-URL: Repository, https://github.com/talkinglibrary/talklib
|
|
9
9
|
Project-URL: Issues, https://github.com/talkinglibrary/talklib/issues
|
|
10
|
-
Requires-Python: >=3.
|
|
10
|
+
Requires-Python: >=3.12
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE.txt
|
|
13
13
|
Requires-Dist: aiohappyeyeballs==2.6.1
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "talklib"
|
|
3
|
-
version = "3.7.
|
|
3
|
+
version = "3.7.4"
|
|
4
4
|
description = "A package to automate processing of shows/segments airing on the TL"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT-open-group"
|
|
7
7
|
license-files = ["LICENSE.txt"]
|
|
8
8
|
authors = [{name = "Ben Weddle", email = "ben.weddle@gmail.com"}]
|
|
9
9
|
maintainers = [{name = "Ben Weddle", email = "ben.weddle@gmail.com"}]
|
|
10
|
-
requires-python = ">=3.
|
|
10
|
+
requires-python = ">=3.12"
|
|
11
11
|
dynamic = ["dependencies"]
|
|
12
12
|
[tool.setuptools.dynamic]
|
|
13
13
|
dependencies = {file = ["requirements.txt"]}
|
|
@@ -75,7 +75,7 @@ class TLShow(BaseModel):
|
|
|
75
75
|
self.__prep_syslog(message=f'FFmpeg commands: {ffmpeg_commands}')
|
|
76
76
|
try:
|
|
77
77
|
file = ffmpeg.convert()
|
|
78
|
-
self.__prep_syslog(message=
|
|
78
|
+
self.__prep_syslog(message=f"file converted successfully, named: {file}")
|
|
79
79
|
return file
|
|
80
80
|
except ffmpeg_error as e:
|
|
81
81
|
error: str = e.stderr.decode('utf-8')
|
|
@@ -158,7 +158,7 @@ class TLShow(BaseModel):
|
|
|
158
158
|
downloaded_file.write(a.content)
|
|
159
159
|
downloaded_file.close()
|
|
160
160
|
|
|
161
|
-
self.__prep_syslog(message=f'File downloaded
|
|
161
|
+
self.__prep_syslog(message=f'File downloaded: {os.getcwd()}/{input_file}')
|
|
162
162
|
return downloaded_file.name
|
|
163
163
|
except Exception as e:
|
|
164
164
|
to_send: str = f"Unable to download the file from: {download_URL}: {e}. Exiting automation!"
|
|
@@ -224,22 +224,17 @@ It looks like the downloaded file is empty. Please check manually! Yesterday's f
|
|
|
224
224
|
def __check_file_transferred(self, fileToCheck):
|
|
225
225
|
'''check if file transferred to destination(s)'''
|
|
226
226
|
numberOfDestinations = len(self.destinations) - 1
|
|
227
|
-
success = False
|
|
228
227
|
while numberOfDestinations >= 0:
|
|
229
228
|
if os.path.isfile(f'{self.destinations[numberOfDestinations]}/{fileToCheck}'):
|
|
230
229
|
numberOfDestinations = numberOfDestinations-1
|
|
231
230
|
self.__prep_syslog(message=f'{fileToCheck} arrived at {self.destinations[numberOfDestinations]}')
|
|
232
|
-
success = True
|
|
233
231
|
else:
|
|
234
232
|
toSend = (f"There was a problem with {self.show}.\n\n\
|
|
235
|
-
It looks like the file either wasn't converted or didn't transfer correctly. \
|
|
233
|
+
It looks like the file either wasn't converted or didn't transfer correctly to {self.destinations[numberOfDestinations]}. \
|
|
236
234
|
Please check manually!\n\n\
|
|
237
235
|
{get_timestamp()}")
|
|
238
236
|
self.__send_notifications(message=toSend, subject='Error')
|
|
239
237
|
raise FileNotFoundError (toSend)
|
|
240
|
-
|
|
241
|
-
if success:
|
|
242
|
-
self.__countdown()
|
|
243
238
|
|
|
244
239
|
def __check_length(self, fileToCheck):
|
|
245
240
|
'''
|
|
@@ -343,26 +338,12 @@ There is no 'enclosure' tag for the item. Here's the error: {AE}\n\n{get_timesta
|
|
|
343
338
|
count = count+1
|
|
344
339
|
return feed_updated
|
|
345
340
|
|
|
346
|
-
def
|
|
347
|
-
|
|
348
|
-
the reason for this is to give a visual cue to the user
|
|
349
|
-
that the script has finished and is about to exit.
|
|
350
|
-
Otherwise, the user does not know what happened; they
|
|
351
|
-
just see the screen disappear.
|
|
352
|
-
'''
|
|
353
|
-
clear_screen()
|
|
354
|
-
to_send = 'All Done.'
|
|
355
|
-
self.__prep_syslog(message=to_send)
|
|
356
|
-
print(f'{to_send}\n')
|
|
357
|
-
number = 5
|
|
358
|
-
i = 0
|
|
359
|
-
while i < number:
|
|
360
|
-
print(f'This window will close in {number} seconds...', end='\r')
|
|
361
|
-
number = number-1
|
|
362
|
-
time.sleep(1)
|
|
341
|
+
def __all_done_syslog(self):
|
|
342
|
+
self.__prep_syslog(message="Automation finished successfully! Exiting...")
|
|
363
343
|
|
|
364
344
|
def check_ffmpeg_installed(self):
|
|
365
345
|
ffmpeg = shutil.which("ffmpeg")
|
|
346
|
+
self.__prep_syslog(message=f"FFmpeg is installed: {ffmpeg}")
|
|
366
347
|
if not ffmpeg:
|
|
367
348
|
to_send: str = f"It looks like FFmpeg is either not installed on this computer ({socket.gethostname()}), \
|
|
368
349
|
or it isn't added to the PATH. You cannot use the talklib package without FFmpeg."
|
|
@@ -406,6 +387,7 @@ or it isn't added to the PATH. You cannot use the talklib package without FFmpeg
|
|
|
406
387
|
self.__remove(fileToDelete=downloaded_file)
|
|
407
388
|
self.__copy_then_remove(fileToCopy=output_file)
|
|
408
389
|
self.__check_file_transferred(fileToCheck=output_file)
|
|
390
|
+
self.__all_done_syslog()
|
|
409
391
|
|
|
410
392
|
def __run_URL_RSS(self):
|
|
411
393
|
if self.__check_feed_loop():
|
|
@@ -417,6 +399,7 @@ or it isn't added to the PATH. You cannot use the talklib package without FFmpeg
|
|
|
417
399
|
self.__remove(fileToDelete=downloaded_file)
|
|
418
400
|
self.__copy_then_remove(fileToCopy=output_file)
|
|
419
401
|
self.__check_file_transferred(fileToCheck=output_file)
|
|
402
|
+
self.__all_done_syslog()
|
|
420
403
|
else:
|
|
421
404
|
toSend = (
|
|
422
405
|
f"There was a problem with {self.show}.\n\n\
|
|
@@ -434,6 +417,7 @@ It looks like today's file hasn't yet been posted. Please check and download man
|
|
|
434
417
|
self.__remove(fileToDelete=self.local_file)
|
|
435
418
|
self.__copy_then_remove(fileToCopy=output_file)
|
|
436
419
|
self.__check_file_transferred(fileToCheck=output_file)
|
|
420
|
+
self.__all_done_syslog()
|
|
437
421
|
else:
|
|
438
422
|
to_send = (
|
|
439
423
|
f"There was a problem with {self.show}.\n\n\
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: talklib
|
|
3
|
-
Version: 3.7.
|
|
3
|
+
Version: 3.7.4
|
|
4
4
|
Summary: A package to automate processing of shows/segments airing on the TL
|
|
5
5
|
Author-email: Ben Weddle <ben.weddle@gmail.com>
|
|
6
6
|
Maintainer-email: Ben Weddle <ben.weddle@gmail.com>
|
|
7
7
|
License-Expression: MIT-open-group
|
|
8
8
|
Project-URL: Repository, https://github.com/talkinglibrary/talklib
|
|
9
9
|
Project-URL: Issues, https://github.com/talkinglibrary/talklib/issues
|
|
10
|
-
Requires-Python: >=3.
|
|
10
|
+
Requires-Python: >=3.12
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE.txt
|
|
13
13
|
Requires-Dist: aiohappyeyeballs==2.6.1
|
|
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
|