talklib 3.7.1__tar.gz → 3.7.3__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.
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: talklib
3
- Version: 3.7.1
3
+ Version: 3.7.3
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
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
@@ -119,12 +119,12 @@ To repeat, **this package will not work without FFmpeg and FFprobe**.
119
119
 
120
120
  FFmpeg and FFprobe should be two separate binaries.
121
121
 
122
- The easiest way to install FFmpeg (and FFprobe) on Windows is with WinGet:
122
+ The easiest way to install FFmpeg (and FFprobe) on Windows is with WinGet (you may need to run this in a terminal with Admin privileges):
123
123
  ````bash
124
124
  winget install Gyan.FFmpeg
125
125
  ````
126
126
 
127
- This should install both FFmpeg & FFprobe. After WinGet completes installation, test to ensure FFmpeg is installed:
127
+ This should install both FFmpeg & FFprobe. After WinGet completes installation, restart your terminal and then test to ensure FFmpeg is installed:
128
128
  ````bash
129
129
  ffmpeg -version
130
130
  ````
@@ -169,7 +169,7 @@ Before we begin, a general note:
169
169
  - These are some of the reasons why we do not run `.py` files directly from WR.
170
170
  - Instead, we tell WR to run a Batch script (`.bat` file) which in turn will automatically run the Python script (`.py` file).
171
171
  - Ensure the Batch & Python scripts are in the same directory.
