Spaces:
Sleeping
Sleeping
use npx for using marp
Browse files- utils/ppt.py +2 -2
utils/ppt.py
CHANGED
@@ -2,7 +2,7 @@ import os
|
|
2 |
|
3 |
def generate_ppt(markdown_source, output_name, chromium_path="./chrome_sandbox") -> None:
|
4 |
# check for marp
|
5 |
-
if os.system("npx marp --version") != 0:
|
6 |
raise Exception("Marp is not installed")
|
7 |
|
8 |
# if user is root, then set CHROMIUM_PATH to chromium_path
|
@@ -14,4 +14,4 @@ def generate_ppt(markdown_source, output_name, chromium_path="./chrome_sandbox")
|
|
14 |
raise Exception("Markdown source does not exist")
|
15 |
|
16 |
# generate ppt
|
17 |
-
os.system(f"npx @marp-team/marp-cli {markdown_source} -o {output_name} --allow-local-files")
|
|
|
2 |
|
3 |
def generate_ppt(markdown_source, output_name, chromium_path="./chrome_sandbox") -> None:
|
4 |
# check for marp
|
5 |
+
if os.system("npx -y @marp-team/marp-cli --version") != 0:
|
6 |
raise Exception("Marp is not installed")
|
7 |
|
8 |
# if user is root, then set CHROMIUM_PATH to chromium_path
|
|
|
14 |
raise Exception("Markdown source does not exist")
|
15 |
|
16 |
# generate ppt
|
17 |
+
os.system(f"npx -y @marp-team/marp-cli {markdown_source} -o {output_name} --allow-local-files")
|