summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/updates.tbzbin0 -> 8399251 bytes
-rw-r--r--doc/README_FOR_APP13
-rw-r--r--lib/update_importer.rb7
3 files changed, 14 insertions, 6 deletions
diff --git a/db/updates.tbz b/db/updates.tbz
new file mode 100644
index 0000000..928c3e2
--- /dev/null
+++ b/db/updates.tbz
Binary files differ
diff --git a/doc/README_FOR_APP b/doc/README_FOR_APP
index 4a84114..9b76357 100644
--- a/doc/README_FOR_APP
+++ b/doc/README_FOR_APP
@@ -17,4 +17,15 @@ git checkout --track -b poc1 origin/poc1
17 17
18git submodule init 18git submodule init
19 19
20git submodule update \ No newline at end of file 20git submodule update
21
22===============================================================================
23
24Import all Updates from the old ccc.de site:
25
26extract db/updates.tbz
27
28start a script/console and execute the following commands:
29
30i = UpdateImporter.new("#{RAILS_ROOT}/db/updates")
31i.import_xml \ No newline at end of file
diff --git a/lib/update_importer.rb b/lib/update_importer.rb
index 4d4e1d5..af7064c 100644
--- a/lib/update_importer.rb
+++ b/lib/update_importer.rb
@@ -80,6 +80,7 @@ class UpdateImporter
80 if node.pages.empty? 80 if node.pages.empty?
81 node.pages.create!( 81 node.pages.create!(
82 :title => xhtml.elements['title'].get_text.to_s, 82 :title => xhtml.elements['title'].get_text.to_s,
83 :abstract => xhtml.elements['abstract'].get_text.to_s,
83 :body => body, 84 :body => body,
84 :published_at => date 85 :published_at => date
85 ) 86 )
@@ -132,8 +133,4 @@ class UpdateImporter
132 element 133 element
133 end 134 end
134 135
135end 136end \ No newline at end of file
136
137i = UpdateImporter.new ('/Users/hukl/Desktop/updates')
138i.import_xml
139