talklib 2.0.6__tar.gz → 2.0.7__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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: talklib
3
- Version: 2.0.6
3
+ Version: 2.0.7
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>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "talklib"
3
- version = "2.0.6"
3
+ version = "2.0.7"
4
4
  description = "A package to automate processing of shows/segments airing on the TL"
5
5
  readme = "README.md"
6
6
  license = {file = "LICENSE.txt"}
@@ -179,6 +179,7 @@ class Episode(BaseModel):
179
179
  root = feed.getroot()
180
180
  root = root.find('channel')
181
181
 
182
+ self.notifications.prep_syslog(message="Building the new <item> element")
182
183
  item = ET.Element('item')
183
184
 
184
185
  title = ET.Element('title')
@@ -221,7 +222,7 @@ class Episode(BaseModel):
221
222
  # If there are existing items (there usually will be), add the new item before to the top
222
223
  first_item = items[0]
223
224
  index = list(root).index(first_item)
224
- self.notifications.prep_syslog(message=f"adding {item} to feed at {index}")
225
+ self.notifications.prep_syslog(message=f"adding {item} to feed at channel index: {index}")
225
226
  root.insert(index, item)
226
227
  else:
227
228
  # If no items exist, add the new item to the bottom (after the other channel elements)
@@ -324,13 +325,17 @@ class TLPod(BaseModel):
324
325
  to_send = f"There was a problem podcasting {self.display_name}. Cannot find matched file {to_match} in {self.audio_folders}"
325
326
  self.notifications.send_notifications(message=to_send, subject='Error')
326
327
  raise FileNotFoundError
327
-
328
- def convert(self, file:str):
328
+
329
+ def create_converted_filename(self, file: str):
329
330
  output_filename = file.split('.')
330
331
  output_filename = output_filename[0]
331
332
  output_filename = os.path.basename(output_filename).lower()
332
333
  output_filename = output_filename + '.mp3'
333
334
  self.notifications.prep_syslog(message=f"Converted audio file will be {output_filename}")
335
+ return output_filename
336
+
337
+ def convert(self, file:str):
338
+ output_filename = self.create_converted_filename(file=file)
334
339
 
335
340
  self.ffmpeg.input_file = file
336
341
  self.ffmpeg.output_file = output_filename
@@ -359,6 +364,7 @@ class TLPod(BaseModel):
359
364
 
360
365
  def run(self):
361
366
  self.notifications.prep_syslog(message="Starting up...")
367
+ self.notifications.prep_syslog(message=f"Attributes: {self.__repr__()}")
362
368
 
363
369
  self.ssh.check_folder_exists(folder=self.bucket_folder)
364
370
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: talklib
3
- Version: 2.0.6
3
+ Version: 2.0.7
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>
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