zman1x1 commited on
Commit
6b9994d
1 Parent(s): de077cb

use npx for using marp

Browse files
Files changed (1) hide show
  1. 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")