para-lost commited on
Commit
2eb25a9
·
1 Parent(s): 826e30d

add libreoffice

Browse files
Files changed (2) hide show
  1. app.py +9 -9
  2. apt.txt +1 -0
app.py CHANGED
@@ -147,15 +147,15 @@ ppt.save("output.pptx")
147
  subprocess.run(["python", code_file], capture_output=True, text=True, check=True)
148
 
149
  # Convert the pptx to jpg for preview
150
- # preview_image = "image_previews/output.jpg"
151
- # command = [
152
- # "libreoffice",
153
- # "--headless",
154
- # "--convert-to", "jpg",
155
- # "--outdir", "image_previews",
156
- # pptx_path
157
- # ]
158
- # subprocess.run(command)
159
 
160
  return "Default slide generated after 3 attempts failed.", pptx_path
161
 
 
147
  subprocess.run(["python", code_file], capture_output=True, text=True, check=True)
148
 
149
  # Convert the pptx to jpg for preview
150
+ preview_image = "image_previews/output.jpg"
151
+ command = [
152
+ "libreoffice",
153
+ "--headless",
154
+ "--convert-to", "jpg",
155
+ "--outdir", "image_previews",
156
+ pptx_path
157
+ ]
158
+ subprocess.run(command)
159
 
160
  return "Default slide generated after 3 attempts failed.", pptx_path
161
 
apt.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ libreoffice