forked from wezm/wezm.net
Add attributes required by the blogging helper
This commit is contained in:
parent
e83ae7064a
commit
c93cb90268
1 changed files with 6 additions and 8 deletions
|
@ -71,7 +71,7 @@ module Importer
|
||||||
end
|
end
|
||||||
|
|
||||||
def process_post(post)
|
def process_post(post)
|
||||||
puts "Processing post: #{post.css('title').first.text}"
|
puts "Processing post: #{post.at_css('title').text}"
|
||||||
content = get(post, 'content:encoded')
|
content = get(post, 'content:encoded')
|
||||||
|
|
||||||
tags = []
|
tags = []
|
||||||
|
@ -102,9 +102,10 @@ module Importer
|
||||||
:status => get(post, 'wp:status'),
|
:status => get(post, 'wp:status'),
|
||||||
:slug => get(post, 'wp:post_name'),
|
:slug => get(post, 'wp:post_name'),
|
||||||
:post_id => get(post, 'wp:post_id').to_i,
|
:post_id => get(post, 'wp:post_id').to_i,
|
||||||
:post_date => get(post, 'wp:post_date_gmt'),
|
|
||||||
:section => find_topmost_category(@categories[categories.first])[:slug],
|
:section => find_topmost_category(@categories[categories.first])[:slug],
|
||||||
:title => get(post, 'title'),
|
:title => get(post, 'title'),
|
||||||
|
:created_at => get(post, 'wp:post_date_gmt'),
|
||||||
|
:kind => 'article',
|
||||||
}
|
}
|
||||||
|
|
||||||
if attributes[:slug].empty?
|
if attributes[:slug].empty?
|
||||||
|
@ -121,15 +122,12 @@ module Importer
|
||||||
end
|
end
|
||||||
|
|
||||||
def process_page(page)
|
def process_page(page)
|
||||||
puts "Processing page: #{page.css('title').first.text}"
|
puts "WARNING: Skipping page: #{page.at_css('title').text}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def process_attachment(attachment)
|
def process_attachment(attachment)
|
||||||
puts "Processing attachment"
|
# puts "Processing attachment"
|
||||||
|
# Don't need these for now
|
||||||
url = get(attachment, 'guid')
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_item(content, attributes, identifier)
|
def add_item(content, attributes, identifier)
|
||||||
|
|
Loading…
Reference in a new issue