diff options
| author | hukl <hukl@eight.local> | 2009-02-01 00:10:20 +0100 |
|---|---|---|
| committer | hukl <hukl@eight.local> | 2009-02-01 00:10:20 +0100 |
| commit | 32c1c784358700a599e53cd86fb2c6f318ad0217 (patch) | |
| tree | 31e80086ccb175629ffcb17e826bc07f4bfa2375 /lib | |
| parent | 7145a1fc43d9b357cfd6af2f189e22a94432ce19 (diff) | |
added updates.tbz to db/ which includes all old /
current updates on www.ccc.de in utf-8.
Also added the commands necessary to import those
xml into the local db to the README in /doc
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/update_importer.rb | 7 |
1 files changed, 2 insertions, 5 deletions
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 | ||
| 135 | end | 136 | end \ No newline at end of file |
| 136 | |||
| 137 | i = UpdateImporter.new ('/Users/hukl/Desktop/updates') | ||
| 138 | i.import_xml | ||
| 139 | |||
