diff --git a/bin/generationlib b/bin/generationlib
index 7bf8468..caf57fe 100755
--- a/bin/generationlib
+++ b/bin/generationlib
@@ -10,6 +10,7 @@ Usage: `basename $0` [-h] [-i] [-j nb_jobs] command arg_list
-c give the path to the cfg file
-i give the path of the svg files without the last /
-k chek if the jpg already exist
+ -s set the sleeptime while there are too many simultanious jobs
-j Set number of simultanious jobs. Default is 2
-o directory where the files should be moved to after creation.
Default ist PICCREATE_OUT
@@ -17,40 +18,10 @@ Usage: `basename $0` [-h] [-i] [-j nb_jobs] command arg_list
`basename $0` -i file -c config
`basename $0` -j 3 -i file -c config"
-function queue {
- QUEUE="$QUEUE $1"
- NUM=$(($NUM+1))
-}
-function regeneratequeue {
- OLDREQUEUE=$QUEUE
- QUEUE=""
- NUM=0
- for PID in $OLDREQUEUE
- do
- if [ -d /proc/$PID ] ; then
- QUEUE="$QUEUE $PID"
- NUM=$(($NUM+1))
- fi
- done
-}
-function checkqueue {
- OLDCHQUEUE=$QUEUE
- for PID in $OLDCHQUEUE
- do
- if [ ! -d /proc/$PID ] ; then
- regeneratequeue # at least one PID has finished
- echo $PID
- break
- fi
- done
-}
function cfg_parser {
INI_FILE=$1
SECTION=$2
- echo $1
- echo $2
eval `sed -n -e "/^\[$SECTION\]/,/^\s*\[/{/^[^;].*\=.*/p;}" < $INI_FILE`>> trr.txt
- echo 'helololo'
}
function get_filepath {
# probiere alle möglichen Kombinationen wo das file stehen könnte je
@@ -116,8 +87,9 @@ if [ $# -eq 0 ]; then # must be at least one arg
fi
CHECKFILE=0
+SLEEPTIME=0.5
-while getopts "j:i:kc:o:hc:" OPT; do # "j:" waits for an argument "h" doesnt
+while getopts "j:i:kc:s:o:hc:" OPT; do # "j:" waits for an argument "h" doesnt
case $OPT in
h) echo "$USAGE"
exit 0 ;;
@@ -125,6 +97,7 @@ while getopts "j:i:kc:o:hc:" OPT; do # "j:" waits for an argument "h" doesnt
k) CHECKFILE=1 ;;
c) CFG_FILENAME=$OPTARG ;;
o) OUTDIR=$OPTARG ;;
+ s) SLEEPTIME=$OPTARG ;;
i) INPUT_FILENAME=$OPTARG ;;
*) echo "$USAGE" >&2; exit 1; # Default.
esac
@@ -139,27 +112,21 @@ check_params
echo $INPUT_FILE
for i in `ls $INPUT_FILE| grep .svg `
do
- echo $i
- echo $CHECKFILE
ID=`echo "$i" | sed -e 's/;.*//g'`
PIC_NAME=`echo "$i" | sed -e 's/.svg/.jpg/g'`
FILE_PATH=$INPUT_FILE/$PIC_NAME
if [ -s $FILE_PATH ] && [ $CHECKFILE -eq 1 ]
then
- echo $PIC_NAME exists!
+ echo $PIC_NAME exists
else
RESIZE="${width}x${height}"
SWITCHES="-density $density $INPUT_FILE/$ID -resize $RESIZE $INPUT_FILE/$PIC_NAME"
CMDLINE="$CMD $SWITCHES"
- echo $CMDLINE
(echo $ID; $CMDLINE) &
- PID=$!
- queue $PID
- while [ $NUM -ge $MAX_NPROC ]; do
- checkqueue
- sleep 0.5
+ while [ `ps -clx|grep -w 'convert' |wc -l` -ge $MAX_NPROC ]; do
+ sleep $SLEEPTIME
done
fi
done
diff --git a/cfg/punkteraetsel.cfg b/cfg/punkteraetsel.cfg
index 05e9441..9f33e4c 100644
--- a/cfg/punkteraetsel.cfg
+++ b/cfg/punkteraetsel.cfg
@@ -29,18 +29,21 @@ name = Name
# hier der Inhalt aus der Eingabedatei, der geschrieben werden soll
content=${name}
# Ab dem Punkt wird zu schreiben begonnen
-x=0
+x=-10
y=0
-length=200
+height=850
+width=2640
# Fontname und Fonttyp
fontname=ausgangsschrift
glyph_space=20
counter_replace=True
#align=center,left,right
-align=left
+align=center
+yalign=center
+autoscale=True
[jpgs]
-width=1900
-height=700
+width=2776
+height=898
format=jpg
density=300
diff --git a/fonts/ausgangsschrift/ausgangsschrift.cfg b/fonts/ausgangsschrift/ausgangsschrift.cfg
index d42222c..b355fef 100644
--- a/fonts/ausgangsschrift/ausgangsschrift.cfg
+++ b/fonts/ausgangsschrift/ausgangsschrift.cfg
@@ -39,7 +39,7 @@ NPATTERN=9
FONTNAME=d.svg
#
[e]
-XSTEP=40
+XSTEP=40.0
XMIN=34.977264
XMAX=67.112206
YSTEP=56.548093
@@ -69,7 +69,7 @@ NPATTERN=10
FONTNAME=g.svg
#
[h]
-XSTEP=39.362423
+XSTEP=45.0
XMIN=40.923481
XMAX=80.285904
YSTEP=83.657337
@@ -99,7 +99,7 @@ NPATTERN=4
FONTNAME=j.svg
#
[k]
-XSTEP=39.362423
+XSTEP=45.0
XMIN=40.923481
XMAX=80.285904
YSTEP=84.097073
diff --git a/fonts/ausgangsschrift/h.svg b/fonts/ausgangsschrift/h.svg
index 393b3f3..fc5a236 100644
--- a/fonts/ausgangsschrift/h.svg
+++ b/fonts/ausgangsschrift/h.svg
@@ -1,98 +1,98 @@
${x1}
${x3}
${x6}
${x7}
${x5}
${x4}
${x2}
${x8}
diff --git a/in/font.csv b/in/font.csv
index e4bb2d2..02f4ea4 100644
--- a/in/font.csv
+++ b/in/font.csv
@@ -76,7 +76,7 @@ z;z
Z;Z
plus;+
scharfs;ß
-slash;
+slash;/
space;
minus;-
komma;,
diff --git a/in/test.csv b/in/test.csv
index f25e8c2..2303e92 100644
--- a/in/test.csv
+++ b/in/test.csv
@@ -1,9 +1,6 @@
Kennummer;Name
-a-z;mnopqrstuvwxyzabcdefghijkl
-A-Z;ABCDEFGHIJKLMNOPQRSTUVWXYZ
-ü;:.:.:.:...---++!!&&
-001;Michael
-yxelbüxel;Eva
-063453;Nicola Jane
-333;&
-12;ä Ä é è ëïóöÖß/-,:!'a&b+úüÜ
+001;Au
+002;Rau
+003;Lux
+004;May
+005;Johnson-Kronh-Wattenberg
diff --git a/libs/piccreate.py b/libs/piccreate.py
index 95552c0..b446971 100644
--- a/libs/piccreate.py
+++ b/libs/piccreate.py
@@ -21,19 +21,34 @@ def create_picture_frame( config ):
params = dict()
params['width'] = config.get('globals', 'width')
params['height'] = config.get('globals', 'height')
+ params['background'] = config.get('globals', 'background')
#echo '