From ef7aa24262b55f122bf0981d9feb7f380eae0f75 Mon Sep 17 00:00:00 2001 From: cirdeirf Date: Fri, 21 Jun 2019 18:00:51 +0200 Subject: [PATCH] Write vote numbers to file titled with date --- protokoll/fsrprotokoll.cls | 18 +++++++++++++++++- protokoll/protokoll.tex | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/protokoll/fsrprotokoll.cls b/protokoll/fsrprotokoll.cls index 5ac5b9a..fc2fd01 100644 --- a/protokoll/fsrprotokoll.cls +++ b/protokoll/fsrprotokoll.cls @@ -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 diff --git a/protokoll/protokoll.tex b/protokoll/protokoll.tex index 458aa46..e0321f7 100644 --- a/protokoll/protokoll.tex +++ b/protokoll/protokoll.tex @@ -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{}