Merge branch 'master' of git+ssh://gitbox/piccreate

This commit is contained in:
Eva Möller
2012-08-21 13:44:29 +02:00
+7
View File
@@ -8,6 +8,7 @@ __license__ = 'BSD'
import optparse
import os
import re
import ConfigParser
from utils import CSVImport, CompleteEnding, get_translation
from django.utils.encoding import smart_str, smart_unicode
@@ -163,6 +164,8 @@ class Word:
content = dict()
content['posy'] = y
g = self.font.GlyphGet(c)
if options.startfrom and (re.match(c,' ') or c.isupper()) :
counter = 0
content['posx'] = str(x)
# die Position ist erst für den nächsten Buchstaben relevant
x = g.GetLength() + x + glyph_space
@@ -171,6 +174,7 @@ class Word:
if params['counter_replace']:
xn = g.GetAttribute('npattern')
for i in range(1, int(xn)+1):
counter = counter + 1
content['x'+str(i)] = counter
svgstr = svgstr + g.GetSVG(content)
@@ -372,6 +376,9 @@ Read Confg, create wakeup and scale this kind of jiffy box
parser.add_option("-i", "--infile", dest="infile",
help="csv file with input of names/content",
action='store')
parser.add_option("-s", "--startfrom", dest="startfrom",
help="csv file with input of names/content",
action='store_true')
parser.add_option("-o", "--outdir", dest="outdir", default=os.path.expandvars('$PICCREATE_OUT'),
help="path to the directory where the maps will be generated",
action='store')