summaryrefslogtreecommitdiffstats
path: root/fedora_business_cards/frontend/cmdline.py
diff options
context:
space:
mode:
authorOin Maple <mapleoin@copac.rdsnet.ro>2009-04-25 11:33:22 +0300
committerOin Maple <mapleoin@copac.rdsnet.ro>2009-04-25 11:33:22 +0300
commit7cc49782869031e5b95c8c8882eded703a25b265 (patch)
treed9bd2d82bca2b05f605240e1d15714928e13037c /fedora_business_cards/frontend/cmdline.py
parent9a082fb5c2d26d1c8e53a8523fccd0421196a7c9 (diff)
downloadfedora-business-cards-master.tar.gz
fedora-business-cards-master.tar.xz
fedora-business-cards-master.zip
Changed base templates and generator scripts to allow for width and height flagsHEADmaster
Diffstat (limited to 'fedora_business_cards/frontend/cmdline.py')
-rw-r--r--fedora_business_cards/frontend/cmdline.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/fedora_business_cards/frontend/cmdline.py b/fedora_business_cards/frontend/cmdline.py
index 958aa33..b14fe3a 100644
--- a/fedora_business_cards/frontend/cmdline.py
+++ b/fedora_business_cards/frontend/cmdline.py
@@ -58,6 +58,10 @@ def main():
parser.add_option("-u", "--username", dest="username", default="",
help="If set, use a different name than the one logged"+\
" in with to fill out business card information")
+ parser.add_option("-x", "--width", dest="width", default="",
+ help="If set, use a different height")
+ parser.add_option("-y", "--height", dest="height", default="",
+ help="If set, use a different width")
parser.add_option("--pdf", dest="output", default="png", const="pdf",
action="store_const", help="Export as PDF")
parser.add_option("--png", dest="output", default="png", const="png",
@@ -149,7 +153,8 @@ def main():
# generate front of business card
print "Generating front...",
sys.stdout.flush()
- xml = generate.gen_front(name, title, lines, frontloc)
+ xml = generate.gen_front(name, title, lines, frontloc,
+ options.width, options.height)
if options.output == "svg":
export.svg_to_file(xml, options.username+'-front.'+options.output)
elif options.output == "cmyk_pdf":
@@ -160,7 +165,7 @@ def main():
# generate back of business card
print "Generating back...",
sys.stdout.flush()
- xml = generate.gen_back(backloc)
+ xml = generate.gen_back(backloc, options.width, options.height)
if options.output == "svg":
export.svg_to_file(xml, options.username+'-back.'+options.output)
elif options.output == "cmyk_pdf":