Write vote numbers to file titled with date

This commit is contained in:
cirdeirf 2019-06-21 18:00:51 +02:00
parent 27ddecd957
commit ef7aa24262
Signed by untrusted user who does not match committer: pius
GPG key ID: 130876AF66F40378
2 changed files with 18 additions and 2 deletions

View file

@ -1,3 +1,4 @@
% vim: ft=tex
\ProvidesClass{fsrprotokoll}[2018/03/05 Klasse fuer FSR Protokolle v0.2]
\LoadClass{scrartcl}
@ -125,7 +126,10 @@
\newcounter{x} % counter to add up two arguments
\newenvironment{vote} {%
\begin{lrbox}{\mybox}\begin{minipage}{.985\textwidth}
\newcommand*{\voteNumber}[1]{\textbf{\the\year\,/\,##1:}\\}%
\newcommand*{\voteNumber}[1]{%
\immediate\write\exportdata{\the\year/##1}%
\textbf{\the\year\,/\,##1:}\\%
}%
\newcommand*{\voteMoney}[1]{%
\ifthenelse{\equal{##1}{}} {\textbf{Antrag}} {\textbf{Finanzantrag}}%
}
@ -148,6 +152,8 @@
\newcommand*{\voteComment}[1]{##1}%
} {
\end{minipage}\end{lrbox}\fbox{\usebox{\mybox}}
\immediate\write\exportdata{
}%
}
% poll environment
@ -183,6 +189,16 @@
\noindent\makebox[6.5cm][l]{Sitzungsleitung} \hfill \noindent\makebox[6.5cm][l]{Protokoll}
}
\AtBeginDocument{%
\immediate\newwrite\exportdata%
\immediate\openout\exportdata=tmp.txt\relax
}
\AtEndDocument{%
\immediate\write18{mv tmp.txt \the\date.txt}
\immediate\closeout\exportdata%
}
% tokens
\newtoks\date
\newtoks\attendeesNumber

View file

@ -13,7 +13,7 @@
%%!sitzungsleitung,protokoll: Das Protokoll ist fertig und kann unterschrieben werden! :)
\date{} % DD.MM.YYYY
\date{} % DD-MM-YYYY
\attendeesNumber{} % Anzahl anwesender Mitglieder
\chairperson{}
\clerks{}