This commit is contained in:
Wiesner András 2025-12-15 10:36:22 +01:00
commit 3bbdfaebf8
6 changed files with 1172 additions and 0 deletions

44
barcode-gen.tex Normal file
View 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
View 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

1115
grid.pdf Normal file

File diff suppressed because it is too large Load Diff

BIN
logos/or.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
pages/teszt.csv.pdf Normal file

Binary file not shown.

2
rooms/teszt.csv Normal file
View File

@ -0,0 +1,2 @@
id,neptun,name,room,barcode,rand,logo
1,SAFCAT,Safranek,MF-I,SAFCAT77,77,or.jpg
1 id neptun name room barcode rand logo
2 1 SAFCAT Safranek MF-I SAFCAT77 77 or.jpg