2020-06-01 15:02:43 +00:00
|
|
|
#!/bin/bash
|
|
|
|
FILE=/tmp/$RANDOM
|
|
|
|
TOP=0
|
|
|
|
LEFT=3
|
|
|
|
|
|
|
|
# Additional heading space
|
|
|
|
HEADINGNEXTPAGE=16
|
|
|
|
HEADINGLEFT=0
|
|
|
|
HEADINGRIGHT=8
|
|
|
|
|
|
|
|
# GPG Space
|
|
|
|
NEXTPAGE=30
|
|
|
|
NEXTPAGESMALL=48
|
|
|
|
NEXTFIELDBOTTOM=7
|
|
|
|
NEXTFIELDRIGHT=14
|
|
|
|
NEXTFIELDRIGHTSMALL=25
|
|
|
|
MAXLENGTH=22
|
|
|
|
|
|
|
|
if [ $# -eq 0 ]; then
|
|
|
|
echo -e "$0: Syntax:\n$0 FIELD\n\nExample:\n$0 7\n\n\nFields:
|
|
|
|
==================
|
|
|
|
| 0 | 1 || 6 | 7 |
|
|
|
|
|---|---||---|---|
|
|
|
|
| 2 | 3 || 8 | 9 |
|
|
|
|
|---|---||---|---|
|
|
|
|
| 4 | 5 || 10| 11|
|
|
|
|
==================
|
|
|
|
"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
PAGE=$(($1 / 6))
|
|
|
|
FIELD=$(($1 % 6))
|
|
|
|
|
|
|
|
shift 1
|
|
|
|
|
|
|
|
|
|
|
|
echo "PAGE: $PAGE, FIELD: $FIELD"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function moveDown() {
|
|
|
|
for((i=0; i<$(($FIELD / 2)); i++)); do
|
|
|
|
for((j=0; j<$NEXTFIELDBOTTOM; j++)); do
|
|
|
|
printf "\n" >> $FILE
|
|
|
|
done
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function heading() {
|
|
|
|
moveDown
|
|
|
|
|
|
|
|
|
|
|
|
if [ $(($FIELD % 2)) -eq 0 ]; then
|
|
|
|
HSPACE=$HEADINGLEFT
|
|
|
|
SPACE=0
|
|
|
|
else
|
|
|
|
HSPACE=$HEADINGRIGHT
|
|
|
|
SPACE=$NEXTFIELDRIGHT
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ $PAGE -eq 1 ]; then
|
|
|
|
makeLeft $NEXTPAGE
|
|
|
|
fi
|
2020-06-11 10:13:23 +00:00
|
|
|
makeLeft 1 $FILE
|
|
|
|
makeLeft $SPACE $FILE
|
2020-06-01 15:02:43 +00:00
|
|
|
italicLetters $FILE
|
2020-06-02 17:42:09 +00:00
|
|
|
printf "INTERGALACTIC\n" >> $FILE
|
2020-06-01 15:02:43 +00:00
|
|
|
|
|
|
|
if [ $PAGE -eq 1 ]; then
|
|
|
|
makeLeft $NEXTPAGE
|
|
|
|
fi
|
2020-06-11 10:13:23 +00:00
|
|
|
makeLeft 1 $FILE
|
|
|
|
makeLeft $SPACE $FILE
|
2020-06-01 15:02:43 +00:00
|
|
|
printf "REGISTRATION\n" >> $FILE
|
|
|
|
bigLetters $FILE
|
|
|
|
|
|
|
|
if [ $PAGE -eq 1 ]; then
|
2020-06-11 10:13:23 +00:00
|
|
|
makeLeft $HEADINGNEXTPAGE $FILE
|
2020-06-01 15:02:43 +00:00
|
|
|
if [ $(($FIELD % 2)) -eq 1 ]; then
|
2020-06-11 10:13:23 +00:00
|
|
|
makeLeft $(($HSPACE - 1)) $FILE
|
2020-06-01 15:02:43 +00:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
if [ $(($FIELD % 2)) -eq 0 ]; then
|
2020-06-11 10:13:23 +00:00
|
|
|
makeLeft 1 $FILE
|
2020-06-01 15:02:43 +00:00
|
|
|
fi
|
2020-06-11 10:13:23 +00:00
|
|
|
makeLeft $HSPACE $FILE
|
2020-06-01 15:02:43 +00:00
|
|
|
fi
|
|
|
|
printf "OFFICE\n" >> $FILE
|
|
|
|
resetLetters $FILE
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function insertDate() {
|
|
|
|
if [ $(($FIELD % 2 )) -eq 0 ]; then
|
|
|
|
SPACE=0
|
|
|
|
else
|
|
|
|
SPACE=$NEXTFIELDRIGHTSMALL
|
|
|
|
fi
|
|
|
|
|
|
|
|
smallLetters $FILE
|
|
|
|
if [ $PAGE -eq 1 ]; then
|
2020-06-11 10:13:23 +00:00
|
|
|
makeLeft $NEXTPAGESMALL $FILE
|
2020-06-01 15:02:43 +00:00
|
|
|
fi
|
2020-06-11 10:13:23 +00:00
|
|
|
makeLeft $LEFT $FILE
|
|
|
|
makeLeft $(($SPACE + 2)) $FILE
|
2020-06-01 15:02:43 +00:00
|
|
|
if [ -n "$EVENT" ]; then
|
|
|
|
printf "$EVENT, $(date -I)" >> $FILE
|
|
|
|
else
|
|
|
|
printf "$(date -I)" >> $FILE
|
|
|
|
fi
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
source ../include/nixdorf
|
|
|
|
init
|
|
|
|
|
2020-06-11 10:13:23 +00:00
|
|
|
makeNewline $TOP $FILE
|
2020-06-01 15:02:43 +00:00
|
|
|
heading
|
|
|
|
insertDate
|
|
|
|
|
|
|
|
printFile $FILE
|
|
|
|
rm $FILE
|