summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhukl <hukl@eight.local>2009-01-31 23:14:28 +0100
committerhukl <hukl@eight.local>2009-01-31 23:14:28 +0100
commit8de27a58b5c401ecb324014bf9827b28f30d6044 (patch)
treec3004923a292771f0504c5c35e9299a0406bedd5
parenta214a1516bacc45c0ec8975decec2421ebb2e580 (diff)
updated importer to notice titles and other stuff
-rw-r--r--lib/update_importer.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/update_importer.rb b/lib/update_importer.rb
index 979501f..4d4e1d5 100644
--- a/lib/update_importer.rb
+++ b/lib/update_importer.rb
@@ -1,4 +1,5 @@
1require 'rexml/document' 1require 'rexml/document'
2require 'iconv'
2 3
3class UpdateImporter 4class UpdateImporter
4 5
@@ -58,10 +59,11 @@ class UpdateImporter
58 node.move_to_child_of parent_node 59 node.move_to_child_of parent_node
59 end 60 end
60 61
61 create_node_for_page chaospage, node 62 create_node_for_page chaospage, node, date
62 end 63 end
63 64
64 def create_node_for_page chaospage, node 65 def create_node_for_page chaospage, node, date
66
65 xhtml = convert_chaospage_to_xhtml(chaospage) 67 xhtml = convert_chaospage_to_xhtml(chaospage)
66 68
67 body = "" 69 body = ""
@@ -77,7 +79,9 @@ class UpdateImporter
77 79
78 if node.pages.empty? 80 if node.pages.empty?
79 node.pages.create!( 81 node.pages.create!(
80 :body => body 82 :title => xhtml.elements['title'].get_text.to_s,
83 :body => body,
84 :published_at => date
81 ) 85 )
82 end 86 end
83 end 87 end