summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/authors.csv178
-rw-r--r--lib/tasks/development_init.rake24
-rw-r--r--lib/update_importer.rb5
3 files changed, 207 insertions, 0 deletions
diff --git a/db/authors.csv b/db/authors.csv
new file mode 100644
index 0000000..9b679d2
--- /dev/null
+++ b/db/authors.csv
@@ -0,0 +1,178 @@
1,,,,,,,,,,
2andy,Andy Müller-Maguhn,andy@ccc.de,,,,,,,,
3arne,Arne Ludorff,arne@berlin.ccc.de,,,,,,,,
4atoth,Andreas Lehner,atoth@ccc.de,,,,,,,,
5ccc,Webmaster,webmaster@ccc.de,,,,,,,,
6ccc-duesseldorf,Erfa-Kreis Düsseldorf,mail@chaosdorf.de,,,,,,,,
7ccc-hamburg,Erfa-Kreis Hamburg,mail@hamburg.ccc.de,,,,,,,,
8ccc-karlsruhe,Erfa-Kreis Karlsruhe,info@entropia.de,,,,,,,,
9ccc-koeln,Erfa-Kreis Köln,oeffentliche-anfragen@koeln.ccc.de,,,,,,,,
10c3bi,Erfa-Kreis Bielefeld,info@bielefeld.ccc.de,,,,,,,,
11cryx,Philipp Wuensche,cryx@h3q.com,,,,,,,,
12erdgeist,Dirk Engling,erdgeist@erdgeist.org,,,,,,,,
13frankro,Frank Rosengart,frankro@berlin.ccc.de,,,,,,,,
14fukami,Christian Horchert,fukami@c3d2.de,,,,,,,,
15haegar,Sven Koch,haegar@ccc.de,,,,,,,,
16jens,Jens Ohlig,jens@ccc.de,,,,,,,,
17metaman,Benjamin Heitmann,benjamin@LauschAngriff.org,,,,,,,,
18office,Office,office@ccc.de,,,,,,,,
19padeluun,padeluun,padeluun@foebud.org,,,,,,,,
20pylon,Lars Weiler,pylon@ccc.de,,,,,,,,
21Pylon,Lars Weiler,pylon1@ccc.de,,,,,,,,
22remission,Wau Remission,remission@ccc.de,,,,,,,,
23stefan,Stefan Krecher,stefan@krecher.de,,,,,,,,
24sz,Sebastian,sebastian@ccc.de,,,,,,,,
25tim,Tim Pritlove,tim@ccc.de,,,,,,,,
26tina,Tina Lorenz,tina@haecksen.org,,,,,,,,
27webmaster,Webmaster,webmaster1@ccc.de,,,,,,,,
28vorstand,Vorstand,vorstand@ccc.de,,,,,,,,
29packet,packet,packet@berlin.ccc.de,,,,,,,,
30Chaosradio,Chaosradio,chaosradio@ccc.de,,,,,,,,
31presse,Presse,presse@ccc.de,,,,,,,,
32congress,Congress-Crew,congress-crew@ccc.de,,,,,,,,
33wetterfrosch,Matthias Mehldau,wetterminister@weltregierung.de,,,,,,,,
34crazydj,Bastian Ballmann,crazydj@web.de,,,,,,,,
35MiGri,MiGri,migri@ccc.de,,,,,,,,
36iscs,Ingo Schwitters,iscs@ailis.de,,,,,,,,
37kju,Michael Holzt,kju-web@fqdn.org,,,,,,,,
38vt100,Peter Schwindt,peter@schwindt-net.de,,,,,,,,
39volker_birk,Volker Birk,volker.birk@ulm.ccc.de,,,,,,,,
40Fefe,Felix von Leitner,felix@fefe.de,,,,,,,,
41goose,Sebastian Urbach,sebastian@ccc-hanau.de,,,,,,,,
42photon,Alexander Taute,photon@vantronix.net,,,,,,,,
43alexander,Alexander Bernauer,alexander.bernauer@ulm.ccc.de,,,,,,,,
44maha,Martin Haase,mail@martinhaase.de,,,,,,,,
45jm,Julius Mittenzwei,julius@muenchen-sued.de,,,,,,,,
46mc.fly,Elmar Lecher,mc.fly@ramdrive.org,,,,,,,,
47sinned,Dennis Wilson,sinned@chaostreff-dortmund.de,,,,,,,,
48robert,Rob Vehrse,presse1@ccc.de,,,,,,,,
49dennis,Dennis Schreiber,dennis@hamburg.ccc.de,,,,,,,,
50desc,Dennis Schreiber,dennis1@hamburg.ccc.de,,,,,,,,
51,,,,,,,,,,
52,,,,,,,,,,
53,,,,,,,,,,
54,,,,,,,,,,
55,,,,,,,,,,
56,,,,,,,,,,
57,,,,,,,,,,
58,,,,,,,,,,
59,,,,,,,,,,
60,,,,,,,,,,
61,,,,,,,,,,
62,,,,,,,,,,
63,,,,,,,,,,
64,,,,,,,,,,
65,,,,,,,,,,
66,,,,,,,,,,
67,,,,,,,,,,
68,,,,,,,,,,
69,,,,,,,,,,
70,,,,,,,,,,
71,,,,,,,,,,
72,,,,,,,,,,
73,,,,,,,,,,
74,,,,,,,,,,
75,,,,,,,,,,
76,,,,,,,,,,
77,,,,,,,,,,
78,,,,,,,,,,
79,,,,,,,,,,
80,,,,,,,,,,
81,,,,,,,,,,
82,,,,,,,,,,
83,,,,,,,,,,
84,,,,,,,,,,
85,,,,,,,,,,
86,,,,,,,,,,
87,,,,,,,,,,
88,,,,,,,,,,
89,,,,,,,,,,
90,,,,,,,,,,
91,,,,,,,,,,
92,,,,,,,,,,
93,,,,,,,,,,
94,,,,,,,,,,
95,,,,,,,,,,
96,,,,,,,,,,
97,,,,,,,,,,
98,,,,,,,,,,
99,,,,,,,,,,
100,,,,,,,,,,
101,,,,,,,,,,
102,,,,,,,,,,
103,,,,,,,,,,
104,,,,,,,,,,
105,,,,,,,,,,
106,,,,,,,,,,
107,,,,,,,,,,
108,,,,,,,,,,
109,,,,,,,,,,
110,,,,,,,,,,
111,,,,,,,,,,
112,,,,,,,,,,
113,,,,,,,,,,
114,,,,,,,,,,
115,,,,,,,,,,
116,,,,,,,,,,
117,,,,,,,,,,
118,,,,,,,,,,
119,,,,,,,,,,
120,,,,,,,,,,
121,,,,,,,,,,
122,,,,,,,,,,
123,,,,,,,,,,
124,,,,,,,,,,
125,,,,,,,,,,
126,,,,,,,,,,
127,,,,,,,,,,
128,,,,,,,,,,
129,,,,,,,,,,
130,,,,,,,,,,
131,,,,,,,,,,
132,,,,,,,,,,
133,,,,,,,,,,
134,,,,,,,,,,
135,,,,,,,,,,
136,,,,,,,,,,
137,,,,,,,,,,
138,,,,,,,,,,
139,,,,,,,,,,
140,,,,,,,,,,
141,,,,,,,,,,
142,,,,,,,,,,
143,,,,,,,,,,
144,,,,,,,,,,
145,,,,,,,,,,
146,,,,,,,,,,
147,,,,,,,,,,
148,,,,,,,,,,
149,,,,,,,,,,
150,,,,,,,,,,
151,,,,,,,,,,
152,,,,,,,,,,
153,,,,,,,,,,
154,,,,,,,,,,
155,,,,,,,,,,
156,,,,,,,,,,
157,,,,,,,,,,
158,,,,,,,,,,
159,,,,,,,,,,
160,,,,,,,,,,
161,,,,,,,,,,
162,,,,,,,,,,
163,,,,,,,,,,
164,,,,,,,,,,
165,,,,,,,,,,
166,,,,,,,,,,
167,,,,,,,,,,
168,,,,,,,,,,
169,,,,,,,,,,
170,,,,,,,,,,
171,,,,,,,,,,
172,,,,,,,,,,
173,,,,,,,,,,
174,,,,,,,,,,
175,,,,,,,,,,
176,,,,,,,,,,
177,,,,,,,,,,
178,,,,,,,,,, \ No newline at end of file
diff --git a/lib/tasks/development_init.rake b/lib/tasks/development_init.rake
index 7c732d2..886474b 100644
--- a/lib/tasks/development_init.rake
+++ b/lib/tasks/development_init.rake
@@ -1,3 +1,5 @@
1require 'csv'
2
1namespace :cccms do 3namespace :cccms do
2 4
3 desc "Create admin:foobar user:password" 5 desc "Create admin:foobar user:password"
@@ -10,6 +12,28 @@ namespace :cccms do
10 ) 12 )
11 end 13 end
12 14
15 desc "Import the authors"
16 task :import_authors => :environment do |t|
17 I18n.locale = :en
18 @parsed_file = CSV::Reader.parse(File.open("#{RAILS_ROOT}/db/authors.csv"))
19
20 @parsed_file.each_with_index do |row, index|
21 next if row[0].nil?
22
23 unless author = User.find_by_login(row[0])
24 puts "#{row[0]} >> #{row[2]}"
25 author = User.create!(
26 :login => row[0],
27 #:realname => row[1],
28 :email => row[2],
29 :password => "foobartrallala",
30 :password_confirmation => "foobartrallala"
31 )
32 end
33
34 end
35 end
36
13 desc "Import the old XML Files" 37 desc "Import the old XML Files"
14 task :import_updates => :environment do |t| 38 task :import_updates => :environment do |t|
15 i = UpdateImporter.new("#{RAILS_ROOT}/db/updates") 39 i = UpdateImporter.new("#{RAILS_ROOT}/db/updates")
diff --git a/lib/update_importer.rb b/lib/update_importer.rb
index 1fcf40e..49614b4 100644
--- a/lib/update_importer.rb
+++ b/lib/update_importer.rb
@@ -99,6 +99,11 @@ class UpdateImporter
99 99
100 end 100 end
101 101
102 if xhtml.elements['author']
103 user = User.find_by_login(xhtml.elements['author'].get_text.to_s)
104 page.user = user
105 end
106
102 page.published_at = date.to_time 107 page.published_at = date.to_time
103 page.save! 108 page.save!
104 109