-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconverter.m
62 lines (48 loc) · 7.2 KB
/
converter.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
%namen = {'Abeck', 'Asfour', 'Bäcker', 'Beckert', 'Beigl', 'Bellosa', 'Beyerer', 'Bless', 'Böhm', 'Dachsbacher', 'Dillmann', 'Dreier, M.C.J.', 'Hagenmeyer', 'Hanebeck', 'Hartenstein', 'Hein', 'Henkel', 'Hofheinz', 'Huber', 'Karl', 'Koziolek', 'Längle', 'Meyerhenke', 'Müller-Quade', 'Neubert', 'Neumair', 'Prautzsch', 'Reussner', 'Sanders', 'Snelting', 'Stamatakis', 'Stiefelhagen', 'Streit', 'Tahoori', 'Tichy', 'Wagner', 'Waibel', 'Waldhorst', 'Wörn', 'Zitterbart', 'Zöllner'};
%anreden = {'Herrn Professor', 'Herrn Professor', 'Herrn Professor', 'Herrn Professor', 'Herrn Professor', 'Herrn Professor', 'Herrn Professor', 'Herrn PD', 'Herrn Professor', 'Herrn Professor', 'Herrn Professor', 'Herrn Professor', 'Herrn Professor', 'Herrn Professor', 'Herrn Professor', 'Herrn Professor', 'Herrn Professor', 'Herrn Juniorprofessor', 'Herrn PD', 'Herrn Professor', 'Frau Juniorprofessorin ', 'Herrn apl. Prof.', 'Herrn Juniorprofessor', 'Herrn Professor', 'Herrn Juniorprofessor', 'Herrn Professor', 'Herrn Professor', 'Herrn Professor', 'Herrn Professor', 'Herrn Professor', 'Herrn Professor', 'Herrn Professor', 'Herrn Professor', 'Herrn Professor', 'Herrn Professor', 'Frau Professorin', 'Herrn Professor', 'Herrn PD', 'Herrn Professor', 'Frau Professorin', 'Herrn Professor'};
%titels = {'Dr.rer.nat.', 'Dr.-Ing.', 'Dr. iur. LL.M.', 'Dr.rer.nat.', 'Dr.', 'Dr.-Ing.', 'Dr.-Ing.', 'Dr.-Ing.', 'Dr.-Ing.', 'Dr.-Ing.', 'Dr.-Ing.', 'Dr. iur.', 'Dr.', 'Dr.-Ing.', 'Dr.rer.nat.', 'Dr.-Ing. ', 'Dr.-Ing. ', 'Dr. ', 'Dr.-Ing.', 'Dr.rer.nat.', 'Dr. ', 'Dr.-Ing. ', 'Dr. ', 'Dr.rer.nat.', 'Dr.-Ing. ', 'Dr. ', 'Dr.rer.nat.', 'Dr.rer.nat.', 'Dr.rer.nat.', 'Dr.-Ing.', 'Dr.', 'Dr.-Ing.', 'Dr.rer.nat. ', 'Dr. ', 'Dr.rer.nat.', 'Dr.rer.nat.', 'Dr.rer.nat.', 'Dr.', 'Dr.-Ing.', 'Dr.rer.nat.', 'Dr.-Ing.'};
%vornamen = {'Sebastian', 'Tamim', 'Matthias', 'Bernhard', 'Michael', 'Frank', 'Jürgen', 'Roland', 'Klemens', 'Carsten', 'Rüdiger', 'Thomas', 'Veit', 'Uwe D. ', 'Hannes', 'Björn', 'Jörg', 'Dennis', 'Marco', 'Wolfgang', 'Anne', 'Thomas', 'Henning', 'Jörn', 'Boris', 'Bernhard', 'Hartmut', 'Ralf H. ', 'Peter', 'Gregor', 'Alexandros', 'Rainer', 'Achim', 'Mehdi B. ', 'Walter F. ', 'Dorothea', 'Alex', 'Oliver P.', 'Heinz', 'Martina', 'J. Marius'};
%insts = {'Institut für Telematik', 'Institut für Anthropomatik und Robotik', 'Zentrum für Angewandte Rechtswissenschaft', 'Institut für Theoretische Informatik ', 'Institut für Telematik', 'Institut für Technische Informatik', 'Institut für Anthropomatik und Robotik', 'Institut für Telematik', 'Institut für Programmstrukturen und Datenorganisation ', 'Institut für Visualisierung und Datenanalyse', 'Institut für Anthropomatik und Robotik', 'Zentrum für Angewandte Rechtswissenschaft', 'Institut für Angewandte Informatik ', 'Institut für Anthropomatik und Robotik', 'Institut für Telematik', 'Institut für Anthropomatik und Robotik', 'Institut für Technische Informatik', 'Institut für Theoretische Informatik', 'Institut für Anthropomatik und Robotik', 'Institut für Technische Informatik', 'Institut für Programmstrukturen und Datenorganisation ', 'Fraunhofer-Institut für Optronik, Systemtechnik und Bildauswertung', 'Institut für Theoretische Informatik ', 'Institut für Theoretische Informatik', 'Institut für Visualisierung und Datenanalyse', 'Steinbuch Centre for Computing ', 'Institut für Visualisierung und Datenanalyse', 'Institut für Programmstrukturen und Datenorganisation ', 'Institut für Theoretische Informatik ', 'Institut für Programmstrukturen und Datenorganisation ', 'Scientific Computing ', 'Institut für Anthropomatik und Robotik', 'Steinbuch Centre for Computing ', 'Institut für Technische Informatik', 'Institut für Programmstrukturen und Datenorganisation ', 'Institut für Theoretische Informatik ', 'Institut für Anthropomatik und Robotik', 'Institut für Telematik', 'Institut für Anthropomatik und Robotik', 'Institut für Telematik', 'Forschungszentrum Informatik'};
%gebs = {'Geb. 20.20', 'Geb. 50.20', 'Geb. 07.08', 'Geb. 50.34', 'Geb. 07.07', 'Geb. 50.34', 'Geb. 50.21', 'Geb. 20.20', 'Geb. 50.34', 'Geb. 50.34', 'Geb. 50.20', 'Geb. 07.08', 'Geb. 449 R. 334', 'Geb. 50.20', 'Geb. 20.21', 'Geb. 40.28', 'Geb. 07.21', 'Geb. 50.34', 'Geb. 50.21', 'Geb. 07.21', 'Geb. 50.34', '', 'Geb. 50.34', 'Geb. 50.34', 'Geb. 50.34', 'Geb. 449, R. 324', 'Geb. 50.34', 'Geb. 50.34', 'Geb. 50.34', 'Geb. 50.34', '', 'Geb. 07.08', 'Hermann-von-Helmholtz-Platz 1', 'Geb. 07.21', 'Geb. 50.34', 'Geb. 50.34', 'Geb. 50.20', 'Geb. 20.20', 'Geb. 40.28', 'Geb. 20.20', ''};
%strn = {'', '', 'Vincenz-Prießnitz-Str. 3', '', 'Vincenz-Prießnitz-Str. 1', '', '', '', '', '', '', 'Vincenz-Prießnitz-Str. 3', 'Campus Nord', '', 'Zirkel 2', '', 'Technologiefabrik', '', '', 'Technologiefabrik', '', 'Fraunhoferstr. 1', '', '', '', 'Hermann-von-Helmholtz-Platz 1', '', '', '', '', 'Schloss-Wolfsbrunnenweg 35', 'Vincenz-Prießnitz-Str. 3', '', 'Technologiefabrik', '', '', '', 'Zirkel 2', 'Engler-Bunte-Ring 8', 'Zirkel 2', 'Haid-und-Neu-Str. 10-14'};
%orte = {'– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '75131 Karlsruhe', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '69118 Heidelberg', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –', '– Hauspost –'};
[namen, anreden, titels, vornamen, insts, lehrst, gebs, strn, orte] = ...
coltextread('adressen.txt', char(9));
disp('');
for i=2:numel(namen)
name = namen{i};
anrede = anreden{i};
anrede = strrep(anrede, 'Herrn', 'Herr');
anrede = strrep(anrede, 'Professorin', 'Prof.');
anrede = strrep(anrede, 'Professor', 'Prof.');
anrede = strrep(anrede, 'Juniorprofessorin', 'Jun.-Prof.');
anrede = strrep(anrede, 'Juniorprofessor', 'Jun.-Prof.');
titel = 'Dr.'; %titels{i};
vorname = vornamen{i};
geb = gebs{i};
str = strn{i};
ort = orte{i};
inst = insts{i};
voll = [anrede ' ' titel ' ' vorname ' ' name];
halb = strrep(voll, 'Frau ', '');
halb = strrep(halb, 'Herr ', '');
%disp(voll);
hp = '';
if strcmp(ort, '– Hauspost –');
hp = ort;
adresse = [halb '\\' inst '\\' geb];
else
adresse = [halb '\\' inst '\\' geb '\\' str '\\' ort];
adresse = strrep(adresse, '\\\\', '\\');
end
sehrge = [anrede ' ' name];
sehrge = strrep(sehrge, 'Herr', 'Sehr geehrter Herr');
sehrge = strrep(sehrge, 'Frau', 'Sehr geehrte Frau');
adresse = strrep(adresse, '. ', '.\ ');
sehrge = strrep(sehrge, '. ', '.\ ');
adresse = strrep(adresse, 'und Wirtschaftsrecht', '\\\phantom{W}und Wirtschaftsrecht');
adresse = strrep(adresse, 'und Datenorganisation', '\\\phantom{W}und Datenorganisation');
adresse = strrep(adresse, 'Optronik, ', 'Optronik,\\\phantom{W}');
disp(['\anschreiben{' adresse '}{' sehrge '}{' hp '}'])
%s\t
end