[adwaita-icon-theme] Fullcolor: fix rendering script for inkscape 1.0
- From: Jakub Steiner <jimmac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [adwaita-icon-theme] Fullcolor: fix rendering script for inkscape 1.0
- Date: Mon, 8 Jun 2020 10:15:27 +0000 (UTC)
commit e6f52be35ddc3d8f409512cbb9e075cb63aa8e81
Author: Jakub Steiner <jimmac gmail com>
Date: Mon Jun 8 12:09:11 2020 +0200
Fullcolor: fix rendering script for inkscape 1.0
- inkscape 1.0 would keep complaining about syntax with --shell
and the Popen way
- just using dumb subprocess.run() made it shut up
Fixes https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/issues/87
render-icon-theme.py | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/render-icon-theme.py b/render-icon-theme.py
index 68fd93ee..51a75ba4 100755
--- a/render-icon-theme.py
+++ b/render-icon-theme.py
@@ -34,16 +34,9 @@ def wait_for_prompt(process, command=None):
output += process.stdout.read(1)
output = output[1:]
-def start_inkscape():
- process = subprocess.Popen(['flatpak','run','org.inkscape.Inkscape','--shell'], bufsize=0,
stdin=subprocess.PIPE, stdout=subprocess.PIPE)
- wait_for_prompt(process)
- return process
-
-def inkscape_render_rect(icon_file, rect, output_file):
- global inkscape_process
- if inkscape_process is None:
- inkscape_process = start_inkscape()
- wait_for_prompt(inkscape_process, '%s -i %s -e %s' % (icon_file, rect, output_file))
+def inkscape_render_rect(icon_file, rect, output_file):
+ #print("flatpak run org.inkscape.Inkscape --batch-process -i %s --export-type=png -o %s %s" % (rect,
output_file,icon_file));
+ subprocess.run(['flatpak','run','org.inkscape.Inkscape', '--batch-process', '-i', rect,
'--export-type=png', '-o', output_file, icon_file])
optimize_png(output_file)
class ContentHandler(xml.sax.ContentHandler):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]