mirror of
https://github.com/luneko/SweetTokyoNight.git
synced 2025-12-13 15:29:53 +01:00
Fix render assets script
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
# Thanks to the GNOME theme nerds for the original source of this script
|
||||
|
||||
import os
|
||||
import sys
|
||||
import xml.sax
|
||||
@@ -32,9 +30,9 @@ def wait_for_prompt(process, command=None):
|
||||
return
|
||||
|
||||
output += process.stdout.read(1)
|
||||
while output != b'\n>':
|
||||
output += process.stdout.read(1)
|
||||
output = output[1:]
|
||||
# while output != b'\n>':
|
||||
# output += process.stdout.read(1)
|
||||
# output = output[1:]
|
||||
|
||||
|
||||
def start_inkscape():
|
||||
@@ -51,9 +49,8 @@ def inkscape_render_rect(icon_file, rect, output_file):
|
||||
if inkscape_process is None:
|
||||
inkscape_process = start_inkscape()
|
||||
wait_for_prompt(inkscape_process,
|
||||
'--export-dpi=180 %s -i %s -e %s'
|
||||
% (icon_file, rect, output_file)
|
||||
)
|
||||
'file-open:%s; export-id:%s; export-filename:%s; export-dpi:180; export-do' %
|
||||
(icon_file, rect, output_file))
|
||||
optimize_png(output_file)
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
# Thanks to the GNOME theme nerds for the original source of this script
|
||||
|
||||
import os
|
||||
import sys
|
||||
import xml.sax
|
||||
@@ -32,9 +30,9 @@ def wait_for_prompt(process, command=None):
|
||||
return
|
||||
|
||||
output += process.stdout.read(1)
|
||||
while output != b'\n>':
|
||||
output += process.stdout.read(1)
|
||||
output = output[1:]
|
||||
# while output != b'\n>':
|
||||
# output += process.stdout.read(1)
|
||||
# output = output[1:]
|
||||
|
||||
|
||||
def start_inkscape():
|
||||
@@ -51,7 +49,7 @@ def inkscape_render_rect(icon_file, rect, output_file):
|
||||
if inkscape_process is None:
|
||||
inkscape_process = start_inkscape()
|
||||
wait_for_prompt(inkscape_process,
|
||||
'%s -i %s -e %s' %
|
||||
'file-open:%s; export-id:%s; export-filename:%s; export-do' %
|
||||
(icon_file, rect, output_file))
|
||||
optimize_png(output_file)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user