slidemovie 0.1.0__py3-none-any.whl → 0.2.0__py3-none-any.whl

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.
slidemovie/cli.py CHANGED
@@ -79,7 +79,8 @@ def main():
79
79
  parser.add_argument("--tts-provider", help="TTS Provider (e.g., google, openai)")
80
80
  parser.add_argument("--tts-model", help="TTS Model name")
81
81
  parser.add_argument("--tts-voice", help="TTS Voice/Speaker setting")
82
- parser.add_argument("--prompt", help="Override TTS system prompt")
82
+ parser.add_argument("--prompt", help="Override TTS system prompt (automatically enables prompt usage)")
83
+ parser.add_argument("--no-prompt", action="store_true", help="Disable TTS system prompt")
83
84
 
84
85
  # --- Other Options ---
85
86
  parser.add_argument(
@@ -114,6 +115,9 @@ def main():
114
115
  movie.tts_voice = args.tts_voice
115
116
  if args.prompt:
116
117
  movie.prompt = args.prompt
118
+ movie.tts_use_prompt = True
119
+ if args.no_prompt:
120
+ movie.tts_use_prompt = False
117
121
 
118
122
  if args.debug:
119
123
  movie.ffmpeg_loglevel = 'info'
slidemovie/core.py CHANGED
@@ -180,6 +180,7 @@ class Movie():
180
180
  for key, value in config.items():
181
181
  setattr(self, key, value)
182
182
 
183
+
183
184
  def configure_project_paths(self, project_name, source_dir, output_root_dir=None, output_filename=None):
184
185
  """
185
186
  Configures paths for a standard (flat) project structure.
@@ -193,18 +194,35 @@ class Movie():
193
194
  Defaults to `project_name`.
194
195
  """
195
196
  # Determine output root directory
197
+ target_root = None
198
+ is_automatic_path = False
199
+
196
200
  if output_root_dir:
197
201
  target_root = output_root_dir
198
202
  elif self.output_root:
199
203
  target_root = self.output_root
200
204
  else:
201
205
  target_root = f'{source_dir}/movie'
206
+ is_automatic_path = True
202
207
 
203
- # Expand path and check existence
208
+ # Expand path
204
209
  target_root = os.path.expanduser(target_root)
205
- if not os.path.isdir(target_root):
206
- logger.error(f'Directory {target_root} does not exist.')
207
- sys.exit(1)
210
+
211
+ # Handle directory existence
212
+ if is_automatic_path:
213
+ # If the path is automatically determined, create it if it doesn't exist
214
+ if not os.path.isdir(target_root):
215
+ try:
216
+ os.makedirs(target_root, exist_ok=True)
217
+ logger.info(f'Created output directory: {target_root}')
218
+ except OSError as e:
219
+ logger.error(f'Failed to create directory {target_root}: {e}')
220
+ sys.exit(1)
221
+ else:
222
+ # If the path is explicitly specified (CLI or Config), strict check is applied
223
+ if not os.path.isdir(target_root):
224
+ logger.error(f'Directory {target_root} does not exist.')
225
+ sys.exit(1)
208
226
 
209
227
  # Set member variables
210
228
  self.source_dir = source_dir
@@ -226,7 +244,6 @@ class Movie():
226
244
  self.slide_file = f'{self.source_dir}/{project_name}.pptx'
227
245
  self.video_file = f'{self.movie_dir}/{output_filename}.mp4'
228
246
 
229
-
230
247
  def configure_subproject_paths(self, parent_project_name, subproject_name, source_parent_dir, output_root_dir=None, output_filename=None):
231
248
  """
232
249
  Configures paths for a nested project structure (Parent Folder -> Child Folder).
@@ -239,18 +256,35 @@ class Movie():
239
256
  output_filename (str, optional): Filename for the output video (without extension).
240
257
  """
241
258
  # Determine output root directory
259
+ target_root = None
260
+ is_automatic_path = False
261
+
242
262
  if output_root_dir:
243
263
  target_root = output_root_dir
244
264
  elif self.output_root:
245
265
  target_root = self.output_root
246
266
  else:
247
267
  target_root = f'{source_parent_dir}/movie'
268
+ is_automatic_path = True
248
269
 
249
- # Expand path and check existence
270
+ # Expand path
250
271
  target_root = os.path.expanduser(target_root)
251
- if not os.path.isdir(target_root):
252
- logger.error(f'Directory {target_root} does not exist.')
253
- sys.exit(1)
272
+
273
+ # Handle directory existence
274
+ if is_automatic_path:
275
+ # If the path is automatically determined, create it if it doesn't exist
276
+ if not os.path.isdir(target_root):
277
+ try:
278
+ os.makedirs(target_root, exist_ok=True)
279
+ logger.info(f'Created output directory: {target_root}')
280
+ except OSError as e:
281
+ logger.error(f'Failed to create directory {target_root}: {e}')
282
+ sys.exit(1)
283
+ else:
284
+ # If the path is explicitly specified (CLI or Config), strict check is applied
285
+ if not os.path.isdir(target_root):
286
+ logger.error(f'Directory {target_root} does not exist.')
287
+ sys.exit(1)
254
288
 
255
289
  # Source directory is "Parent/Child"
256
290
  self.source_dir = f'{source_parent_dir}/{subproject_name}'
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: slidemovie
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: Markdown and PowerPoint to narration video generator
5
5
  Author: Katsutoshi Seki
6
6
  License-Expression: MIT
7
7
  Project-URL: Homepage, https://sekika.github.io/slidemovie/
8
8
  Project-URL: Source, https://github.com/sekika/slidemovie
9
9
  Keywords: powerpoint,markdown,video,tts,presentation,automation
10
- Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Development Status :: 4 - Beta
11
11
  Classifier: Intended Audience :: Developers
12
12
  Classifier: Intended Audience :: Education
13
13
  Classifier: Operating System :: OS Independent
@@ -17,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.9
17
17
  Classifier: Programming Language :: Python :: 3.10
18
18
  Classifier: Programming Language :: Python :: 3.11
19
19
  Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
20
21
  Classifier: Topic :: Multimedia :: Video
21
22
  Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
22
23
  Classifier: Topic :: Office/Business :: Office Suites
@@ -0,0 +1,9 @@
1
+ slidemovie/__init__.py,sha256=-WEYzm_3B2Db9t-qwLidp6SEU113UpDRxz8DE3Xaeo8,45
2
+ slidemovie/cli.py,sha256=ICI8S0GVzlrn8B7PMzUFolXxlwSGNF_dMLcSnjmHELk,5843
3
+ slidemovie/core.py,sha256=wLtJHcryIXYN0N4_F4XN5OV6IPtnXgGnfhJuEQMyLeM,53447
4
+ slidemovie-0.2.0.dist-info/licenses/LICENSE,sha256=3i1-4ZoSUnRhEe7bNNHEJ-b6J7YAxQS9WRzq2T-4xmE,1085
5
+ slidemovie-0.2.0.dist-info/METADATA,sha256=3SNlfpGtM4HUUlE9W8WoQMlEWE9ZhtWHMnhegkL8LGg,3596
6
+ slidemovie-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
+ slidemovie-0.2.0.dist-info/entry_points.txt,sha256=QKCaqBM90pFuO9XUrGCIjUaQU66HdWU_5h0TJGWxhNY,51
8
+ slidemovie-0.2.0.dist-info/top_level.txt,sha256=fDoWtBH9a9EM1ZygcKZB571mXl3eXBd93VK3SrgrGiQ,11
9
+ slidemovie-0.2.0.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- slidemovie/__init__.py,sha256=-WEYzm_3B2Db9t-qwLidp6SEU113UpDRxz8DE3Xaeo8,45
2
- slidemovie/cli.py,sha256=3jm4Z5cUCjvBs1SDWomGyEo_sGl3gNFlAMoxvjIrNEk,5616
3
- slidemovie/core.py,sha256=feSxLUk1smUUAVguNvbILbZf_i-Wqd7tBpJuVqMl05g,52037
4
- slidemovie-0.1.0.dist-info/licenses/LICENSE,sha256=3i1-4ZoSUnRhEe7bNNHEJ-b6J7YAxQS9WRzq2T-4xmE,1085
5
- slidemovie-0.1.0.dist-info/METADATA,sha256=suUv_zUwUz-TbwxgokpC1dGlY7BdKoSPMrvh0NiDZjM,3546
6
- slidemovie-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
- slidemovie-0.1.0.dist-info/entry_points.txt,sha256=QKCaqBM90pFuO9XUrGCIjUaQU66HdWU_5h0TJGWxhNY,51
8
- slidemovie-0.1.0.dist-info/top_level.txt,sha256=fDoWtBH9a9EM1ZygcKZB571mXl3eXBd93VK3SrgrGiQ,11
9
- slidemovie-0.1.0.dist-info/RECORD,,