Skip to content

Commit

Permalink
fix: replace deprecated option and silence useless errors for inkscape
Browse files Browse the repository at this point in the history
  • Loading branch information
ublefo committed May 2, 2024
1 parent 03a3ca7 commit 96351e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/views/layouts/jupynotex.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import base64
import json
import os
import re
import subprocess
import sys
Expand Down Expand Up @@ -125,8 +126,9 @@ def process_svg(self, image_data):
with open(svg_fname, 'wb') as fh:
fh.write(raw_svg)

cmd = ['inkscape', '--export-text-to-path', '--export-pdf={}'.format(pdf_fname), svg_fname]
subprocess.run(cmd)
with open(os.devnull, 'w') as null:
cmd = ['inkscape', '--export-text-to-path', '--export-filename={}'.format(pdf_fname), svg_fname]
subprocess.run(cmd, stderr=null)

return pdf_fname

Expand Down

0 comments on commit 96351e8

Please sign in to comment.