[packages/librsvg] - really ported rsvg script to python3; release 2
qboosh
qboosh at pld-linux.org
Wed Apr 17 19:55:51 CEST 2024
commit d187f3061ad6272860c661b7b65b74165a294524
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Apr 17 19:36:55 2024 +0200
- really ported rsvg script to python3; release 2
librsvg.spec | 2 +-
rsvg | 15 +++++++--------
2 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/librsvg.spec b/librsvg.spec
index e216a57..bc1daae 100644
--- a/librsvg.spec
+++ b/librsvg.spec
@@ -13,7 +13,7 @@ Summary(ru.UTF-8): SVG библиотека
Summary(uk.UTF-8): SVG бібліотека
Name: librsvg
Version: 2.58.0
-Release: 1
+Release: 2
Epoch: 1
License: LGPL v2+
Group: X11/Libraries
diff --git a/rsvg b/rsvg
index 437e86c..c4349f9 100755
--- a/rsvg
+++ b/rsvg
@@ -8,13 +8,13 @@
import getopt, sys, os
def usage():
- print >> sys.stdout, """Usage: rsvg [-v?] [-d|--dpi-x <float>] [-p|--dpi-y <float>]
+ print("""Usage: rsvg [-v?] [-d|--dpi-x <float>] [-p|--dpi-y <float>]
[-x|--x-zoom <float>] [-y|--y-zoom <float>] [-w|--width <int>]
[-h|--height <int>] [-q|--quality <int>] [-f|--format [png, jpeg]]
- [-v|--version] [-?|--help] [--usage] [OPTIONS...] file.svg file.png"""
+ [-v|--version] [-?|--help] [--usage] [OPTIONS...] file.svg file.png""")
def help():
- print >> sys.stdout, """Usage: rsvg [OPTIONS...] file.svg file.png
+ print("""Usage: rsvg [OPTIONS...] file.svg file.png
-d, --dpi-x=<float> pixels per inch
-p, --dpi-y=<float> pixels per inch
-x, --x-zoom=<float> x zoom factor
@@ -27,8 +27,7 @@ def help():
Help options:
-?, --help Show this help message
- --usage Display brief usage message
-""",
+ --usage Display brief usage message""")
def shellEscape(param):
"""Escape a string parameter for the shell."""
@@ -45,7 +44,7 @@ def main():
for o, a in opts:
if o in ("-v", "--version"):
- print "rsvg version %s" % ("2.34.2")
+ print("rsvg version %s" % ("2.34.2"))
sys.exit(0)
elif o in ("--usage"):
usage()
@@ -55,10 +54,10 @@ def main():
sys.exit(0)
elif (o in ("-f", "--format")):
if a in ("jpg", "jpeg"):
- print >> sys.stderr, "The JPEG output format is no longer supported"
+ print("The JPEG output format is no longer supported", file=sys.stderr)
sys.exit(1)
elif (o in ("-q", "--quality")):
- print "The --quality option is no longer supported"
+ print("The --quality option is no longer supported")
sys.exit(1)
else:
command_str += " " + shellEscape(o) + " " + shellEscape(a)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/librsvg.git/commitdiff/d187f3061ad6272860c661b7b65b74165a294524
More information about the pld-cvs-commit
mailing list