diff --git a/csv/.csv b/csv/.csv deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/csv/2018-02-arbeitsstunden.csv b/csv/2018-02-arbeitsstunden.csv deleted file mode 100644 index bb38d299bbcb23e98e81ab753f2b2c5bae4bf9ea..0000000000000000000000000000000000000000 --- a/csv/2018-02-arbeitsstunden.csv +++ /dev/null @@ -1,21 +0,0 @@ -01.02.2018,Do,10.00,11.30,01:30,00:00, -02.02.2018,Fr,09.00,11.30,02:30,00:00, -05.02.2018,Mo,10.00,12.00,02:00,00:00, -06.02.2018,Di,10.00,10.30,00:30,00:00, -07.02.2018,Mi,12.00,14.00,02:00,00:00, -08.02.2018,Do,11.00,13.30,02:30,00:00, -09.02.2018,Fr,11.00,11.30,00:30,00:00, -12.02.2018,Mo,12.00,13.30,01:30,00:00, -13.02.2018,Di,11.00,13.30,02:30,00:00, -14.02.2018,Mi,09.00,12.00,03:00,00:00, -15.02.2018,Do,09.00,12.45,03:30,00:15, -16.02.2018,Fr,09.00,11.30,02:00,00:30, -19.02.2018,Mo,10.00,14.15,03:30,00:45,Urlaub -20.02.2018,Di,12.00,14.00,02:00,00:00, -21.02.2018,Mi,11.00,13.45,02:30,00:15, -22.02.2018,Do,09.00,11.00,02:00,00:00, -23.02.2018,Fr,11.00,12.00,01:00,00:00, -26.02.2018,Mo,10.00,11.00,01:00,00:00, -27.02.2018,Di,10.00,12.30,02:30,00:00, -28.02.2018,Mi,12.00,13.30,01:30,00:00, -Gesamt,,,,40:00,, diff --git a/csv/2018-03-arbeitsstunden.csv b/csv/2018-03-arbeitsstunden.csv deleted file mode 100644 index 203b2e23e0504ef8ed36850b0de5afe3952f73ba..0000000000000000000000000000000000000000 --- a/csv/2018-03-arbeitsstunden.csv +++ /dev/null @@ -1,23 +0,0 @@ -01.03.2018,Do,11.00,13.30,01:30,01:00, -02.03.2018,Fr,11.00,14.30,03:30,00:00, -05.03.2018,Mo,09.00,10.30,01:30,00:00, -06.03.2018,Di,10.00,12.30,02:30,00:00, -07.03.2018,Mi,11.00,14.30,02:30,01:00, -08.03.2018,Do,11.00,13.30,02:30,00:00, -09.03.2018,Fr,09.00,10.00,01:00,00:00, -12.03.2018,Mo,12.00,12.30,00:30,00:00, -13.03.2018,Di,10.00,11.15,01:00,00:15, -14.03.2018,Mi,10.00,12.45,02:30,00:15, -15.03.2018,Do,09.00,09.30,00:30,00:00, -16.03.2018,Fr,12.00,13.30,01:30,00:00, -19.03.2018,Mo,09.00,13.00,04:00,00:00, -20.03.2018,Di,11.00,12.00,01:00,00:00, -21.03.2018,Mi,10.00,14.00,03:30,00:30, -22.03.2018,Do,10.00,10.30,00:30,00:00, -23.03.2018,Fr,12.00,14.15,02:00,00:15, -26.03.2018,Mo,09.00,10.00,01:00,00:00, -27.03.2018,Di,10.00,12.00,02:00,00:00, -28.03.2018,Mi,10.00,11.00,01:00,00:00, -29.03.2018,Do,12.00,13.30,01:30,00:00, -30.03.2018,Fr,12.00,13.00,01:00,00:00, -Gesamt,,,,38:30,, diff --git a/csv/2018-04-arbeitsstunden.csv b/csv/2018-04-arbeitsstunden.csv deleted file mode 100644 index 91b94cefbf0c773736404b81c3e31acf69b29938..0000000000000000000000000000000000000000 --- a/csv/2018-04-arbeitsstunden.csv +++ /dev/null @@ -1,22 +0,0 @@ -02.04.2018,Mo,12.00,15.00,03:00,00:00, -03.04.2018,Di,10.00,13.30,03:30,00:00,Urlaub -04.04.2018,Mi,10.00,11.00,01:00,00:00, -05.04.2018,Do,09.00,10.00,01:00,00:00, -06.04.2018,Fr,12.00,13.30,01:30,00:00, -09.04.2018,Mo,11.00,13.45,02:00,00:45, -10.04.2018,Di,10.00,12.00,02:00,00:00, -11.04.2018,Mi,10.00,10.30,00:30,00:00, -12.04.2018,Do,10.00,13.30,02:30,01:00, -13.04.2018,Fr,10.00,13.45,03:30,00:15, -16.04.2018,Mo,10.00,12.30,02:30,00:00, -17.04.2018,Di,12.00,15.30,03:30,00:00, -18.04.2018,Mi,09.00,12.00,03:00,00:00, -19.04.2018,Do,10.00,13.00,03:00,00:00, -20.04.2018,Fr,10.00,11.30,01:30,00:00, -23.04.2018,Mo,09.00,10.30,01:30,00:00, -24.04.2018,Di,11.00,13.00,02:00,00:00, -25.04.2018,Mi,12.00,16.00,03:00,01:00,Urlaub -26.04.2018,Do,12.00,14.30,02:30,00:00, -27.04.2018,Fr,09.00,11.30,02:30,00:00, -30.04.2018,Mo,12.00,15.00,03:00,00:00, -Gesamt,,,,48:30,, diff --git a/csv/2018-05-arbeitsstunden.csv b/csv/2018-05-arbeitsstunden.csv deleted file mode 100644 index 9e87a4fb8fa54cef9b68e9a5845afc3119b73013..0000000000000000000000000000000000000000 --- a/csv/2018-05-arbeitsstunden.csv +++ /dev/null @@ -1,24 +0,0 @@ -01.05.2018,Di,11.00,12.30,01:30,00:00, -02.05.2018,Mi,10.00,12.00,02:00,00:00, -03.05.2018,Do,12.00,13.15,01:00,00:15, -04.05.2018,Fr,11.00,13.30,02:30,00:00, -07.05.2018,Mo,12.00,13.30,01:30,00:00, -08.05.2018,Di,09.00,12.30,03:30,00:00, -09.05.2018,Mi,11.00,12.00,01:00,00:00, -10.05.2018,Do,10.00,11.15,01:00,00:15, -11.05.2018,Fr,12.00,14.00,02:00,00:00, -14.05.2018,Mo,10.00,13.00,03:00,00:00,Urlaub -15.05.2018,Di,09.00,12.00,03:00,00:00, -16.05.2018,Mi,10.00,12.00,01:00,01:00, -17.05.2018,Do,09.00,11.30,02:30,00:00, -18.05.2018,Fr,09.00,11.00,02:00,00:00, -21.05.2018,Mo,10.00,11.00,00:30,00:30, -22.05.2018,Di,12.00,13.30,01:30,00:00, -23.05.2018,Mi,10.00,12.30,02:30,00:00, -24.05.2018,Do,12.00,14.30,02:30,00:00, -25.05.2018,Fr,12.00,14.00,02:00,00:00, -28.05.2018,Mo,12.00,15.45,03:00,00:45, -29.05.2018,Di,12.00,14.00,02:00,00:00, -30.05.2018,Mi,09.00,10.00,01:00,00:00, -31.05.2018,Do,09.00,10.30,01:30,00:00, -Gesamt,,,,44:00,, diff --git a/ecap-excel.xlsx b/ecap-excel.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..304343bca78a0e8f2a401612736430994effc64f Binary files /dev/null and b/ecap-excel.xlsx differ diff --git a/tex/arbeitsstundenzettel.tex b/input/arbeitsstundenzettel.tex similarity index 97% rename from tex/arbeitsstundenzettel.tex rename to input/arbeitsstundenzettel.tex index 3310bc0e6363cab72d453ae294a41600bf1d8808..71d2535706c5dca58d27c9a3cc34265023ec89ca 100644 --- a/tex/arbeitsstundenzettel.tex +++ b/input/arbeitsstundenzettel.tex @@ -20,7 +20,7 @@ \lhead{\includegraphics[height=2cm]{===INSTITUTELOGO===}} } \chead{} -\rhead{\includegraphics[height=2cm]{figures/===FACULTY===-logo}} +\rhead{\includegraphics[height=2cm]{../input/figures/===FACULTY===-logo}} \lfoot{} \cfoot{} \rfoot{} @@ -69,6 +69,7 @@ late after line=\\\midrule, late after last line=\\\bottomrule, filter not equal={\csvcolv}{}, + head=false, ] {===FILENAME===} {} diff --git a/figures/ecap-logo.pdf b/input/figures/ecap-logo.pdf similarity index 100% rename from figures/ecap-logo.pdf rename to input/figures/ecap-logo.pdf diff --git a/figures/fau-logo.pdf b/input/figures/fau-logo.pdf similarity index 100% rename from figures/fau-logo.pdf rename to input/figures/fau-logo.pdf diff --git a/figures/med-logo.pdf b/input/figures/med-logo.pdf similarity index 100% rename from figures/med-logo.pdf rename to input/figures/med-logo.pdf diff --git a/figures/nat-logo.pdf b/input/figures/nat-logo.pdf similarity index 100% rename from figures/nat-logo.pdf rename to input/figures/nat-logo.pdf diff --git a/figures/philtheo-logo.pdf b/input/figures/philtheo-logo.pdf similarity index 100% rename from figures/philtheo-logo.pdf rename to input/figures/philtheo-logo.pdf diff --git a/input/figures/physics-logo.pdf b/input/figures/physics-logo.pdf new file mode 100644 index 0000000000000000000000000000000000000000..dce7951ccd9e7ec3e26393332188475f49d7d5f2 Binary files /dev/null and b/input/figures/physics-logo.pdf differ diff --git a/figures/recht-logo.pdf b/input/figures/recht-logo.pdf similarity index 100% rename from figures/recht-logo.pdf rename to input/figures/recht-logo.pdf diff --git a/figures/rechtwirt-logo.pdf b/input/figures/rechtwirt-logo.pdf similarity index 100% rename from figures/rechtwirt-logo.pdf rename to input/figures/rechtwirt-logo.pdf diff --git a/figures/tech-logo.pdf b/input/figures/tech-logo.pdf similarity index 100% rename from figures/tech-logo.pdf rename to input/figures/tech-logo.pdf diff --git a/figures/wirt-logo.pdf b/input/figures/wirt-logo.pdf similarity index 100% rename from figures/wirt-logo.pdf rename to input/figures/wirt-logo.pdf diff --git a/input/institutes/astro b/input/institutes/astro new file mode 100644 index 0000000000000000000000000000000000000000..4c5a1d31dc6326441cd3f47055af25fe42b0729d --- /dev/null +++ b/input/institutes/astro @@ -0,0 +1,7 @@ +institute = "Astronomisches Institut" +street = "Sternwartstraße 7" +city = "Bamberg" +postcode = "96049" +faculty = "nat" +logo = "input/figures/astro-logo.pdf" + diff --git a/input/institutes/biophy b/input/institutes/biophy new file mode 100644 index 0000000000000000000000000000000000000000..eeb73c84862262a5cb306a5a8344d7c7d6b80bcc --- /dev/null +++ b/input/institutes/biophy @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Biophysik" +street = "Henkestraße 91" +city = "Erlangen" +postcode = "91052" +faculty = "nat" +logo = "input/figures/biophy-logo.pdf" + diff --git a/input/institutes/cs b/input/institutes/cs new file mode 100644 index 0000000000000000000000000000000000000000..c6c0894c5fd930c8eb4f907c7983bedaece55621 --- /dev/null +++ b/input/institutes/cs @@ -0,0 +1,7 @@ +institute = "Department Informatik" +street = "Martensstraße 3" +city = "Erlangen" +postcode = "91058" +faculty = "tech" +logo = "input/figures/cs-logo.pdf" + diff --git a/input/institutes/cs1 b/input/institutes/cs1 new file mode 100644 index 0000000000000000000000000000000000000000..8a84b3d2bf13f0ec435f38ba12feaa2c069e9fc9 --- /dev/null +++ b/input/institutes/cs1 @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Informatik 1 (IT-Sicherheitsinfrastrukturen)" +street = "Martensstraße 3" +city = "Erlangen" +postcode = "91058" +faculty = "tech" +logo = "input/figures/cs-logo.pdf" + diff --git a/input/institutes/cs10 b/input/institutes/cs10 new file mode 100644 index 0000000000000000000000000000000000000000..26b5242d45a8ca272f7a52e21eae0a130c804475 --- /dev/null +++ b/input/institutes/cs10 @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Informatik 10 (Systemsimulation)" +street = "Cauerstraße 11" +city = "Erlangen" +postcode = "91058" +faculty = "tech" +logo = "input/figures/cs-logo.pdf" + diff --git a/input/institutes/cs11 b/input/institutes/cs11 new file mode 100644 index 0000000000000000000000000000000000000000..9c15e2543f94c680a4d878ea503b8b9ad0dea0a4 --- /dev/null +++ b/input/institutes/cs11 @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Informatik 11 (Software Engineering)" +street = "Martensstraße 3" +city = "Erlangen" +postcode = "91058" +faculty = "tech" +logo = "input/figures/cs-logo.pdf" + diff --git a/input/institutes/cs12 b/input/institutes/cs12 new file mode 100644 index 0000000000000000000000000000000000000000..f855c6692982348f5dea53cabac1cb263c346655 --- /dev/null +++ b/input/institutes/cs12 @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Informatik 12 (Hardware-Software-Co-Design)" +street = "Cauerstraße 11" +city = "Erlangen" +postcode = "91058" +faculty = "tech" +logo = "input/figures/cs-logo.pdf" + diff --git a/input/institutes/cs13 b/input/institutes/cs13 new file mode 100644 index 0000000000000000000000000000000000000000..6b5194bb69efdac7228e5a1972bd1c5ec2ea7edd --- /dev/null +++ b/input/institutes/cs13 @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Informatik 13 (Angewandte Kryptographie)" +street = "Fürther Straße 246C" +city = "Nürnberg" +postcode = "90429" +faculty = "tech" +logo = "input/figures/cs-logo.pdf" + diff --git a/input/institutes/cs14 b/input/institutes/cs14 new file mode 100644 index 0000000000000000000000000000000000000000..607770eed16457af3de27b7dac326bdd9776e0a9 --- /dev/null +++ b/input/institutes/cs14 @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Informatik 14 (Maschinelles Lernen und Datenanalytik)" +street = "Carl-Thiersch-Straße 2b" +city = "Erlangen" +postcode = "91052" +faculty = "tech" +logo = "input/figures/cs-logo.pdf" + diff --git a/input/institutes/cs2 b/input/institutes/cs2 new file mode 100644 index 0000000000000000000000000000000000000000..37e21cea63cb55a37d96b2519b3054c665125891 --- /dev/null +++ b/input/institutes/cs2 @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Informatik 2 (Programmiersysteme)" +street = "Martensstraße 3" +city = "Erlangen" +postcode = "91058" +faculty = "tech" +logo = "input/figures/cs-logo.pdf" + diff --git a/input/institutes/cs3 b/input/institutes/cs3 new file mode 100644 index 0000000000000000000000000000000000000000..8857b6a31d67099bd80c2a6f622013ce85ee5476 --- /dev/null +++ b/input/institutes/cs3 @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Informatik 3 (Rechnerarchitektur)" +street = "Martensstraße 3" +city = "Erlangen" +postcode = "91058" +faculty = "tech" +logo = "input/figures/cs-logo.pdf" + diff --git a/input/institutes/cs4 b/input/institutes/cs4 new file mode 100644 index 0000000000000000000000000000000000000000..8f839f8423b38ffd5b133edbda263169ffdde83d --- /dev/null +++ b/input/institutes/cs4 @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Informatik 4 (Verteilte Systeme und Betriebssysteme)" +street = "Martensstraße 1" +city = "Erlangen" +postcode = "91058" +faculty = "tech" +logo = "input/figures/cs-logo.pdf" + diff --git a/input/institutes/cs5 b/input/institutes/cs5 new file mode 100644 index 0000000000000000000000000000000000000000..c4c07276cccb1fa4be0d1f80f752ba9ff0cc3dca --- /dev/null +++ b/input/institutes/cs5 @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Informatik 5 (Mustererkennung)" +street = "Martensstraße 3" +city = "Erlangen" +postcode = "91058" +faculty = "tech" +logo = "input/figures/cs-logo.pdf" + diff --git a/input/institutes/cs6 b/input/institutes/cs6 new file mode 100644 index 0000000000000000000000000000000000000000..7197987a63d8f450fc94f2bc845d45bf8b41a2c9 --- /dev/null +++ b/input/institutes/cs6 @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Informatik 6 (Datenmanagement)" +street = "Martensstraße 3" +city = "Erlangen" +postcode = "91058" +faculty = "tech" +logo = "input/figures/cs-logo.pdf" + diff --git a/input/institutes/cs7 b/input/institutes/cs7 new file mode 100644 index 0000000000000000000000000000000000000000..3c49c543e199dcd611c3f1f265f8bb96abbb4e3f --- /dev/null +++ b/input/institutes/cs7 @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Informatik 7 (Rechnernetze und Kommunikationssysteme)" +street = "Martensstraße 3" +city = "Erlangen" +postcode = "91058" +faculty = "tech" +logo = "input/figures/cs-logo.pdf" + diff --git a/input/institutes/cs8 b/input/institutes/cs8 new file mode 100644 index 0000000000000000000000000000000000000000..22ca93dc9fe9e00dcbacb974770d3117fe6a6f1d --- /dev/null +++ b/input/institutes/cs8 @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Informatik 8 (Theoretische Informatik)" +street = "Martensstraße 3" +city = "Erlangen" +postcode = "91058" +faculty = "tech" +logo = "input/figures/cs-logo.pdf" + diff --git a/input/institutes/cs9 b/input/institutes/cs9 new file mode 100644 index 0000000000000000000000000000000000000000..1aaccda9595240ce6eeb1bc7f66aed446597f39d --- /dev/null +++ b/input/institutes/cs9 @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Informatik 9 (Graphische Datenverarbeitung)" +street = "Cauerstraße 11" +city = "Erlangen" +postcode = "91058" +faculty = "tech" +logo = "input/figures/cs-logo.pdf" + diff --git a/input/institutes/didaktik b/input/institutes/didaktik new file mode 100644 index 0000000000000000000000000000000000000000..f034a762b848ff3b3477e9bad2bc16b2866b8512 --- /dev/null +++ b/input/institutes/didaktik @@ -0,0 +1,7 @@ +institute = "Professur für Didaktik der Physik" +street = "Staudtstraße 7" +city = "Erlangen" +postcode = "91058" +faculty = "nat" +logo = "input/figures/didaktik-logo.pdf" + diff --git a/institutes/ecap b/input/institutes/ecap similarity index 79% rename from institutes/ecap rename to input/institutes/ecap index 85cc6e10a3fc512ebf648b33546889f3a2fc1a67..d8a9deb38a2364f1d6f366d5f4f134fd1dd848c5 100644 --- a/institutes/ecap +++ b/input/institutes/ecap @@ -3,5 +3,5 @@ street = "Erwin-Rommel-Straße 1" city = "Erlangen" postcode = "91058" faculty = "nat" -logo = "figures/ecap-logo.pdf" +logo = "input/figures/ecap-logo.pdf" diff --git a/input/institutes/fkp b/input/institutes/fkp new file mode 100644 index 0000000000000000000000000000000000000000..ec8b5b626764505ae5e9928317ef66b9323cddc2 --- /dev/null +++ b/input/institutes/fkp @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Festkörperphysik" +street = "Staudtstraße 7" +city = "Erlangen" +postcode = "91058" +faculty = "nat" +logo = "input/figures/fkp-logo.pdf" + diff --git a/input/institutes/kristall b/input/institutes/kristall new file mode 100644 index 0000000000000000000000000000000000000000..1b16ee36858f1f7484b75cbd6a424e6fb7573c4d --- /dev/null +++ b/input/institutes/kristall @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Kristallographie und Strukturphysik" +street = "Staudtstraße 3" +city = "Erlangen" +postcode = "91058" +faculty = "nat" +logo = "input/figures/kristall-logo.pdf" + diff --git a/input/institutes/lap b/input/institutes/lap new file mode 100644 index 0000000000000000000000000000000000000000..ee3289431ffddaae5fab9db679075958e4c637d0 --- /dev/null +++ b/input/institutes/lap @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Angewandte Physik" +street = "Staudtstraße 7" +city = "Erlangen" +postcode = "91058" +faculty = "nat" +logo = "input/figures/lap-logo.pdf" + diff --git a/input/institutes/laser b/input/institutes/laser new file mode 100644 index 0000000000000000000000000000000000000000..86f0a0c448991e8a985a7eb6999ac6f3f19277a9 --- /dev/null +++ b/input/institutes/laser @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Laserphysik" +street = "Staudtstraße 1" +city = "Erlangen" +postcode = "91058" +faculty = "nat" +logo = "input/figures/laser-logo.pdf" + diff --git a/input/institutes/mpl b/input/institutes/mpl new file mode 100644 index 0000000000000000000000000000000000000000..3547b3280d458372f8482280898def43be7687b1 --- /dev/null +++ b/input/institutes/mpl @@ -0,0 +1,7 @@ +institute = "Max-Planck-Institut für die Physik des Lichts" +street = "Staudtstraße 2" +city = "Erlangen" +postcode = "91058" +faculty = "nat" +logo = "input/figures/mpl-logo.pdf" + diff --git a/input/institutes/physics b/input/institutes/physics new file mode 100644 index 0000000000000000000000000000000000000000..e2bd2c330d8ecf8f97e6810364f5e64c3f2c7593 --- /dev/null +++ b/input/institutes/physics @@ -0,0 +1,7 @@ +institute = "Department Physik" +street = "Staudtstraße 7" +city = "Erlangen" +postcode = "91058" +faculty = "nat" +logo = "input/figures/physics-logo.pdf" + diff --git a/input/institutes/supra b/input/institutes/supra new file mode 100644 index 0000000000000000000000000000000000000000..01c3ec36e8083c12169066be37a59c8f3c04e249 --- /dev/null +++ b/input/institutes/supra @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Experimentalphysik (Supraleitung)" +street = "Staudtstraße 7" +city = "Erlangen" +postcode = "91058" +faculty = "nat" +logo = "input/figures/supra-logo.pdf" + diff --git a/input/institutes/theo1 b/input/institutes/theo1 new file mode 100644 index 0000000000000000000000000000000000000000..8ee97f47448ff50581c56305ca014acfa0052d36 --- /dev/null +++ b/input/institutes/theo1 @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Theoretische Physik 1" +street = "Staudtstraße 7" +city = "Erlangen" +postcode = "91058" +faculty = "nat" +logo = "input/figures/theo1-logo.pdf" + diff --git a/input/institutes/theo2 b/input/institutes/theo2 new file mode 100644 index 0000000000000000000000000000000000000000..40742908f5b464a2080d0ef3015d451f6efd1a82 --- /dev/null +++ b/input/institutes/theo2 @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Theoretische Physik 2" +street = "Staudtstraße 7" +city = "Erlangen" +postcode = "91058" +faculty = "nat" +logo = "input/figures/theo2-logo.pdf" + diff --git a/input/institutes/theo3 b/input/institutes/theo3 new file mode 100644 index 0000000000000000000000000000000000000000..c3ef8d81a0d6612edabe48a17c9c99260aa826f2 --- /dev/null +++ b/input/institutes/theo3 @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Theoretische Physik 3 (Quantengravitation)" +street = "Staudtstraße 7" +city = "Erlangen" +postcode = "91058" +faculty = "nat" +logo = "input/figures/theo3-logo.pdf" + diff --git a/input/institutes/theo4 b/input/institutes/theo4 new file mode 100644 index 0000000000000000000000000000000000000000..fb81cde03a9873c08dedc8ba9b5aaf73106d4259 --- /dev/null +++ b/input/institutes/theo4 @@ -0,0 +1,7 @@ +institute = "Lehrstuhl für Theoretische Festkörperphysik" +street = "Staudtstraße 7" +city = "Erlangen" +postcode = "91058" +faculty = "nat" +logo = "input/figures/theo4-logo.pdf" + diff --git a/institutes/cs b/institutes/cs deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/institutes/cs1 b/institutes/cs1 deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/institutes/cs10 b/institutes/cs10 deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/institutes/cs11 b/institutes/cs11 deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/institutes/cs12 b/institutes/cs12 deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/institutes/cs2 b/institutes/cs2 deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/institutes/cs3 b/institutes/cs3 deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/institutes/cs4 b/institutes/cs4 deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/institutes/cs5 b/institutes/cs5 deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/institutes/cs6 b/institutes/cs6 deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/institutes/cs7 b/institutes/cs7 deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/institutes/cs8 b/institutes/cs8 deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/institutes/cs9 b/institutes/cs9 deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/institutes/fkp b/institutes/fkp deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/institutes/inf b/institutes/inf deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/institutes/lap b/institutes/lap deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/institutes/mpl b/institutes/mpl deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/institutes/physics b/institutes/physics deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/institutes/theo1 b/institutes/theo1 deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/institutes/theo2 b/institutes/theo2 deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/institutes/theo3 b/institutes/theo3 deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/output/lammermann-felix_2019-01_arbeitsstunden.zip b/output/lammermann-felix_2019-01_arbeitsstunden.zip new file mode 100644 index 0000000000000000000000000000000000000000..4c579ee8e51798d7af1386b50e21023def0dfed6 Binary files /dev/null and b/output/lammermann-felix_2019-01_arbeitsstunden.zip differ diff --git a/output/lammermann-felix_2019-02_arbeitsstunden.zip b/output/lammermann-felix_2019-02_arbeitsstunden.zip new file mode 100644 index 0000000000000000000000000000000000000000..4412de0bcc97c8fe3b3af061055f265ca8cb1ad4 Binary files /dev/null and b/output/lammermann-felix_2019-02_arbeitsstunden.zip differ diff --git a/output/lammermann-felix_2019-03_arbeitsstunden.zip b/output/lammermann-felix_2019-03_arbeitsstunden.zip new file mode 100644 index 0000000000000000000000000000000000000000..2977661c6ed903c34624e98757273b95989b3dd9 Binary files /dev/null and b/output/lammermann-felix_2019-03_arbeitsstunden.zip differ diff --git a/output/lammermann-felix_2019-04_arbeitsstunden.zip b/output/lammermann-felix_2019-04_arbeitsstunden.zip new file mode 100644 index 0000000000000000000000000000000000000000..29e6688ef2d594f2a7a2ad96a39b123409422844 Binary files /dev/null and b/output/lammermann-felix_2019-04_arbeitsstunden.zip differ diff --git a/output/lammermann-felix_2019-05_arbeitsstunden.zip b/output/lammermann-felix_2019-05_arbeitsstunden.zip new file mode 100644 index 0000000000000000000000000000000000000000..ee09561625942ee9234d047f893077d7bd539420 Binary files /dev/null and b/output/lammermann-felix_2019-05_arbeitsstunden.zip differ diff --git a/pdf/2018-02-arbeitsstunden.pdf b/pdf/2018-02-arbeitsstunden.pdf deleted file mode 100644 index efedbd3d81ce182fe99b6ce3f7baf3e9df4952eb..0000000000000000000000000000000000000000 Binary files a/pdf/2018-02-arbeitsstunden.pdf and /dev/null differ diff --git a/pdf/2018-03-arbeitsstunden.pdf b/pdf/2018-03-arbeitsstunden.pdf deleted file mode 100644 index d200437df783473e2b4561906a32eeb0f715e1eb..0000000000000000000000000000000000000000 Binary files a/pdf/2018-03-arbeitsstunden.pdf and /dev/null differ diff --git a/pdf/2018-04-arbeitsstunden.pdf b/pdf/2018-04-arbeitsstunden.pdf deleted file mode 100644 index ca14d9ceb80b262adf3913e99b7c19e09a1a6830..0000000000000000000000000000000000000000 Binary files a/pdf/2018-04-arbeitsstunden.pdf and /dev/null differ diff --git a/pdf/2018-05-arbeitsstunden.pdf b/pdf/2018-05-arbeitsstunden.pdf deleted file mode 100644 index 81490fcf99680dabf9e7b64b2cfce97805ff6d5d..0000000000000000000000000000000000000000 Binary files a/pdf/2018-05-arbeitsstunden.pdf and /dev/null differ diff --git a/python/__pycache__/holidays.cpython-36.pyc b/python/__pycache__/holidays.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f78dd079ffd1626133f22a25f4defa76f32317a5 Binary files /dev/null and b/python/__pycache__/holidays.cpython-36.pyc differ diff --git a/python/__pycache__/holidays.cpython-37.pyc b/python/__pycache__/holidays.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7912424349627d006c9503b114b888f71426bf23 Binary files /dev/null and b/python/__pycache__/holidays.cpython-37.pyc differ diff --git a/python/arbeitsstundenzettel.ipynb b/python/arbeitsstundenzettel.ipynb deleted file mode 100644 index b87dc0bd23c8e36994a6683e20955b719a3ec941..0000000000000000000000000000000000000000 --- a/python/arbeitsstundenzettel.ipynb +++ /dev/null @@ -1,600 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import scipy as sp\n", - "import datetime as dt\n", - "import holidays\n", - "import csv\n", - "import random\n", - "import itertools\n", - "import os\n", - "import os.path\n", - "import subprocess\n", - "import locale\n", - "import calendar as cal\n", - "\n", - "locale = locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "def diff_full_months(start, end):\n", - "\n", - " start = start\n", - " end = end + dt.timedelta( days = 1 )\n", - " \n", - " full_months = (end.year - start.year) * 12 + end.month - start.month\n", - " \n", - " if start.day > end.day:\n", - " full_months = full_months - 1\n", - " \n", - " return full_months\n", - "\n", - "def diff_months(start, end):\n", - " \n", - " months = ((end + dt.timedelta( days = 1 )) - start).days / 30\n", - " \n", - " return months\n", - "\n", - "def diff_weeks(start, end):\n", - " \n", - " weeks = ((end + dt.timedelta( days = 1 )) - start).days / 7\n", - " \n", - " return weeks\n", - "\n", - "def get_calendar_week(date):\n", - " \n", - " calendar_week = date.isocalendar()[1]\n", - " \n", - " return int(calendar_week)\n", - "\n", - "def float2time(float_time):\n", - " \n", - " time = '{0:02.0f}.{1:02.0f}'.format(*divmod(float_time * 60, 60))\n", - " \n", - " return time\n", - "\n", - "def float2duration(float_time):\n", - " \n", - " time = '{0:02.0f}:{1:02.0f}'.format(*divmod(float(float_time) * 60, 60))\n", - " \n", - " return time\n", - "\n", - "def check_day_hours(list_of_workinghours, workingday_list_position, timestep):\n", - " \n", - " if list_of_workinghours[workingday_list_position][7] + timestep <= 6:\n", - " return True\n", - " else:\n", - " return False\n", - "\n", - "def check_week_hours(list_of_workinghours, workingday_list_position, timestep, list_of_filled_workinghours):\n", - " \n", - " current_calendar_week = get_calendar_week(list_of_workinghours[workingday_list_position][0])\n", - " list_of_affected_days = [same_calendar_week for same_calendar_week in list_of_workinghours if get_calendar_week(same_calendar_week[0]) == current_calendar_week]\n", - " list_of_other_affected_days = [same_calendar_week for same_calendar_week in list_of_filled_workinghours if get_calendar_week(same_calendar_week[0]) == current_calendar_week]\n", - " \n", - " for a in range(len(list_of_other_affected_days)):\n", - " list_of_affected_days.append(list_of_other_affected_days[a])\n", - " \n", - " week_sum = 0\n", - " for x in range(len(list_of_affected_days)):\n", - " week_sum = week_sum + list_of_affected_days[x][7]\n", - "\n", - " if week_sum + timestep <= 19:\n", - " return True\n", - " else:\n", - " return False\n", - "\n", - "def move_filled_day(list_of_workinghours, workingday_list_position, list_of_filled_workinghours):\n", - " \n", - " list_of_filled_workinghours.append(list_of_workinghours[workingday_list_position])\n", - " list_of_workinghours = [unfilled_day for unfilled_day in list_of_workinghours if unfilled_day not in list_of_filled_workinghours]\n", - "\n", - " return list_of_workinghours, list_of_filled_workinghours\n", - " print(\"Day \" + list_of_workinghours[workingday_list_position][0].strftime(\"%Y-%m-%d\") + \" full and moved.\")\n", - " \n", - "def move_filled_week(list_of_workinghours, workingday_list_position, list_of_filled_workinghours):\n", - " \n", - " current_calendar_week = get_calendar_week(list_of_workinghours[workingday_list_position][0])\n", - " list_of_affected_days = [same_calendar_week for same_calendar_week in list_of_workinghours if get_calendar_week(same_calendar_week[0]) == current_calendar_week]\n", - " \n", - " for x in range(len(list_of_affected_days)):\n", - " list_of_filled_workinghours.append(list_of_affected_days[x])\n", - " list_of_workinghours = [unfilled_day for unfilled_day in list_of_workinghours if unfilled_day not in list_of_filled_workinghours]\n", - "\n", - " return list_of_workinghours, list_of_filled_workinghours\n", - " print(\"Week \" + str(current_calendar_week) + \" full.\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "def make_up_workinghours(month, start, end, workhours_per_week, workdays_per_week, already_worked = 0):\n", - " \n", - " full_months = diff_full_months(start, end)\n", - " months = diff_months(start, end)\n", - " weeks = diff_weeks(start, end)\n", - " days = (end - start).days + 1\n", - " workdays_total = int(workdays_per_week * weeks)\n", - " workhours_total = int(workhours_per_week * weeks)\n", - " workhours_per_month = int(workhours_per_week * weeks / months)\n", - " holidayhours_total = int(1 / 3 * workhours_per_week * full_months)\n", - " holidaydays_total = int(1 / 3 * workdays_per_week * full_months + 0.5)\n", - "\n", - " print(\"\")\n", - " print(\"Anzahl ganzer Monate: \", full_months)\n", - " print(\"Anzahl Monate: \", round(months,2))\n", - " print(\"Anzahl Wochen: \", round(weeks,2))\n", - " print(\"Anzahl Tagen: \", int(days))\n", - " print(\"Arbeitstage (Gesamt): \", workdays_total)\n", - " print(\"Arbeitsstunden (Gesamt): \", workhours_total)\n", - " print(\"Arbeitsstunden pro Monat (Ø):\", workhours_per_month)\n", - " print(\"Urlaubsanspruch in Stunden: \", holidayhours_total)\n", - " print(\"Urlaubstage: \", holidaydays_total)\n", - " print(\"\")\n", - " \n", - " full_date_list = [start + dt.timedelta( days = x ) for x in range(0, days)]\n", - " holiday_list = holidays.Holidays(start.year, 'BY').get_holiday_list()[0] + holidays.Holidays(end.year, 'BY').get_holiday_list()[0]\n", - "\n", - " for retry in range(10000):\n", - " \n", - " if (workhours_per_week <= 15 and workdays_per_week <= 4):\n", - " date_list = [day for day in full_date_list if day.weekday() < 5]\n", - " date_list = [day for day in date_list if day not in holiday_list]\n", - " elif (workhours_per_week <= 19 and workdays_per_week <= 5):\n", - " date_list = [day for day in full_date_list if day.weekday() < 6]\n", - " date_list = [day for day in date_list if day not in holiday_list]\n", - " elif (workhours_per_week <= 19):\n", - " print(\"Too many workdays per week given!\")\n", - " print(\"\")\n", - " break\n", - " else:\n", - " print(\"Too many workhours per week given!\")\n", - " print(\"\")\n", - " break\n", - "\n", - " made_up_workinghours = []\n", - " make_up_workinghours = []\n", - " \n", - " for i in range(len(date_list)):\n", - " \n", - " workingday = date_list[i]\n", - " make_up_start_time = random.randint(9,12)\n", - " make_up_end_time = random.randint(16,20)\n", - " make_up_duration = 0.0\n", - " make_up_break = sp.random.choice([0, 0.25, 0.5, 0.75, 1.0], p=[0.8, 0.05, 0.05, 0.05, 0.05])\n", - " \n", - " make_up_workinghours.append([workingday])\n", - " make_up_workinghours[i].append(workingday.strftime(\"%d.%m.%Y\"))\n", - " make_up_workinghours[i].append(cal.day_abbr[workingday.weekday()])\n", - " make_up_workinghours[i].append(make_up_start_time)\n", - " make_up_workinghours[i].append(float2time(make_up_start_time))\n", - " make_up_workinghours[i].append(make_up_end_time)\n", - " make_up_workinghours[i].append(float2time(make_up_end_time))\n", - " make_up_workinghours[i].append(make_up_duration)\n", - " make_up_workinghours[i].append(float2duration(make_up_duration))\n", - " make_up_workinghours[i].append(make_up_break)\n", - " make_up_workinghours[i].append(float2duration(make_up_break))\n", - " make_up_workinghours[i].append('')\n", - " \n", - " used_workinghours = 0\n", - " timestep = 0.5\n", - "\n", - " while (used_workinghours < workhours_total):\n", - " \n", - " if (used_workinghours + timestep > workhours_total):\n", - " timestep = timestep / 2\n", - "\n", - " if (len(make_up_workinghours) == 0):\n", - " break\n", - " \n", - " random_workingday = random.randint( 0, len(make_up_workinghours) - 1 ) \n", - " check_week = check_week_hours(make_up_workinghours, random_workingday, timestep, made_up_workinghours)\n", - " check_day = check_day_hours(make_up_workinghours, random_workingday, timestep)\n", - " \n", - " if (check_week == True and check_day == True):\n", - " \n", - " make_up_duration = make_up_workinghours[random_workingday][7] + timestep\n", - "\n", - " make_up_workinghours[random_workingday][7] = make_up_duration\n", - " make_up_workinghours[random_workingday][8] = float2duration(make_up_duration)\n", - "\n", - " used_workinghours = used_workinghours + timestep\n", - " \n", - " elif (check_week == True and check_day == False):\n", - " \n", - " make_up_workinghours, made_up_workinghours = move_filled_day(make_up_workinghours, random_workingday, made_up_workinghours)\n", - " \n", - " else:\n", - " \n", - " make_up_workinghours, made_up_workinghours = move_filled_week(make_up_workinghours, random_workingday, made_up_workinghours)\n", - " \n", - " if (used_workinghours == workhours_total):\n", - " \n", - " remaining_filled_days = [filled_day for filled_day in make_up_workinghours if filled_day[7] != 0] \n", - " \n", - " for j in range(len(remaining_filled_days)):\n", - " \n", - " made_up_workinghours.append(remaining_filled_days[j])\n", - " \n", - " break\n", - " \n", - " for i in range(len(made_up_workinghours)):\n", - " \n", - " made_up_start_time = made_up_workinghours[i][3]\n", - " made_up_duration = made_up_workinghours[i][7]\n", - " made_up_break = made_up_workinghours[i][9]\n", - "\n", - " made_up_end_time = made_up_start_time + made_up_duration + made_up_break\n", - " \n", - " made_up_workinghours[i][5] = made_up_end_time\n", - " made_up_workinghours[i][6] = float2time(made_up_end_time)\n", - " \n", - " used_holidayhours = 0\n", - "\n", - " while (used_holidayhours < holidayhours_total):\n", - "\n", - " random_holidayday = random.randint( 0, len(made_up_workinghours) - 1 )\n", - "\n", - " if (made_up_workinghours[random_holidayday][7] >= holidayhours_total / holidaydays_total - 0.5):\n", - "\n", - " made_up_workinghours[random_holidayday][11] = \"Urlaub\"\n", - " used_holidayhours = used_holidayhours + made_up_workinghours[random_holidayday][7]\n", - " \n", - " if (used_holidayhours == holidayhours_total):\n", - " \n", - " break\n", - " \n", - " if (used_workinghours == workhours_total and used_holidayhours == holidayhours_total):\n", - " \n", - " break\n", - " \n", - " if retry == 0:\n", - " print(\n", - "'''I finished making up working hours for you.\n", - "You can find the data in the csv-folder.'''\n", - " )\n", - " print(\"\")\n", - " elif retry + 1 < 10000:\n", - " print(\n", - "'''I ran into some trouble making up working hours.\n", - "I retried ''' + str(retry + 1) + ''' times, but now I finished.\n", - "You can find the data in the csv-folder.'''\n", - " )\n", - " print(\"\")\n", - " elif retry + 1 >= 10000:\n", - " print(\n", - "'''I ran into some trouble making up working hours.\n", - "I retried ''' + str(retry + 1) + ''' times and couldn't do it!\n", - "I have no idea what happend, please restart me!'''\n", - " )\n", - " print(\"\")\n", - "\n", - " return made_up_workinghours" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# User Input Vertragsdaten\n", - "\n", - "print(\"\")\n", - "start_date = input(\n", - "'''What is the start date of your contract? (dd.mm.yyyy)\n", - "> '''\n", - ")\n", - "end_date = input(\n", - "'''What is the end date of your contract? (dd.mm.yyyy)\n", - "> '''\n", - ")\n", - "\n", - "start = dt.datetime.strptime(start_date, \"%d.%m.%Y\")\n", - "end = dt.datetime.strptime(end_date, \"%d.%m.%Y\")\n", - "\n", - "print(\"\")\n", - "workhours_per_week = float(input(\n", - "'''How many hours do you have to work per week?\n", - "> '''\n", - "))\n", - "workdays_per_week = float(input(\n", - "'''How many days do you have to work per week?\n", - "> '''\n", - "))\n", - "\n", - "# User Input Persönliche Daten\n", - "\n", - "print(\"\")\n", - "name = input(\n", - "'''What is your last name?\n", - "> '''\n", - ")\n", - "firstname = input(\n", - "'''What is your first name(s)?\n", - "> '''\n", - ")\n", - "dateofbirth = input(\n", - "'''What is your date of birth? (dd.mm.yyyy)\n", - "> '''\n", - ")\n", - "\n", - "# User Input Institut\n", - "\n", - "print(\"\")\n", - "instituteabbr = input(\n", - "'''Please specify your institute?\n", - "You may use one of the following shortcodes:\n", - "\n", - " physics: Department Physik\n", - " ecap: Erlangen Centre for Astroparticle Physics\n", - " lap: Lehrstuhl für Angewandt Physik\n", - "\n", - "> '''\n", - ")\n", - "\n", - "list_of_implemented_institutes = [f for f in os.listdir(\"institutes/\") if os.path.isfile(os.path.join(\"institutes/\", f))]\n", - "\n", - "if instituteabbr in list_of_implemented_institutes:\n", - " with open('institutes/' + instituteabbr, 'r') as institutefile:\n", - " instituteinfo = institutefile.read()\n", - " exec(instituteinfo)\n", - "else:\n", - " print(\"\")\n", - " print(\"Your institute is not registered yet, please provide me with some details.\")\n", - " institute = input(\n", - "'''Name of your institute?\n", - "> '''\n", - " )\n", - " street = input(\n", - "'''Street of your institute?\n", - "> '''\n", - " )\n", - " city = input(\n", - "'''City of your institute?\n", - "> '''\n", - " )\n", - " postcode = input(\n", - "'''Post code of your institute?\n", - "> '''\n", - " )\n", - " faculty = input(\n", - "'''Which faculty does your institute belong to?\n", - "Currently implemented are:\n", - "\n", - " fau: Friedrich-Alexander-University\n", - " philtheo: Faculty of Humanities, Social Sciences and Theology\n", - " recht: Faculty of Law\n", - " wirt: Faculty of Business and Economics\n", - " rechtwirt: Faculty of Business, Economics and Law\n", - " med: Faculty of Medicine\n", - " nat: Faculty of Sciences\n", - " tech: Faculty of Engeneering\n", - " \n", - "> '''\n", - " )\n", - " wanna_give_me_a_logo = input(\n", - "'''Do you want to specify a file for your own logo? (yes/no)\n", - "> ''')\n", - " if (wanna_give_me_a_logo == \"y\" or wanna_give_me_a_logo == \"yes\"):\n", - " logo = input(\n", - "'''Where can I find the logo-file?\n", - "> '''\n", - " )\n", - " else:\n", - " print(\"I will proceed without an institute logo.\")\n", - "\n", - "# User Input Arbeitsstunden\n", - "\n", - "print(\"\")\n", - "filename = input(\n", - "'''Where can I find the csv-file containing working hours?\n", - "The file must be written in the following format:\n", - " \n", - " # iso-date , start , end , duration , break , comment\n", - " 2018-02-01 , 10:00 , 13:00 , 3:00 , 0:30 , \n", - " 2018-02-02 , 10:00 , 12:00 , 2:00 , , \n", - " 2018-02-05 , 10:00 , 11:00 , 1:00 , , \n", - " 2018-02-06 , 10:00 , 13:00 , 3:00 , , \n", - " 2018-02-08 , 10:00 , 13:00 , 3:00 , , Urlaub\n", - "\n", - "Header must start with number sign # to mark it as a comment!\n", - "If left empty I can still generate a preview.\n", - "\n", - "> '''\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "# Überprüfung Arbeitszeiten\n", - "\n", - "workinghours = []\n", - "\n", - "if filename == '':\n", - " \n", - " print(\"\")\n", - " should_i_make_up_workinghours = input(\n", - "'''Do you want me to generate a preview of my capabilities? (yes/no)\n", - "\n", - "> '''\n", - " )\n", - "\n", - " if (should_i_make_up_workinghours == \"y\" or should_i_make_up_workinghours == \"yes\"):\n", - " \n", - " made_up = make_up_workinghours(2, start, end, workhours_per_week, workdays_per_week)\n", - " workinghours.append(made_up)\n", - "\n", - " for m in range(int(diff_months(start,end) + 0.5)):\n", - "\n", - " month = (start.month + m - 1) % 12 + 1\n", - " monthname = cal.month_name[month]\n", - "\n", - " entries = [day for day in workinghours[0] if day[0].month == month]\n", - " entries.sort()\n", - "\n", - " year = entries[0][0].year\n", - "\n", - " total = 0\n", - " for x in range(len(entries)):\n", - " total = total + entries[x][7]\n", - " \n", - " filename = str(year) + '-' + '{0:0>2}'.format(month) + '-arbeitsstunden'\n", - "\n", - " with open('csv/' + filename + '.csv', 'w') as csvfile:\n", - " file = csv.writer(csvfile)\n", - " for row in entries:\n", - " file.writerow([row[1],row[2],row[4],row[6],row[8],row[10],row[11]])\n", - " \n", - " file.writerow([\"Gesamt\",\"\",\"\",\"\",float2duration(total),\"\",\"\"])\n", - "\n", - " with open('tex/arbeitsstundenzettel.tex', 'r') as texfile:\n", - " texcode = texfile.read().replace('\\n', '')\n", - "\n", - " texcode = texcode.replace('===NAME===', name)\n", - " texcode = texcode.replace('===FIRSTNAME===', firstname)\n", - " texcode = texcode.replace('===DATEOFBIRTH===', dateofbirth)\n", - " texcode = texcode.replace('===FACULTY===', faculty)\n", - " texcode = texcode.replace('===INSTITUTE===', institute)\n", - " texcode = texcode.replace('===INSTITUTELOGO===', logo)\n", - " texcode = texcode.replace('===STREET===', street)\n", - " texcode = texcode.replace('===POSTCODE===', postcode)\n", - " texcode = texcode.replace('===CITY===', city)\n", - " texcode = texcode.replace('===MONTH===', monthname + ' ' + str(year))\n", - " texcode = texcode.replace('===FILENAME===', 'csv/' + filename + '.csv')\n", - "\n", - " with open(filename + '.tex', 'w') as texfile:\n", - " texfile.write(texcode)\n", - "\n", - " texcmd = ['rubber', '--pdf', filename + '.tex']\n", - " proc = subprocess.Popen(texcmd)\n", - " proc.communicate()\n", - "\n", - " returncode = proc.returncode\n", - " if not returncode == 0:\n", - " os.unlink(filename + '.tex')\n", - " print(\"\")\n", - " raise ValueError('Error {} executing command: {}'.format(returncode, ' '.join(texcmd)))\n", - " else:\n", - " print(\n", - "'''I finished the compilation of your working hours sheet for ''' + str(year) + '-' + '{0:0>2}'.format(month) + '''.\n", - "You can find it in the pdf-folder, it is named ''' + filename + '''.pdf.'''\n", - " )\n", - " print(\"\")\n", - "\n", - " os.unlink(filename + '.tex')\n", - " os.unlink(filename + '.log')\n", - " os.unlink(filename + '.aux')\n", - "\n", - " os.rename(filename + '.pdf', \"pdf/\" + filename + '.pdf')\n", - " \n", - "else:\n", - " \n", - " with open(filename, 'r') as csvfile:\n", - " file = csv.reader(\n", - " filter(lambda row: row[0]!='#', csvfile),\n", - " delimiter=',',\n", - " )\n", - " for row in file:\n", - " row = [x.strip(' ') for x in row]\n", - " workinghours.append(row)\n", - " \n", - " if (dt.datetime.strptime(workinghours[0][0], \"%Y-%m-%d\").date() - start).days < 0:\n", - " print(\"Es wurden Daten angegeben, die vor dem Beginn des Arbeitsvertrages liegen!\")\n", - " elif (dt.datetime.strptime(workinghours[0][0], \"%Y-%m-%d\").month - start.month) > 0:\n", - " missing_months_at_start = dt.datetime.strptime(workinghours[0][0], \"%Y-%m-%d\").month - start.month\n", - " if missing_months_at_start == 1:\n", - " print(\"Für den erste Monat in der Vertragslaufzeit wurden keine Arbeitszeiten angegeben!\")\n", - " else:\n", - " print(\"Für die ersten \" + str(missing_months_at_start) + \" Monate in der Vertragslaufzeit wurden keine Arbeitszeiten angegeben!\")\n", - "\n", - " if (end - dt.datetime.strptime(workinghours[-1][0], \"%Y-%m-%d\").date()).days < 0:\n", - " print(\"Es wurden Daten angegeben, die nach dem Ende des Arbeitsvertrages liegen!\")\n", - " elif (end.month - dt.datetime.strptime(workinghours[-1][0], \"%Y-%m-%d\").month) > 0:\n", - " missing_months_at_end = end.month - dt.datetime.strptime(workinghours[-1][0], \"%Y-%m-%d\").month\n", - " if missing_months_at_end == 1:\n", - " print(\"Für den letzten Monat in der Vertragslaufzeit wurden keine Arbeitszeiten angegeben!\")\n", - " else:\n", - " print(\"Für die letzten \" + str(missing_months_at_end) + \" Monate in der Vertragslaufzeit wurden keine Arbeitszeiten angegeben!\")\n", - "\n", - " made_up = make_up_workinghours(2, start, end, workhours_per_week, workdays_per_week)\n", - " workinghours.append(made_up)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.5" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/python/arbeitsstundenzettel.py b/python/arbeitsstundenzettel.py index c20d82f136a196fca854882c5db7628cf934f735..0ce259811d9cedc4abc089b356551bca49e239db 100644 --- a/python/arbeitsstundenzettel.py +++ b/python/arbeitsstundenzettel.py @@ -1,7 +1,7 @@ # coding: utf-8 -# In[ ]: +# In[1]: import scipy as sp @@ -13,13 +13,14 @@ import itertools import os import os.path import subprocess +import zipfile import locale import calendar as cal -locale = locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8') +locale = locale.setlocale(locale.LC_ALL, 'de_DE.UTF8') -# In[ ]: +# In[2]: def diff_full_months(start, end): @@ -54,13 +55,13 @@ def get_calendar_week(date): def float2time(float_time): - time = '{0:02.0f}.{1:02.0f}'.format(*divmod(float_time * 60, 60)) + time = '{0:02.0f}.{1:02.0f}'.format(*divmod(round(float_time * 60), 60)) return time def float2duration(float_time): - time = '{0:02.0f}:{1:02.0f}'.format(*divmod(float(float_time) * 60, 60)) + time = '{0:02.0f}:{1:02.0f}'.format(*divmod(round(float(float_time) * 60), 60)) return time @@ -110,7 +111,7 @@ def move_filled_week(list_of_workinghours, workingday_list_position, list_of_fil print("Week " + str(current_calendar_week) + " full.") -# In[ ]: +# In[3]: def make_up_workinghours(month, start, end, workhours_per_week, workdays_per_week, already_worked = 0): @@ -122,8 +123,8 @@ def make_up_workinghours(month, start, end, workhours_per_week, workdays_per_wee workdays_total = int(workdays_per_week * weeks) workhours_total = int(workhours_per_week * weeks) workhours_per_month = int(workhours_per_week * weeks / months) - holidayhours_total = int(1 / 3 * workhours_per_week * full_months) - holidaydays_total = int(1 / 3 * workdays_per_week * full_months + 0.5) + holidayhours_total = round(1 / 3 * workhours_per_week * full_months + 0.5) + holidaydays_total = round(1 / 3 * workdays_per_week * full_months + 0.5) print("") print("Anzahl ganzer Monate: ", full_months) @@ -140,13 +141,70 @@ def make_up_workinghours(month, start, end, workhours_per_week, workdays_per_wee full_date_list = [start + dt.timedelta( days = x ) for x in range(0, days)] holiday_list = holidays.Holidays(start.year, 'BY').get_holiday_list()[0] + holidays.Holidays(end.year, 'BY').get_holiday_list()[0] + global timestep + global start_time_earliest + global start_time_latest + global preferred_weekdays + + timestep = 0.5 + start_time_earliest = 9 + start_time_latest = 12 + preferred_weekdays = [0,1,2,3,4] + + if advanced_settings: + timestep = int(input( +'''Working hours are distributed over random days +by adding a certain amount of time to them. +What amount of time would you like to add per step? +Possible values are displayed below. + + 15 minutes + 20 minutes + 30 minutes (default) + 40 minutes + 45 minutes + 60 minutes + 120 minutes + +> ''' + )) / 60 + start_time_earliest = int(input( +'''Early bird? Night owl? No worries, I got you covered... +What time would you like to start the earliest? +Must be integer [0:23]. Default 9. + +> ''' + )) + start_time_latest = int(input( +'''What time would you like to start the latest? +Must be integer [0:23] >= earliest start time. Default 12. + +> ''' + )) + preferred_weekdays = [int(x) for x in input( +'''Which weekdays do you prefer to work on? +Must be array of integers [0:5]. Default [0,1,2,3,4]. + + 0 = Monday + 1 = Tuesday + 2 = Wednesday + 3 = Thursday + 4 = Friday + 5 = Saturday + +Example: 0 1 2 = Monday, Tuesday and Wednesday + +> ''' + ).split(' ')] + + if len(preferred_weekdays) < workdays_per_week: + print("Not enough preferred weekdays given. I will continue with default.") + preferred_weekdays = [0,1,2,3,4] + for retry in range(10000): - if (workhours_per_week <= 15 and workdays_per_week <= 4): - date_list = [day for day in full_date_list if day.weekday() < 5] - date_list = [day for day in date_list if day not in holiday_list] - elif (workhours_per_week <= 19 and workdays_per_week <= 5): - date_list = [day for day in full_date_list if day.weekday() < 6] + if (workhours_per_week <= 19 and workdays_per_week <= 5): + date_list = [day for day in full_date_list if day.weekday() in preferred_weekdays] date_list = [day for day in date_list if day not in holiday_list] elif (workhours_per_week <= 19): print("Too many workdays per week given!") @@ -163,7 +221,7 @@ def make_up_workinghours(month, start, end, workhours_per_week, workdays_per_wee for i in range(len(date_list)): workingday = date_list[i] - make_up_start_time = random.randint(9,12) + make_up_start_time = random.randint(start_time_earliest,start_time_latest) make_up_end_time = random.randint(16,20) make_up_duration = 0.0 make_up_break = sp.random.choice([0, 0.25, 0.5, 0.75, 1.0], p=[0.8, 0.05, 0.05, 0.05, 0.05]) @@ -182,7 +240,6 @@ def make_up_workinghours(month, start, end, workhours_per_week, workdays_per_wee make_up_workinghours[i].append('') used_workinghours = 0 - timestep = 0.5 while (used_workinghours < workhours_total): @@ -233,7 +290,7 @@ def make_up_workinghours(month, start, end, workhours_per_week, workdays_per_wee made_up_workinghours[i][5] = made_up_end_time made_up_workinghours[i][6] = float2time(made_up_end_time) - + used_holidayhours = 0 while (used_holidayhours < holidayhours_total): @@ -245,10 +302,6 @@ def make_up_workinghours(month, start, end, workhours_per_week, workdays_per_wee made_up_workinghours[random_holidayday][11] = "Urlaub" used_holidayhours = used_holidayhours + made_up_workinghours[random_holidayday][7] - if (used_holidayhours == holidayhours_total): - - break - if (used_workinghours == workhours_total and used_holidayhours == holidayhours_total): break @@ -256,14 +309,14 @@ def make_up_workinghours(month, start, end, workhours_per_week, workdays_per_wee if retry == 0: print( '''I finished making up working hours for you. -You can find the data in the csv-folder.''' +You can find the data in the output-folder.''' ) print("") elif retry + 1 < 10000: print( '''I ran into some trouble making up working hours. I retried ''' + str(retry + 1) + ''' times, but now I finished. -You can find the data in the csv-folder.''' +You can find the data in the output-folder.''' ) print("") elif retry + 1 >= 10000: @@ -277,7 +330,7 @@ I have no idea what happend, please restart me!''' return made_up_workinghours -# In[ ]: +# In[4]: # User Input Vertragsdaten @@ -323,22 +376,46 @@ dateofbirth = input( # User Input Institut +institute = '' +street = '' +city = '' +postcode = '' +faculty = '' + print("") instituteabbr = input( '''Please specify your institute? You may use one of the following shortcodes: - physics: Department Physik - ecap: Erlangen Centre for Astroparticle Physics - lap: Lehrstuhl für Angewandt Physik + physics: Department Physik + astro: Astronomisches Institut + biophy: Lehrstuhl für Biophysik + didaktik: Professur für Didaktik der Physik + ecap: Erlangen Centre for Astroparticle Physics + fkp: Lehrstuhl für Festköperphysik + kristall: Lehrstuhl für Kristallographie und Strukturphysik + lap: Lehrstuhl für Angewandt Physik + laser: Lehrstuhl für Laserphysik + mpl: Max-Planck-Institut für die Physik des Lichts + supra: Lehrstuhl für Experimentalphysik (Supraleitung) + theo1: Lehrstuhl für Theoretische Physik 1 + theo2: Lehrstuhl für Theoretische Physik 2 + theo3: Lehrstuhl für Theoretische Physik 3 (Quantengravitation) + theo4: Lehrstuhl für Theoretische Festkörperphysik + + cs: Department Informatik + cs1: Lehrstuhl Informatik 1 + cs2: Lehrstuhl Informatik 2 + ... + cs14: Lehrstuhl Informatik 14 > ''' ) -list_of_implemented_institutes = [f for f in os.listdir("institutes/") if os.path.isfile(os.path.join("institutes/", f))] +list_of_implemented_institutes = [f for f in os.listdir("../input/institutes/") if os.path.isfile(os.path.join("../input/institutes/", f))] if instituteabbr in list_of_implemented_institutes: - with open('institutes/' + instituteabbr, 'r') as institutefile: + with open('../input/institutes/' + instituteabbr, 'r') as institutefile: instituteinfo = institutefile.read() exec(instituteinfo) else: @@ -375,10 +452,16 @@ Currently implemented are: > ''' ) + wanna_give_me_a_logo = input( '''Do you want to specify a file for your own logo? (yes/no) > ''') if (wanna_give_me_a_logo == "y" or wanna_give_me_a_logo == "yes"): + wanna_give_me_a_logo = True + else: + wanna_give_me_a_logo = False + + if wanna_give_me_a_logo: logo = input( '''Where can I find the logo-file? > ''' @@ -407,12 +490,12 @@ If left empty I can still generate a preview. ) -# In[ ]: +# In[5]: # Überprüfung Arbeitszeiten -workinghours = [] +filename = '' if filename == '': @@ -422,77 +505,125 @@ if filename == '': > ''' ) - if (should_i_make_up_workinghours == "y" or should_i_make_up_workinghours == "yes"): - - made_up = make_up_workinghours(2, start, end, workhours_per_week, workdays_per_week) - workinghours.append(made_up) - - for m in range(int(diff_months(start,end) + 0.5)): + should_i_make_up_workinghours = True - month = (start.month + m - 1) % 12 + 1 - monthname = cal.month_name[month] + print("") + advanced_settings = input( +'''Do you want to use advanced settings? (yes/no) - entries = [day for day in workinghours[0] if day[0].month == month] - entries.sort() +> ''' + ) + if (advanced_settings == "y" or advanced_settings == "yes"): + advanced_settings = True + else: + advanced_settings = False - year = entries[0][0].year + if should_i_make_up_workinghours: + + should_i_do_it_again = True + + while should_i_do_it_again: + + workinghours = [] + + made_up = make_up_workinghours(2, start, end, workhours_per_week, workdays_per_week) + workinghours.append(made_up) + + for m in range(int(diff_months(start,end) + 0.5)): + + month = (start.month + m - 1) % 12 + 1 + monthname = cal.month_name[month] + + entries = [day for day in workinghours[0] if day[0].month == month] + entries.sort() + + year = entries[0][0].year + + total = 0 + for x in range(len(entries)): + total = total + entries[x][7] + + filename = name.lower() + '-' + firstname.lower() + '_' + str(year) + '-' + '{0:0>2}'.format(month) + '_arbeitsstunden' + + with open(filename + '.csv', 'w') as csvfile: + file = csv.writer(csvfile) + for row in entries: + file.writerow([row[1],row[2],row[4],row[6],row[8],row[10],row[11]]) + + file.writerow(["Gesamt","","","",float2duration(total),"",""]) + + with open('../input/arbeitsstundenzettel.tex', 'r') as texfile: + texcode = texfile.read().replace('\n', '') + + texcode = texcode.replace('===NAME===', name) + texcode = texcode.replace('===FIRSTNAME===', firstname) + texcode = texcode.replace('===DATEOFBIRTH===', dateofbirth) + texcode = texcode.replace('===FACULTY===', faculty) + texcode = texcode.replace('===INSTITUTE===', institute) + if instituteabbr in list_of_implemented_institutes: + texcode = texcode.replace('===INSTITUTELOGO===', '../' + logo) + else: + if wanna_give_me_a_logo: + texcode = texcode.replace('===INSTITUTELOGO===', '../' + logo) + else: + texcode = texcode.replace('===INSTITUTELOGO===', "") + texcode = texcode.replace('===STREET===', street) + texcode = texcode.replace('===POSTCODE===', postcode) + texcode = texcode.replace('===CITY===', city) + texcode = texcode.replace('===MONTH===', monthname + ' ' + str(year)) + texcode = texcode.replace('===FILENAME===', filename + '.csv') + + with open(filename + '.tex', 'w') as texfile: + texfile.write(texcode) + + texcmd = ['rubber', '--pdf', filename + '.tex'] + proc = subprocess.Popen(texcmd) + proc.communicate() + + returncode = proc.returncode + if not returncode == 0: + os.unlink(filename + '.tex') + print("") + raise ValueError('Error {} executing command: {}'.format(returncode, ' '.join(texcmd))) + else: + print( +'''I finished the compilation of your working hours sheet for ''' + str(year) + '-' + '{0:0>2}'.format(month) + '''. +You can find it in the pdf-folder, it is named ''' + filename + '''.pdf.''' + ) + print("") - total = 0 - for x in range(len(entries)): - total = total + entries[x][7] - - filename = str(year) + '-' + '{0:0>2}'.format(month) + '-arbeitsstunden' + with zipfile.ZipFile(filename + '.zip', 'w') as zippy: + zippy.write(filename + '.pdf') + zippy.write(filename + '.tex') + zippy.write(filename + '.csv') - with open('csv/' + filename + '.csv', 'w') as csvfile: - file = csv.writer(csvfile) - for row in entries: - file.writerow([row[1],row[2],row[4],row[6],row[8],row[10],row[11]]) + os.rename(filename + '.zip', "../output/" + filename + '.zip') - file.writerow(["Gesamt","","","",float2duration(total),"",""]) - - with open('tex/arbeitsstundenzettel.tex', 'r') as texfile: - texcode = texfile.read().replace('\n', '') - - texcode = texcode.replace('===NAME===', name) - texcode = texcode.replace('===FIRSTNAME===', firstname) - texcode = texcode.replace('===DATEOFBIRTH===', dateofbirth) - texcode = texcode.replace('===FACULTY===', faculty) - texcode = texcode.replace('===INSTITUTE===', institute) - texcode = texcode.replace('===INSTITUTELOGO===', logo) - texcode = texcode.replace('===STREET===', street) - texcode = texcode.replace('===POSTCODE===', postcode) - texcode = texcode.replace('===CITY===', city) - texcode = texcode.replace('===MONTH===', monthname + ' ' + str(year)) - texcode = texcode.replace('===FILENAME===', 'csv/' + filename + '.csv') - - with open(filename + '.tex', 'w') as texfile: - texfile.write(texcode) - - texcmd = ['rubber', '--pdf', filename + '.tex'] - proc = subprocess.Popen(texcmd) - proc.communicate() - - returncode = proc.returncode - if not returncode == 0: + os.unlink(filename + '.pdf') + os.unlink(filename + '.csv') os.unlink(filename + '.tex') - print("") - raise ValueError('Error {} executing command: {}'.format(returncode, ' '.join(texcmd))) - else: - print( -'''I finished the compilation of your working hours sheet for ''' + str(year) + '-' + '{0:0>2}'.format(month) + '''. -You can find it in the pdf-folder, it is named ''' + filename + '''.pdf.''' - ) - print("") + os.unlink(filename + '.log') + os.unlink(filename + '.aux') - os.unlink(filename + '.tex') - os.unlink(filename + '.log') - os.unlink(filename + '.aux') + print("") + should_i_do_it_again = input( +'''Have a look at the result. +Want me to redo my work (no further input needed)? (yes/no) + +> ''' + ) + if (should_i_do_it_again == "y" or should_i_do_it_again == "yes"): + should_i_do_it_again = True + advanced_settings = False + else: + should_i_do_it_again = False + should_i_make_up_workinghours = False - os.rename(filename + '.pdf', "pdf/" + filename + '.pdf') - else: + workinghours = [] + with open(filename, 'r') as csvfile: file = csv.reader( filter(lambda row: row[0]!='#', csvfile),