Compare commits
No commits in common. "8dbc8c6605a15750ce4f5959a210e9334ceb209d" and "333d5c9e3c429ed2e78902bbbbb7b393dfa0f92f" have entirely different histories.
8dbc8c6605
...
333d5c9e3c
@ -1,4 +1,4 @@
|
||||
# C3Reg
|
||||
# Intergalactic Registration Office
|
||||
Fill out your hacker passport using a professional dot matrix printer.
|
||||
|
||||
## Set event name
|
||||
@ -7,8 +7,7 @@ To set the event name, just change the `EVENT` variable in `./start` at the top.
|
||||
## Supported Passports
|
||||
The following passports are supported atm:
|
||||
- CmS Junghackerpass
|
||||
- Bound Diplomatic passport by Mitch Altman (TVBGone) Matthew Borgatti (har.ms)
|
||||
- Stapled Diplomatic passport Mitch/Matthew and Nils-Arne Pohlandt (devtal.de)
|
||||
- Adafruit (the newer ones)
|
||||
|
||||
Do you want yours to be supported, too?
|
||||
Talk to me and send me 3 example pieces. :)
|
||||
|
@ -60,6 +60,20 @@ function heading() {
|
||||
fi
|
||||
|
||||
|
||||
if [ $PAGE -eq 1 ]; then
|
||||
makeLeft $NEXTPAGE $FILE
|
||||
fi
|
||||
makeLeft 3 $FILE
|
||||
makeLeft $SPACE $FILE
|
||||
italicLetters $FILE
|
||||
printf "INTERGALACTIC\n" >> $FILE
|
||||
|
||||
if [ $PAGE -eq 1 ]; then
|
||||
makeLeft $NEXTPAGE $FILE
|
||||
fi
|
||||
makeLeft 3 $FILE
|
||||
makeLeft $SPACE $FILE
|
||||
printf "REGISTRATION\n" >> $FILE
|
||||
bigLetters $FILE
|
||||
|
||||
if [ $PAGE -eq 1 ]; then
|
||||
@ -71,7 +85,7 @@ function heading() {
|
||||
makeLeft 1 $FILE
|
||||
makeLeft $HSPACE $FILE
|
||||
fi
|
||||
printf "C3Reg\n" >> $FILE
|
||||
printf "OFFICE\n" >> $FILE
|
||||
resetLetters $FILE
|
||||
|
||||
}
|
@ -3,7 +3,7 @@ FILE=/tmp/$RANDOM
|
||||
TOP=56
|
||||
NEXTFIELD=5
|
||||
LEFT=22
|
||||
AUTHLEFT=66
|
||||
AUTHLEFT=56
|
||||
DATELEFT=37
|
||||
MAXLENGTH=17
|
||||
|
||||
@ -29,7 +29,7 @@ printf "$GIVENNAME" >> $FILE
|
||||
# Authority field
|
||||
makeNewline 2 $FILE
|
||||
makeLeft $AUTHLEFT $FILE
|
||||
printf "C3Reg" >> $FILE
|
||||
printf "Intergalactic Reg. Office" >> $FILE
|
||||
|
||||
makeNewline 3 $FILE
|
||||
makeLeft $LEFT $FILE
|
@ -26,7 +26,7 @@
|
||||
\fbox{\rule{#1in}{0pt}\rule[-0.5ex]{0pt}{4ex}}}
|
||||
|
||||
\title{\textbf{Application Form A23}}
|
||||
\author{C3Reg}
|
||||
\author{Intergalactic Registration Office}
|
||||
\date{Control no. \randomnum{1000}}
|
||||
|
||||
\addtolength{\topmargin}{-2cm}
|
||||
|
@ -26,7 +26,7 @@
|
||||
\fbox{\rule{#1in}{0pt}\rule[-0.5ex]{0pt}{4ex}}}
|
||||
|
||||
\title{\textbf{Application Form PKSR20}}
|
||||
\author{C3Reg}
|
||||
\author{Intergalactic Registration Office}
|
||||
\date{Control no. \answerbox{1}}
|
||||
|
||||
\addtolength{\topmargin}{-2cm}
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
|
||||
\title{\textbf{Privacy Policy}}
|
||||
\author{C3Reg}
|
||||
\author{Intergalactic Registration Office}
|
||||
\date{}
|
||||
|
||||
\addtolength{\topmargin}{-2cm}
|
||||
@ -36,11 +36,5 @@ This office is compliant with the GDPR.
|
||||
\item The information requiring the usage of the computer are always saved volatilely for issuing the passport document.
|
||||
\end{itemize}
|
||||
|
||||
\section*{Contact}
|
||||
Contact information:
|
||||
\begin{itemize}
|
||||
\item Bandie \textless bandie at chaospott.de\textgreater, DECT: 2263
|
||||
\end{itemize}
|
||||
|
||||
\end{document}
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
\fbox{\rule{#1in}{0pt}\rule[-0.5ex]{0pt}{4ex}}}
|
||||
|
||||
\title{\textbf{Application Form Y42}}
|
||||
\author{C3Reg}
|
||||
\author{Intergalactic Registration Office}
|
||||
\date{Control no. \randomnum{1000}}
|
||||
|
||||
\addtolength{\topmargin}{-1cm}
|
||||
|
@ -60,6 +60,20 @@ function heading() {
|
||||
fi
|
||||
|
||||
|
||||
if [ $PAGE -eq 1 ]; then
|
||||
makeLeft $NEXTPAGE $FILE
|
||||
fi
|
||||
makeLeft 1 $FILE
|
||||
makeLeft $SPACE $FILE
|
||||
italicLetters $FILE
|
||||
printf "INTERGALACTIC\n" >> $FILE
|
||||
|
||||
if [ $PAGE -eq 1 ]; then
|
||||
makeLeft $NEXTPAGE $FILE
|
||||
fi
|
||||
makeLeft 1 $FILE
|
||||
makeLeft $SPACE $FILE
|
||||
printf "REGISTRATION\n" >> $FILE
|
||||
bigLetters $FILE
|
||||
|
||||
if [ $PAGE -eq 1 ]; then
|
||||
@ -73,7 +87,7 @@ function heading() {
|
||||
fi
|
||||
makeLeft $HSPACE $FILE
|
||||
fi
|
||||
printf "C3Reg\n" >> $FILE
|
||||
printf "OFFICE\n" >> $FILE
|
||||
resetLetters $FILE
|
||||
|
||||
}
|
30
jhp/msg5
Executable file
30
jhp/msg5
Executable file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
FILE=/tmp/$RANDOM
|
||||
|
||||
source ../include/nixdorf
|
||||
init
|
||||
|
||||
echo "1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
0
|
||||
1" > $FILE
|
||||
|
||||
printFile $FILE
|
||||
rm $FILE
|
2
jhp/reg
2
jhp/reg
@ -21,7 +21,7 @@ init
|
||||
makeNewline 1 $FILE
|
||||
makeLeft $(($LEFT + 12)) $FILE
|
||||
smallLetters $FILE
|
||||
printf "/ C3Reg" >> $FILE
|
||||
printf "/ Intergal. Reg. Office" >> $FILE
|
||||
resetLetters $FILE
|
||||
|
||||
makeNewline $(($TOP - 1)) $FILE
|
||||
|
@ -1,108 +0,0 @@
|
||||
#!/bin/bash
|
||||
FILE=/tmp/$RANDOM
|
||||
TOP=1
|
||||
LEFT=5
|
||||
|
||||
# Additional heading space
|
||||
HEADINGNEXTPAGE=19
|
||||
HEADINGLEFT=1
|
||||
HEADINGRIGHT=10
|
||||
|
||||
# GPG Space
|
||||
NEXTPAGE=34
|
||||
NEXTPAGESMALL=60
|
||||
NEXTFIELDBOTTOM=13
|
||||
NEXTFIELDRIGHT=18
|
||||
NEXTFIELDRIGHTSMALL=30
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo -e "$0: Syntax:\n$0 FIELD\n\nExample:\n$0 7\n\n\nFields:
|
||||
==================
|
||||
| VISAS || VISAS |
|
||||
==================
|
||||
| 0 | 1 || 4 | 5 |
|
||||
|---|---||---|---|
|
||||
| 2 | 3 || 6 | 7 |
|
||||
==================
|
||||
"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PAGE=$(($1 / 4))
|
||||
FIELD=$(($1 % 4))
|
||||
|
||||
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
|
||||
|
||||
|
||||
bigLetters $FILE
|
||||
|
||||
if [ $PAGE -eq 1 ]; then
|
||||
makeLeft $HEADINGNEXTPAGE $FILE
|
||||
if [ $(($FIELD % 2)) -eq 1 ]; then
|
||||
makeLeft $(($HSPACE - 1)) $FILE
|
||||
fi
|
||||
else
|
||||
makeLeft 1 $FILE
|
||||
makeLeft $HSPACE $FILE
|
||||
fi
|
||||
printf "C3Reg\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
|
||||
makeLeft $NEXTPAGESMALL $FILE
|
||||
fi
|
||||
makeLeft $LEFT $FILE
|
||||
makeLeft $(($SPACE + 2)) $FILE
|
||||
if [ -n "$EVENT" ]; then
|
||||
printf "$EVENT, $(date -I)" >> $FILE
|
||||
else
|
||||
printf "$(date -I)" >> $FILE
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
source ../include/nixdorf
|
||||
init
|
||||
|
||||
makeNewline $TOP $FILE
|
||||
heading
|
||||
insertDate
|
||||
|
||||
printFile $FILE
|
||||
rm $FILE
|
@ -1,134 +0,0 @@
|
||||
#!/bin/bash
|
||||
FILE=/tmp/$RANDOM
|
||||
TOP=1
|
||||
LEFT=3
|
||||
|
||||
# Additional heading space
|
||||
HEADINGNEXTPAGE=36
|
||||
HEADINGLEFT=1
|
||||
HEADINGRIGHT=20
|
||||
|
||||
# GPG Space
|
||||
NEXTPAGE=62
|
||||
NEXTFIELDBOTTOM=11
|
||||
NEXTFIELDRIGHT=31
|
||||
MAXLENGTH=22
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo -e "$0: Syntax:\n$0 FIELD GPG FINGERPRINT WITH SPACES\n\nExample:\n$0 7 1234 5678 1234 1234 1234 1234 1234 1234 1234 ABCD\n\n\nFields:
|
||||
==================
|
||||
| VISAS || VISAS |
|
||||
==================
|
||||
| 0 | 1 || 4 | 5 |
|
||||
|---|---||---|---|
|
||||
| 2 | 3 || 6 | 7 |
|
||||
==================
|
||||
"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PAGE=$(($1 / 4))
|
||||
FIELD=$(($1 % 4))
|
||||
|
||||
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
|
||||
SPACE=$HEADINGLEFT
|
||||
else
|
||||
SPACE=$HEADINGRIGHT
|
||||
fi
|
||||
|
||||
if [ $PAGE -eq 1 ]; then
|
||||
makeLeft $HEADINGNEXTPAGE $FILE
|
||||
fi
|
||||
|
||||
makeLeft $LEFT $FILE
|
||||
makeLeft $SPACE $FILE
|
||||
|
||||
bigLetters $FILE
|
||||
printf "GPG" >> $FILE
|
||||
resetLetters $FILE
|
||||
printf "\n" >> $FILE
|
||||
}
|
||||
|
||||
function insertFP() {
|
||||
if [ $(($FIELD % 2 )) -eq 0 ]; then
|
||||
SPACE=0
|
||||
else
|
||||
SPACE=$NEXTFIELDRIGHT
|
||||
fi
|
||||
|
||||
smallLetters $FILE
|
||||
if [ $PAGE -eq 1 ]; then
|
||||
makeLeft $NEXTPAGE $FILE
|
||||
fi
|
||||
makeLeft $LEFT $FILE
|
||||
makeLeft $(($SPACE + 2)) $FILE
|
||||
printf "$1 $2 $3 $4" >> $FILE
|
||||
resetLetters $FILE
|
||||
printf "\n" >> $FILE
|
||||
shift 4
|
||||
|
||||
smallLetters $FILE
|
||||
if [ $PAGE -eq 1 ]; then
|
||||
makeLeft $NEXTPAGE $FILE
|
||||
fi
|
||||
makeLeft $LEFT $FILE
|
||||
makeLeft $(($SPACE + 2)) $FILE
|
||||
printf "$1 $2 $3 $4" >> $FILE
|
||||
resetLetters $FILE
|
||||
printf "\n" >> $FILE
|
||||
shift 4
|
||||
|
||||
smallLetters $FILE
|
||||
if [ $PAGE -eq 1 ]; then
|
||||
makeLeft $NEXTPAGE $FILE
|
||||
fi
|
||||
makeLeft $LEFT $FILE
|
||||
makeLeft $(($SPACE + 2)) $FILE
|
||||
printf "$1 $2" >> $FILE
|
||||
resetLetters $FILE
|
||||
printf "\n" >> $FILE
|
||||
shift 2
|
||||
|
||||
smallLetters $FILE
|
||||
if [ $PAGE -eq 1 ]; then
|
||||
makeLeft $NEXTPAGE $FILE
|
||||
fi
|
||||
makeLeft $LEFT $FILE
|
||||
makeLeft $(($SPACE + 2)) $FILE
|
||||
|
||||
if [ -n "$EVENT" ]; then
|
||||
printf "$EVENT, $(date -I)" >> $FILE
|
||||
else
|
||||
printf "$(date -I)" >> $FILE
|
||||
fi
|
||||
}
|
||||
|
||||
source ../include/nixdorf
|
||||
init
|
||||
|
||||
makeNewline $TOP $FILE
|
||||
heading
|
||||
insertFP $@
|
||||
|
||||
printFile $FILE
|
||||
rm $FILE
|
@ -1,52 +0,0 @@
|
||||
#!/bin/bash
|
||||
FILE=/tmp/$RANDOM
|
||||
TOP=54
|
||||
NEXTFIELD=5
|
||||
LEFT=23
|
||||
AUTHLEFT=66
|
||||
DATELEFT=35
|
||||
MAXLENGTH=17
|
||||
|
||||
GIVENNAME=$1
|
||||
SURNAME=$2
|
||||
HOME=$3
|
||||
|
||||
|
||||
if [ ${#GIVENNAME} -gt $MAXLENGTH ] || [ ${#SURNAME} -gt $MAXLENGTH ] || [ ${#HOME} -gt $MAXLENGTH ]; then
|
||||
echo "MAXLENGTH EXCEEDED."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
source ../include/nixdorf
|
||||
init
|
||||
smallLetters $FILE
|
||||
printf "\x1b\x33\x0e" >> $FILE
|
||||
makeNewline $TOP $FILE
|
||||
makeLeft $LEFT $FILE
|
||||
printf "$GIVENNAME" >> $FILE
|
||||
|
||||
# Authority field
|
||||
makeNewline 2 $FILE
|
||||
makeLeft $AUTHLEFT $FILE
|
||||
printf "C3Reg" >> $FILE
|
||||
|
||||
makeNewline 3 $FILE
|
||||
makeLeft $LEFT $FILE
|
||||
printf "$SURNAME" >> $FILE
|
||||
|
||||
makeNewline $NEXTFIELD $FILE
|
||||
makeLeft $LEFT $FILE
|
||||
printf "$HOME" >> $FILE
|
||||
|
||||
makeNewline 5 $FILE
|
||||
makeLeft $DATELEFT $FILE
|
||||
|
||||
if [ -n "$EVENT" ]; then
|
||||
printf "/ $EVENT, $(date -I)" >> $FILE
|
||||
else
|
||||
printf "/ $(date -I)" >> $FILE
|
||||
fi
|
||||
|
||||
printFile $FILE
|
||||
rm $FILE
|
44
start_dialog
44
start_dialog
@ -5,9 +5,9 @@ export TERM=vt220
|
||||
|
||||
export DIALOGRC=dialogrc
|
||||
|
||||
LOCKFILE=/tmp/c3reglock
|
||||
LOCKFILE=/tmp/irolock
|
||||
TMP=/tmp/$RANDOM
|
||||
BT="C3Reg - v0.4"
|
||||
BT="Intergalactic Registration Office - v0.3"
|
||||
|
||||
cd $(dirname "$0")
|
||||
|
||||
@ -222,13 +222,13 @@ function printReg() {
|
||||
return 0
|
||||
}
|
||||
|
||||
function printC3RegStamp() {
|
||||
askForField "C3Reg stamp" "$1"
|
||||
function printIROStamp() {
|
||||
askForField "IRO stamp" "$1"
|
||||
if [ $? -eq 0 ]; then
|
||||
checkLockFile
|
||||
diaBox "Insert Passport" "Please insert passport (Visas) into the printer."
|
||||
cd "$1"
|
||||
./c3reg $FIELD
|
||||
./iro $FIELD
|
||||
cd ..
|
||||
rm $LOCKFILE
|
||||
return 0
|
||||
@ -254,7 +254,7 @@ function askForField() {
|
||||
==================\n
|
||||
"
|
||||
|
||||
layout[bounddipl]="
|
||||
layout[adafruit]="
|
||||
------------------\n
|
||||
| VISAS || VISAS |\n
|
||||
==================\n
|
||||
@ -264,20 +264,8 @@ function askForField() {
|
||||
==================\n
|
||||
"
|
||||
|
||||
layout[stapleddipl]="
|
||||
------------------\n
|
||||
| VISAS || VISAS |\n
|
||||
==================\n
|
||||
| 0 | 1 || 4 | 5 |\n
|
||||
|---|---||---|---|\n
|
||||
| 2 | 3 || 6 | 7 |\n
|
||||
==================\n
|
||||
"
|
||||
|
||||
|
||||
maxfield[jhp]=11
|
||||
maxfield[bounddipl]=7
|
||||
maxfield[stapleddipl]=7
|
||||
maxfield[adafruit]=7
|
||||
|
||||
askStr 2 "Select a field" "$text ${layout[$2]}" "" 18
|
||||
if [ $? -eq 1 ]; then
|
||||
@ -296,8 +284,7 @@ function askReg() {
|
||||
# Max length of passport fields
|
||||
declare -A MAXLENGTH
|
||||
MAXLENGTH[jhp]=25
|
||||
MAXLENGTH[bounddipl]=17
|
||||
MAXLENGTH[stapleddipl]=17
|
||||
MAXLENGTH[adafruit]=17
|
||||
|
||||
askStr ${MAXLENGTH[$1]} "Forename/Nickname" "Enter forename/nickname"
|
||||
if [ $? -eq 1 ]; then
|
||||
@ -319,7 +306,7 @@ function askReg() {
|
||||
|
||||
confirm=" Forename: $FNAME\n Surname: $SNAME\n Place: $PLANET"
|
||||
|
||||
ynBox "C3Reg Stamp" "Does this being want to have a C3Reg stamp?"
|
||||
ynBox "IRO Stamp" "Does this being want to have a IRO stamp?"
|
||||
if [ $? -eq 0 ]; then
|
||||
STAMP=true
|
||||
else
|
||||
@ -343,7 +330,7 @@ function menuFor() {
|
||||
dialog --backtitle "$BT" \
|
||||
--menu "Select ID type:" 14 40 3 \
|
||||
1 "Registration" \
|
||||
2 "C3Reg Stamp" \
|
||||
2 "IRO Stamp" \
|
||||
3 "GPG" \
|
||||
9 "Back" 2> $TMP
|
||||
|
||||
@ -354,14 +341,14 @@ function menuFor() {
|
||||
if [ $? -eq 0 ]; then
|
||||
printReg "$1"
|
||||
if [ "$STAMP" == "true" ]; then
|
||||
printC3RegStamp "$1"
|
||||
printIROStamp "$1"
|
||||
fi
|
||||
if [ -n "$FP" ]; then
|
||||
printGPG "$1"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
2) printC3RegStamp "$1"
|
||||
2) printIROStamp "$1"
|
||||
;;
|
||||
3) enterGPG
|
||||
if [ $? -eq 0 ]; then
|
||||
@ -409,8 +396,7 @@ while [ true ]; do
|
||||
dialog --backtitle "$BT" \
|
||||
--menu "Select ID type:" 10 40 3 \
|
||||
1 "Junghackerpass" \
|
||||
2 "Bound diplomatic passport" \
|
||||
3 "Stapled diplomatic passport" \
|
||||
2 "New Adafruit passport" \
|
||||
9 "Logout" 2> $TMP
|
||||
|
||||
if [ $? -eq 9 ]; then
|
||||
@ -423,9 +409,7 @@ while [ true ]; do
|
||||
case $TYPE in
|
||||
1) menuFor jhp
|
||||
;;
|
||||
2) menuFor bounddipl
|
||||
;;
|
||||
3) menuFor stapleddipl
|
||||
2) menuFor adafruit
|
||||
;;
|
||||
9) break
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user