summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Weller <ianweller@gmail.com>2008-09-29 00:27:57 -0500
committerIan Weller <ianweller@gmail.com>2008-09-29 00:27:57 -0500
commitcc7006c9187eb4cd4bb3898d541e72196492c58a (patch)
tree66615dc0a63d6587ed52670c70fb35980760c1c4
parent8474b9a4ee0eb8dc51de3b8fe4993272f4d7beb6 (diff)
downloadfedora-business-cards-cc7006c9187eb4cd4bb3898d541e72196492c58a.zip
fedora-business-cards-cc7006c9187eb4cd4bb3898d541e72196492c58a.tar.gz
fedora-business-cards-cc7006c9187eb4cd4bb3898d541e72196492c58a.tar.xz
Finish frontend
-rw-r--r--fedora_business_cards/frontend.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/fedora_business_cards/frontend.py b/fedora_business_cards/frontend.py
index fe4b809..283b495 100644
--- a/fedora_business_cards/frontend.py
+++ b/fedora_business_cards/frontend.py
@@ -30,6 +30,8 @@ from getpass import getpass
# local imports
import config
import information
+import generate
+import export
def cmdline_card_line(data):
@@ -43,7 +45,7 @@ def cmdline():
"""
# setup option parser
parser = OptionParser()
- parser.usage = "%prog [options] [outfile]"
+ parser.usage = "%prog [options]"
parser.add_option("-d", "--dpi", dest="dpi", default=300, type="int",
help="DPI of exported file")
parser.add_option("-t", "--template", dest="template",
@@ -141,3 +143,11 @@ def cmdline():
elif lineno == '0' or lineno == '1' or lineno == '2' or \
lineno == '3' or lineno == '4' or lineno == '5':
lines[int(lineno)] = newdata
+ # generate front of business card
+ xml = generate.gen_front(name, title, lines, options.template)
+ export.svg_to_pdf_png(xml, options.username+'-front.'+options.output,
+ options.output, options.dpi)
+ # generate back of business card
+ xml = generate.gen_back(options.template)
+ export.svg_to_pdf_png(xml, options.username+'-back.'+options.output,
+ options.output, options.dpi)