Current location

narf Source control manager Git

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshtrom <shtrom@1991c358-8f32-0410-a49a-990740bdf4c2>2014-04-22 13:21:54 +0000
committershtrom <shtrom@1991c358-8f32-0410-a49a-990740bdf4c2>2014-04-22 13:21:54 +0000
commitda5242c4a2b96eda09fe35f155505ceef69fb368 (patch)
tree6dc7453fbd13b2923de0814a695abc8240cb1371
parentdf735dd42b867297478bf3e27123200678f50279 (diff)
Iterate through Blogsum posts
git-svn-id: svn+ssh://scm.narf.ssji.net/svn/shtrom/scripts@1808 1991c358-8f32-0410-a49a-990740bdf4c2
-rwxr-xr-xBlogsum2WP.rb21
1 files changed, 14 insertions, 7 deletions
diff --git a/Blogsum2WP.rb b/Blogsum2WP.rb
index d05b74d..0fb7e13 100755
--- a/Blogsum2WP.rb
+++ b/Blogsum2WP.rb
@@ -89,12 +89,19 @@ class WpUser < ActiveRecord::Base
end
# Blogsum
-puts Article.find(1).title
-puts Article.find(3).comment[0].comment
+#puts Article.find(1).title
+#puts Article.find(3).comment[0].comment
#Wordpress
-puts WpPost.find(1).post_title
-puts WpPost.find(1).wp_user.user_login
-puts WpPost.find(1).wp_comments[0].comment_content
-puts WpPost.find(1).wp_term_taxonomy
-puts WpPost.find(7).wp_terms.map {|t| "#{t.name}, "}
+#puts WpPost.find(1).post_title
+#puts WpPost.find(1).wp_user.user_login
+#puts WpPost.find(1).wp_comments[0].comment_content
+#puts WpPost.find(1).wp_term_taxonomy
+#puts WpPost.find(7).wp_terms.map {|t| "#{t.name}, "}
+
+Article.all.each do |a|
+ print "P #{a.title} #{a.date} #{a.author} #{a.uri} #{a.tags} #{a.body[0..19]}\n"
+ a.comments.each do |c|
+ print "C #{c.name} #{c.email} #{c.url} #{c.date} #{c.comment[0..19]}\n"
+ end
+end