slidemovie 0.1.0__py3-none-any.whl → 0.2.1__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 +7 -1
- slidemovie/core.py +45 -9
- {slidemovie-0.1.0.dist-info → slidemovie-0.2.1.dist-info}/METADATA +3 -2
- slidemovie-0.2.1.dist-info/RECORD +9 -0
- slidemovie-0.1.0.dist-info/RECORD +0 -9
- {slidemovie-0.1.0.dist-info → slidemovie-0.2.1.dist-info}/WHEEL +0 -0
- {slidemovie-0.1.0.dist-info → slidemovie-0.2.1.dist-info}/entry_points.txt +0 -0
- {slidemovie-0.1.0.dist-info → slidemovie-0.2.1.dist-info}/licenses/LICENSE +0 -0
- {slidemovie-0.1.0.dist-info → slidemovie-0.2.1.dist-info}/top_level.txt +0 -0
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,10 +115,15 @@ 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'
|
|
120
124
|
movie.show_skip = True
|
|
125
|
+
logging.getLogger("google_genai").setLevel(logging.DEBUG)
|
|
126
|
+
logging.getLogger("httpx").setLevel(logging.DEBUG)
|
|
121
127
|
logger.setLevel(logging.DEBUG)
|
|
122
128
|
logger.info("Debug mode enabled.")
|
|
123
129
|
|
slidemovie/core.py
CHANGED
|
@@ -41,6 +41,8 @@ class Movie():
|
|
|
41
41
|
"""
|
|
42
42
|
self._check_external_tools()
|
|
43
43
|
self._load_settings()
|
|
44
|
+
logging.getLogger("google_genai").setLevel(logging.WARNING)
|
|
45
|
+
logging.getLogger("httpx").setLevel(logging.WARNING)
|
|
44
46
|
|
|
45
47
|
def _check_external_tools(self):
|
|
46
48
|
"""
|
|
@@ -180,6 +182,7 @@ class Movie():
|
|
|
180
182
|
for key, value in config.items():
|
|
181
183
|
setattr(self, key, value)
|
|
182
184
|
|
|
185
|
+
|
|
183
186
|
def configure_project_paths(self, project_name, source_dir, output_root_dir=None, output_filename=None):
|
|
184
187
|
"""
|
|
185
188
|
Configures paths for a standard (flat) project structure.
|
|
@@ -193,18 +196,35 @@ class Movie():
|
|
|
193
196
|
Defaults to `project_name`.
|
|
194
197
|
"""
|
|
195
198
|
# Determine output root directory
|
|
199
|
+
target_root = None
|
|
200
|
+
is_automatic_path = False
|
|
201
|
+
|
|
196
202
|
if output_root_dir:
|
|
197
203
|
target_root = output_root_dir
|
|
198
204
|
elif self.output_root:
|
|
199
205
|
target_root = self.output_root
|
|
200
206
|
else:
|
|
201
207
|
target_root = f'{source_dir}/movie'
|
|
208
|
+
is_automatic_path = True
|
|
202
209
|
|
|
203
|
-
# Expand path
|
|
210
|
+
# Expand path
|
|
204
211
|
target_root = os.path.expanduser(target_root)
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
212
|
+
|
|
213
|
+
# Handle directory existence
|
|
214
|
+
if is_automatic_path:
|
|
215
|
+
# If the path is automatically determined, create it if it doesn't exist
|
|
216
|
+
if not os.path.isdir(target_root):
|
|
217
|
+
try:
|
|
218
|
+
os.makedirs(target_root, exist_ok=True)
|
|
219
|
+
logger.info(f'Created output directory: {target_root}')
|
|
220
|
+
except OSError as e:
|
|
221
|
+
logger.error(f'Failed to create directory {target_root}: {e}')
|
|
222
|
+
sys.exit(1)
|
|
223
|
+
else:
|
|
224
|
+
# If the path is explicitly specified (CLI or Config), strict check is applied
|
|
225
|
+
if not os.path.isdir(target_root):
|
|
226
|
+
logger.error(f'Directory {target_root} does not exist.')
|
|
227
|
+
sys.exit(1)
|
|
208
228
|
|
|
209
229
|
# Set member variables
|
|
210
230
|
self.source_dir = source_dir
|
|
@@ -226,7 +246,6 @@ class Movie():
|
|
|
226
246
|
self.slide_file = f'{self.source_dir}/{project_name}.pptx'
|
|
227
247
|
self.video_file = f'{self.movie_dir}/{output_filename}.mp4'
|
|
228
248
|
|
|
229
|
-
|
|
230
249
|
def configure_subproject_paths(self, parent_project_name, subproject_name, source_parent_dir, output_root_dir=None, output_filename=None):
|
|
231
250
|
"""
|
|
232
251
|
Configures paths for a nested project structure (Parent Folder -> Child Folder).
|
|
@@ -239,18 +258,35 @@ class Movie():
|
|
|
239
258
|
output_filename (str, optional): Filename for the output video (without extension).
|
|
240
259
|
"""
|
|
241
260
|
# Determine output root directory
|
|
261
|
+
target_root = None
|
|
262
|
+
is_automatic_path = False
|
|
263
|
+
|
|
242
264
|
if output_root_dir:
|
|
243
265
|
target_root = output_root_dir
|
|
244
266
|
elif self.output_root:
|
|
245
267
|
target_root = self.output_root
|
|
246
268
|
else:
|
|
247
269
|
target_root = f'{source_parent_dir}/movie'
|
|
270
|
+
is_automatic_path = True
|
|
248
271
|
|
|
249
|
-
# Expand path
|
|
272
|
+
# Expand path
|
|
250
273
|
target_root = os.path.expanduser(target_root)
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
274
|
+
|
|
275
|
+
# Handle directory existence
|
|
276
|
+
if is_automatic_path:
|
|
277
|
+
# If the path is automatically determined, create it if it doesn't exist
|
|
278
|
+
if not os.path.isdir(target_root):
|
|
279
|
+
try:
|
|
280
|
+
os.makedirs(target_root, exist_ok=True)
|
|
281
|
+
logger.info(f'Created output directory: {target_root}')
|
|
282
|
+
except OSError as e:
|
|
283
|
+
logger.error(f'Failed to create directory {target_root}: {e}')
|
|
284
|
+
sys.exit(1)
|
|
285
|
+
else:
|
|
286
|
+
# If the path is explicitly specified (CLI or Config), strict check is applied
|
|
287
|
+
if not os.path.isdir(target_root):
|
|
288
|
+
logger.error(f'Directory {target_root} does not exist.')
|
|
289
|
+
sys.exit(1)
|
|
254
290
|
|
|
255
291
|
# Source directory is "Parent/Child"
|
|
256
292
|
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
|
|
3
|
+
Version: 0.2.1
|
|
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 ::
|
|
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=D59fkBvl5f3fwu9oSIvNy0VO_E3tNXS48f9zEH4UNx0,5968
|
|
3
|
+
slidemovie/core.py,sha256=_C-ecOZS4vYHrwxd2LK1ifMsimulFkmboCfpKZkFQV4,53576
|
|
4
|
+
slidemovie-0.2.1.dist-info/licenses/LICENSE,sha256=3i1-4ZoSUnRhEe7bNNHEJ-b6J7YAxQS9WRzq2T-4xmE,1085
|
|
5
|
+
slidemovie-0.2.1.dist-info/METADATA,sha256=6IF9K9u_ZfzarAukhzMHxkA9yGuWI1Pbwv0BttuAHKg,3596
|
|
6
|
+
slidemovie-0.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
+
slidemovie-0.2.1.dist-info/entry_points.txt,sha256=QKCaqBM90pFuO9XUrGCIjUaQU66HdWU_5h0TJGWxhNY,51
|
|
8
|
+
slidemovie-0.2.1.dist-info/top_level.txt,sha256=fDoWtBH9a9EM1ZygcKZB571mXl3eXBd93VK3SrgrGiQ,11
|
|
9
|
+
slidemovie-0.2.1.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,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|