172
- - A sample `.bat` file (`Example.bat`) is included in the [misc](https://github.com/Nashville-Public-Library/misc/tree/main/talklib_examples) repo.
172
+ - A sample `.bat` file (`Example.bat`) is included in the [talking-library-misc](https://github.com/Nashville-Public-Library/talking-library-misc/tree/main/talklib_examples) repo (This is a private repo! Contact Shared Systems team to get access).
173
173
  - Download this file and place it in the same folder as your Python file.
174
174
  - Right-Click the file > select `Properties` > select `Unblock` so that it can be executed.
175
175
  - It is a best practice to give the `.bat` and `.py` files the same name, though it is not necessary.
@@ -258,7 +258,7 @@ required for all RSS or permalink shows
258
258
 
259
259
  required for "local" shows
260
260
  - path to the local file as such: `D:\path\to\the\show.wav`
261
- - you will probably not have a hardcoded path here. Usually, you will be running a short algorithm to determine the path. Please see the [MISC](https://github.com/talkinglibrary/misc) repo for some examples.
261
+ - you will probably not have a hardcoded path here. Usually, you will be running a short algorithm to determine the path. Please see the [talking-library-misc](https://github.com/Nashville-Public-Library/talking-library-misc) repo for some examples (This is a private repo! Contact Shared Systems team to get access).
262
262
 
263
263
  `is_permalink`
264
264
 
@@ -38,12 +38,12 @@ To repeat, **this package will not work without FFmpeg and FFprobe**.
38
38
 
39
39
  FFmpeg and FFprobe should be two separate binaries.
40
40
 
41
- The easiest way to install FFmpeg (and FFprobe) on Windows is with WinGet:
41
+ The easiest way to install FFmpeg (and FFprobe) on Windows is with WinGet (you may need to run this in a terminal with Admin privileges):
42
42
  ````bash
43
43
  winget install Gyan.FFmpeg
44
44
  ````
45
45
 
46
- This should install both FFmpeg & FFprobe. After WinGet completes installation, test to ensure FFmpeg is installed:
46
+ This should install both FFmpeg & FFprobe. After WinGet completes installation, restart your terminal and then test to ensure FFmpeg is installed:
47
47
  ````bash
48
48
  ffmpeg -version
49
49
  ````
@@ -88,7 +88,7 @@ Before we begin, a general note:
88
88
  - These are some of the reasons why we do not run `.py` files directly from WR.
89
89
  - Instead, we tell WR to run a Batch script (`.bat` file) which in turn will automatically run the Python script (`.py` file).
90
90
  - Ensure the Batch & Python scripts are in the same directory.
91
- - A sample `.bat` file (`Example.bat`) is included in the [misc](https://github.com/Nashville-Public-Library/misc/tree/main/talklib_examples) repo.
91
+ - A sample `.bat` file (`Example.bat`) is included in the [talking-library-misc](https://github.com/Nashville-Public-Library/talking-library-misc/tree/main/talklib_examples) repo (This is a private repo! Contact Shared Systems team to get access).
92
92
  - Download this file and place it in the same folder as your Python file.
93
93
  - Right-Click the file > select `Properties` > select `Unblock` so that it can be executed.
94
94
  - It is a best practice to give the `.bat` and `.py` files the same name, though it is not necessary.
@@ -177,7 +177,7 @@ required for all RSS or permalink shows
177
177
 
178
178
  required for "local" shows
179
179
  - path to the local file as such: `D:\path\to\the\show.wav`
180
- - you will probably not have a hardcoded path here. Usually, you will be running a short algorithm to determine the path. Please see the [MISC](https://github.com/talkinglibrary/misc) repo for some examples.
180
+ - you will probably not have a hardcoded path here. Usually, you will be running a short algorithm to determine the path. Please see the [talking-library-misc](https://github.com/Nashville-Public-Library/talking-library-misc) repo for some examples (This is a private repo! Contact Shared Systems team to get access).
181
181
 
182
182
  `is_permalink`
183
183
 
@@ -1,13 +1,13 @@
1
1
  [project]
2
2
  name = "talklib"
3
- version = "3.7.1"
3
+ version = "3.7.3"
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"
10
+ requires-python = ">=3.12"
11
11
  dynamic = ["dependencies"]
12
12
  [tool.setuptools.dynamic]
13
13
  dependencies = {file = ["requirements.txt"]}
@@ -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 __countdown(self):
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.1
3
+ Version: 3.7.3
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
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
@@ -119,12 +119,12 @@ To repeat, **this package will not work without FFmpeg and FFprobe**.
119
119
 
120
120
  FFmpeg and FFprobe should be two separate binaries.
121
121
 
122
- The easiest way to install FFmpeg (and FFprobe) on Windows is with WinGet:
122
+ The easiest way to install FFmpeg (and FFprobe) on Windows is with WinGet (you may need to run this in a terminal with Admin privileges):
123
123
  ````bash
124
124
  winget install Gyan.FFmpeg
125
125
  ````
126
126
 
127
- This should install both FFmpeg & FFprobe. After WinGet completes installation, test to ensure FFmpeg is installed:
127
+ This should install both FFmpeg & FFprobe. After WinGet completes installation, restart your terminal and then test to ensure FFmpeg is installed:
128
128
  ````bash
129
129
  ffmpeg -version
130
130
  ````
@@ -169,7 +169,7 @@ Before we begin, a general note:
169
169
  - These are some of the reasons why we do not run `.py` files directly from WR.
170
170
  - Instead, we tell WR to run a Batch script (`.bat` file) which in turn will automatically run the Python script (`.py` file).
171
171
  - Ensure the Batch & Python scripts are in the same directory.
172
- - A sample `.bat` file (`Example.bat`) is included in the [misc](https://github.com/Nashville-Public-Library/misc/tree/main/talklib_examples) repo.
172
+ - A sample `.bat` file (`Example.bat`) is included in the [talking-library-misc](https://github.com/Nashville-Public-Library/talking-library-misc/tree/main/talklib_examples) repo (This is a private repo! Contact Shared Systems team to get access).
173
173
  - Download this file and place it in the same folder as your Python file.
174
174
  - Right-Click the file > select `Properties` > select `Unblock` so that it can be executed.
175
175
  - It is a best practice to give the `.bat` and `.py` files the same name, though it is not necessary.
@@ -258,7 +258,7 @@ required for all RSS or permalink shows
258
258
 
259
259
  required for "local" shows
260
260
  - path to the local file as such: `D:\path\to\the\show.wav`
261
- - you will probably not have a hardcoded path here. Usually, you will be running a short algorithm to determine the path. Please see the [MISC](https://github.com/talkinglibrary/misc) repo for some examples.
261
+ - you will probably not have a hardcoded path here. Usually, you will be running a short algorithm to determine the path. Please see the [talking-library-misc](https://github.com/Nashville-Public-Library/talking-library-misc) repo for some examples (This is a private repo! Contact Shared Systems team to get access).
262
262
 
263
263
  `is_permalink`
264
264
 
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