Skip to content

Instantly share code, notes, and snippets.

@sskylar
Last active December 30, 2015 01:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sskylar/7759720 to your computer and use it in GitHub Desktop.
Save sskylar/7759720 to your computer and use it in GitHub Desktop.
WXR dump for Harmony CMS
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dsq="http://www.disqus.com/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:wp="http://wordpress.org/export/1.0/"
>
<channel>
<title>{{ blog.title }}</title>
<link>{{ blog.url }}</link>
<pubDate>{{ blog.last_updated_at | isodate }}</pubDate>
<language>en</language>
<wp:wxr_version>1.0</wp:wxr_version>
<wp:base_site_url>{{ site.url }}</wp:base_site_url>
<wp:base_blog_url>{{ blog.url }}</wp:base_blog_url>
{% for post in blog.recent_posts.9999 %}
<item>
<title><![CDATA[{{ post.title }}]]></title>
<link>{{ post.url }}</link>
<guid isPermaLink="true">{{ post.url }}</guid>
<pubDate>{{ post.published_at | isodate }}</pubDate>
<description><![CDATA[{% if post.data.body %}{{ post.data.body }}{% else %}{{ post.data.content }}{% endif %}]]></description>
<content:encoded><![CDATA[{% if post.data.body %}{{ post.data.body }}{% else %}{{ post.data.content }}{% endif %}]]></content:encoded>
<author>{{ post.creator.email }}</author>
{% for label in post.labels %}<category>{{label}}</category>{% endfor %}
<wp:post_id>{{ post.id }}</wp:post_id>
<wp:post_date>{{ post.published_at | date:"%Y-%m-%d %H:%M:%S" }}</wp:post_date>
<wp:post_date_gmt>{{ post.published_at | date:"%Y-%m-%d %H:%M:%S" }}</wp:post_date_gmt>
<wp:comment_status>{% if accepting_comments? %}open{% else %}closed{% endif %}</wp:comment_status>
<wp:post_name>{{ post.slug }}</wp:post_name>
<wp:status>publish</wp:status>
<wp:post_type>post</wp:post_type>
{% for data in post.dataset %}
<wp:postmeta>
<wp:meta_key>{{ data.key }}</wp:meta_key>
<wp:meta_value>{% if post.data[data.key].url %}{{ site.url }}{{ post.data[data.key].url }}{% else %}<![CDATA[{{ data.value }}]]>{% endif %}</wp:meta_value>
</wp:postmeta>
{% endfor %}
{% for comment in post.comments %}
<wp:comment>
<wp:comment_id>{{ comment.html_id }}</wp:comment_id>
<wp:comment_author>{{ comment.name | h }}</wp:comment_author>
<wp:comment_author_email>{{ comment.email }}</wp:comment_author_email>
<wp:comment_author_url>{{ comment.url }}</wp:comment_author_url>
<wp:comment_author_IP></wp:comment_author_IP>
<wp:comment_date>{{ comment.date | date:"%Y-%m-%d %H:%M:%S" }}</wp:comment_date>
<wp:comment_date_gmt>{{ comment.date | date:"%Y-%m-%d %H:%M:%S" }}</wp:comment_date_gmt>
<wp:comment_content><![CDATA[{{ comment.body }}]]></wp:comment_content>
<wp:comment_approved>1</wp:comment_approved>
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
{% endfor %}
</item>
{% endfor %}
</channel>
</rss>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment