{"id":907,"date":"2007-12-01T10:27:41","date_gmt":"2007-12-01T18:27:41","guid":{"rendered":"http:\/\/steve.cooleysekula.net\/blog\/?p=907"},"modified":"2007-12-01T10:27:41","modified_gmt":"2007-12-01T18:27:41","slug":"migrate-your-coreblog-to-wordpress","status":"publish","type":"post","link":"https:\/\/steve.cooleysekula.net\/blog\/2007\/12\/01\/migrate-your-coreblog-to-wordpress\/","title":{"rendered":"Migrate your COREBlog to WordPress"},"content":{"rendered":"<p>I thought there might be some Zope folks out there who would find the following useful. Below is the code for my DTML method, wordpress_xml, that converts COREBlog posts to WordPress XML. If you want to export your entire blog to WordPress, make sure to change the visible days&#8217; worth of posts in the settings to a large number. Just put this DTML method in the top level of your blog&#8217;s Zope contents folder:<\/p>\n<p>&lt;dtml-comment&gt;<br \/>\n##############################################################################<br \/>\nwordpress_xml<\/p>\n<p>Generates WordPress XML, for exporting COREBlog to WordPress<\/p>\n<p>Copyright (c) 2007 Steve Sekula<\/p>\n<p>##############################################################################<br \/>\n&lt;\/dtml-comment&gt;<br \/>\n&lt;dtml-call &#8220;RESPONSE.setHeader(&#8216;content-type&#8217;, &#8216;text\/xml&#8217;)&#8221;&gt;&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;&lt;dtml-var management_page_charset&gt;&#8221; ?&gt;&lt;rss version=&#8221;2.0&#8243; xmlns:content=&#8221;http:\/\/purl.org\/rss\/1.0\/modules\/content\/&#8221; xmlns:wfw=&#8221;http:\/\/wellformedweb.org\/CommentAPI\/&#8221; xmlns:dc=&#8221;http:\/\/purl.org\/dc\/elements\/1.1\/&#8221; xmlns:wp=&#8221;http:\/\/wordpress.org\/export\/1.0\/&#8221;&gt;<\/p>\n<p>&lt;channel&gt;<br \/>\n&lt;title&gt;&lt;dtml-var title&gt;&lt;\/title&gt;<br \/>\n&lt;link&gt;&lt;dtml-var blogurl&gt;&lt;\/link&gt;<br \/>\n&lt;description&gt;&lt;dtml-var blog_description&gt;&lt;\/description&gt;<br \/>\n&lt;pubDate&gt;<br \/>\n&lt;dtml-in &#8220;rev_day_entry_items(count=1)&#8221; size=1&gt;<br \/>\n&lt;dtml-var &#8220;date_created().toZone(&#8216;UTC&#8217;).strftime(&#8216;%Y-%m-%dT%H:%M:%SZ&#8217;)&#8221;&gt;<br \/>\n&lt;\/dtml-in&gt;<br \/>\n&lt;\/pubDate&gt;<br \/>\n&lt;generator&gt;http:\/\/wordpress.org\/?v=2.2.3&lt;\/generator&gt;<br \/>\n&lt;language&gt;en&lt;\/language&gt;<br \/>\n&lt;wp:category&gt;&lt;wp:category_nicename&gt;uncategorized&lt;\/wp:category_nicename&gt;&lt;wp:category_parent&gt;&lt;\/wp:category_parent&gt;&lt;wp:posts_private&gt;0&lt;\/wp:posts_private&gt;&lt;wp:links_private&gt;0&lt;\/wp:links_private&gt;&lt;wp:cat_name&gt;&lt;![CDATA[Uncategorized]]&gt;&lt;\/wp:cat_name&gt;&lt;\/wp:category&gt;<br \/>\n&lt;wp:category&gt;&lt;wp:category_nicename&gt;blogroll&lt;\/wp:category_nicename&gt;&lt;wp:category_parent&gt;&lt;\/wp:category_parent&gt;&lt;wp:posts_private&gt;0&lt;\/wp:posts_private&gt;&lt;wp:links_private&gt;0&lt;\/wp:links_private&gt;&lt;wp:cat_name&gt;&lt;![CDATA[Blogroll]]&gt;&lt;\/wp:cat_name&gt;&lt;\/wp:category&gt;<\/p>\n<p>&lt;dtml-in &#8220;rev_day_entry_items(count=top_days)&#8221;&gt;<\/p>\n<p>&lt;item&gt;<br \/>\n&lt;title&gt;&lt;dtml-var title&gt;&lt;\/title&gt;<br \/>\n&lt;link&gt;&lt;dtml-var blogurl&gt;\/&lt;dtml-var id&gt;&lt;\/link&gt;<br \/>\n&lt;pubDate&gt;&lt;dtml-var &#8220;date_created().toZone(&#8216;UTC&#8217;).strftime(&#8216;%Y-%m-%dT%H:%M:%SZ&#8217;)&#8221;&gt;&lt;\/pubDate&gt;<br \/>\n&lt;dc:creator&gt;&lt;dtml-var author html_quote&gt;&lt;\/dc:creator&gt;<br \/>\n&lt;dtml-in entry_category_list&gt;<br \/>\n&lt;category&gt;&lt;![CDATA[&lt;dtml-var name&gt;]]&gt;&lt;\/category&gt;<br \/>\n&lt;\/dtml-in&gt;<\/p>\n<p>&lt;guid isPermaLink=&#8221;false&#8221;&gt;&lt;dtml-var blogurl&gt;\/&lt;dtml-var id&gt;&lt;\/guid&gt;<br \/>\n&lt;description&gt;&lt;\/description&gt;<br \/>\n&lt;content:encoded&gt;&lt;![CDATA[&lt;dtml-var body newline_to_br&gt;]]&gt;&lt;\/content:encoded&gt;<br \/>\n&lt;wp:post_id&gt;&lt;dtml-var id&gt;&lt;\/wp:post_id&gt;<br \/>\n&lt;wp:post_date&gt;&lt;dtml-var &#8220;date_created().toZone(&#8216;UTC&#8217;).strftime(&#8216;%Y-%m-%dT%H:%M:%SZ&#8217;)&#8221;&gt;&lt;\/wp:post_date&gt;<br \/>\n&lt;wp:post_date_gmt&gt;&lt;dtml-var &#8220;date_created().toZone(&#8216;GMT&#8217;).strftime(&#8216;%Y-%m-%dT%H:%M:%SZ&#8217;)&#8221;&gt;&lt;\/wp:post_date_gmt&gt;<br \/>\n&lt;wp:comment_status&gt;open&lt;\/wp:comment_status&gt;<br \/>\n&lt;wp:ping_status&gt;open&lt;\/wp:ping_status&gt;<br \/>\n&lt;wp:post_name&gt;test&lt;\/wp:post_name&gt;<br \/>\n&lt;wp:status&gt;publish&lt;\/wp:status&gt;<br \/>\n&lt;wp:post_parent&gt;0&lt;\/wp:post_parent&gt;<br \/>\n&lt;wp:menu_order&gt;0&lt;\/wp:menu_order&gt;<br \/>\n&lt;wp:post_type&gt;post&lt;\/wp:post_type&gt;<br \/>\n&lt;wp:postmeta&gt;<br \/>\n&lt;wp:meta_key&gt;_encloseme&lt;\/wp:meta_key&gt;<br \/>\n&lt;wp:meta_value&gt;1&lt;\/wp:meta_value&gt;<br \/>\n&lt;\/wp:postmeta&gt;<br \/>\n&lt;\/item&gt;<br \/>\n&lt;\/dtml-in&gt;<br \/>\n&lt;\/channel&gt;<br \/>\n&lt;\/rss&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I thought there might be some Zope folks out there who would find the following useful. Below is the code for my DTML method, wordpress_xml, that converts COREBlog posts to WordPress XML. If you want to export your entire blog to WordPress, make sure to change the visible days&#8217; worth of posts in the settings [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[11],"tags":[],"class_list":{"0":"post-907","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-computing","7":"czr-hentry"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/steve.cooleysekula.net\/blog\/wp-json\/wp\/v2\/posts\/907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/steve.cooleysekula.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/steve.cooleysekula.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/steve.cooleysekula.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/steve.cooleysekula.net\/blog\/wp-json\/wp\/v2\/comments?post=907"}],"version-history":[{"count":0,"href":"https:\/\/steve.cooleysekula.net\/blog\/wp-json\/wp\/v2\/posts\/907\/revisions"}],"wp:attachment":[{"href":"https:\/\/steve.cooleysekula.net\/blog\/wp-json\/wp\/v2\/media?parent=907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/steve.cooleysekula.net\/blog\/wp-json\/wp\/v2\/categories?post=907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/steve.cooleysekula.net\/blog\/wp-json\/wp\/v2\/tags?post=907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}