initial
This commit is contained in:
commit
3bbdfaebf8
44
barcode-gen.tex
Normal file
44
barcode-gen.tex
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
% !TeX spellcheck = hu_HU
|
||||||
|
% !TeX encoding = UTF-8
|
||||||
|
% !TeX program = xelatex
|
||||||
|
|
||||||
|
\documentclass[a4paper]{article}
|
||||||
|
|
||||||
|
\usepackage[magyar]{babel}
|
||||||
|
\usepackage[utf8]{inputenc}
|
||||||
|
\usepackage[T1]{fontenc}
|
||||||
|
\usepackage{fontspec}
|
||||||
|
|
||||||
|
\usepackage{geometry}
|
||||||
|
\usepackage{tabularx}
|
||||||
|
\usepackage{pst-barcode}
|
||||||
|
\usepackage{csvsimple-l3}
|
||||||
|
\usepackage{graphicx}
|
||||||
|
|
||||||
|
% ---------
|
||||||
|
|
||||||
|
\geometry{left=10mm, top=10.7mm, right=10mm, bottom=10.7mm}
|
||||||
|
|
||||||
|
\newcommand{\mtbarcode}[5]{%
|
||||||
|
\begin{pspicture}(38.6mm,20.8mm)%
|
||||||
|
\rput[bc](3mm, 5mm){%
|
||||||
|
\psbarcode{#1}{height=0.5 width=0.5}{qrcode}%
|
||||||
|
}%
|
||||||
|
\rput[tl](17mm,17mm){%
|
||||||
|
\parbox[t]{0.8in}{\scriptsize\texttt{#2}\\\texttt{#1}\\\texttt{#4}\\\texttt{#5}%
|
||||||
|
}}%
|
||||||
|
\rput[br](35mm,2mm){\includegraphics[width=8mm]{logos/#3}}%
|
||||||
|
\end{pspicture}\hspace{-0.6mm}%
|
||||||
|
}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\pagenumbering{gobble}
|
||||||
|
|
||||||
|
\noindent\csvreader[
|
||||||
|
head to column names
|
||||||
|
]{\csvfile}{}{%
|
||||||
|
\noindent\mtbarcode{\barcode}{\name}{\logo}{\course}{\room}%
|
||||||
|
}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
11
gen_stickers.sh
Executable file
11
gen_stickers.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
CSVS=rooms/*.csv
|
||||||
|
|
||||||
|
for f in $CSVS
|
||||||
|
do
|
||||||
|
echo $f
|
||||||
|
xelatex "\\newcommand{\\csvfile}{$f} \\input{barcode-gen}"
|
||||||
|
bn=$(basename "$f")
|
||||||
|
mv barcode-gen.pdf pages/${bn}.pdf
|
||||||
|
done
|
||||||
BIN
logos/or.jpg
Normal file
BIN
logos/or.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
BIN
pages/teszt.csv.pdf
Normal file
BIN
pages/teszt.csv.pdf
Normal file
Binary file not shown.
2
rooms/teszt.csv
Normal file
2
rooms/teszt.csv
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
id,neptun,name,room,barcode,rand,logo
|
||||||
|
1,SAFCAT,Safranek,MF-I,SAFCAT77,77,or.jpg
|
||||||
|
Loading…
x
Reference in New Issue
Block a user