I wrote an applescript to automatically generate an import file for wordpress from lyrics attached to my music in iTunes. I like to post lyrics to songs that grab my attention on my blog, and I figured this would save some time for me. It seems that WordPress is very finicky about the format of its import files. Here's the two sets of code I'm using
The Following DOES work:
<?xml version="1.0" encoding="UTF-8"?>
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your blog. -->
<!-- It contains information about your blog's posts, comments, and categories. -->
<!-- You may use this file to transfer that content from one site to another. -->
<!-- This file is not intended to serve as a complete backup of your blog. -->
<!-- To import this information into a WordPress blog follow these steps. -->
<!-- 1. Log into that blog as an administrator. -->
<!-- 2. Go to Tools: Import in the blog's admin panels (or Manage: Import in older versions of WordPress). -->
<!-- 3. Choose "WordPress" from the list. -->
<!-- 4. Upload this file using the form provided on that page. -->
<!-- 5. You will first be asked to map the authors in this export file to users -->
<!-- on the blog. For each author, you may choose to map to an -->
<!-- existing user on the blog or to create a new user -->
<!-- 6. WordPress will then import each of the posts, comments, and categories -->
<!-- contained in this file into your blog -->
<!-- generator="WordPress/2.7.1" created="2009-04-30 18:59"-->
<rss version="2.0"
xmlns:excerpt="http://wordpress.org/export/1.0/excerpt/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:wp="http://wordpress.org/export/1.0/"
>
<channel>
<item>
<title>Showbread - Your Owls Are Hooting Lyrics</title>
<link>http://myurl.com/?p=634</link>
<pubDate>Thu, 30 Apr 2009 22:57:49 +0000</pubDate>
<dc:creator><![CDATA[admin]]></dc:creator>
<category><![CDATA[Uncategorized]]></category>
<category domain="category" nicename="uncategorized"><![CDATA[Uncategorized]]></category>
<guid isPermaLink="false">http://myurl.com/?p=634</guid>
<description></description>
<content:encoded><![CDATA[This letter won't make it to you in time
Introverted by your distance from me, and by mine
But the chameleons who sift through the trees
Are garnering a bouquet in my head's faculties
And its filled with scales and perfumes wearing thin
There is no flaw in you, there is no sun on your skin
Where have you been all of my life?
I hear a lizard tongue above my head
Will you be my wife?
Skin and bones and things that make my heart beat
My possession my obsession, everything to me
The sound of your voice and all your fingertips
Is like a bible verse spilling right across your lips
Waiting for my bride no longer taking it's toll
Like a great horned owl swallowing fruit bats whole
Now that you're here I feel a presence that I didn't before
I feel your love I feel the warmth I'm feeling so much more
No more stiff joints, no more skin dry and rigid
You're like a funnel in my heart
No longer artic and frigid
I'm indebted to you, you are my only one
Straight from the breath of the almighty Father, Spirit and Son
Skin and bones and things that make my heart beat
My possession my obsession, everything to me
The sound of your voice and all your fingertips
Is like a bible verse spilling right across your lips
Skin and bones and things that make my heart beat
My possession my obsession, everything to me
The sound of your voice and all your fingertips
Is like a bible verse spilling right across your lips
Skin and bones and things that make my heart beat
My possession my obsession, everything to me
The sound of your voice and all your fingertips
Is like a bible verse spilling right across your lips]]></content:encoded>
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>634</wp:post_id>
<wp:post_date>2009-04-30 18:57:49</wp:post_date>
<wp:post_date_gmt>2009-04-30 22:57:49</wp:post_date_gmt>
<wp:comment_status>closed</wp:comment_status>
<wp:ping_status>closed</wp:ping_status>
<wp:post_name>showbread-your-owls-are-hooting-lyrics</wp:post_name>
<wp:status>publish</wp:status>
<wp:post_parent>0</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type>post</wp:post_type>
<wp:post_password></wp:post_password>
<wp:postmeta>
<wp:meta_key>letter</wp:meta_key>
<wp:meta_value>s</wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>song</wp:meta_key>
<wp:meta_value>Your Owls Are Hooting</wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>album</wp:meta_key>
<wp:meta_value>Age of Reptiles</wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>tracknum</wp:meta_key>
<wp:meta_value>03</wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>mp3link</wp:meta_key>
<wp:meta_value>http://linktobuymp3here.com</wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>artist</wp:meta_key>
<wp:meta_value>Showbread</wp:meta_value>
</wp:postmeta>
</item>
</channel>
</rss>
The following DOES NOT work:
<?xml version="1.0" encoding="UTF-8"?>
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your blog. -->
<!-- It contains information about your blog's posts, comments, and categories. -->
<!-- You may use this file to transfer that content from one site to another. -->
<!-- This file is not intended to serve as a complete backup of your blog. -->
<!-- To import this information into a WordPress blog follow these steps. -->
<!-- 1. Log into that blog as an administrator. -->
<!-- 2. Go to Tools: Import in the blog's admin panels (or Manage: Import in older versions of WordPress). -->
<!-- 3. Choose "WordPress" from the list. -->
<!-- 4. Upload this file using the form provided on that page. -->
<!-- 5. You will first be asked to map the authors in this export file to users -->
<!-- on the blog. For each author, you may choose to map to an -->
<!-- existing user on the blog or to create a new user -->
<!-- 6. WordPress will then import each of the posts, comments, and categories -->
<!-- contained in this file into your blog -->
<!-- generator="WordPress/2.7.1" created="2009-04-30 00:18"-->
<rss version="2.0"
xmlns:excerpt="http://wordpress.org/export/1.0/excerpt/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:wp="http://wordpress.org/export/1.0/"
>
<channel>
<item>
<title>Showbread - Your Owls Are Hooting Lyrics</title>
<link>http://myurl.com/?p=500</link>
<pubDate>Sun, 26 Apr 2009 17:00:00 +0000</pubDate>
<dc:creator><![CDATA[Ricky]]></dc:creator>
<category><![CDATA[lyrics]]></category>
<category domain="category" nicename="lyrics"><![CDATA[lyrics]]></category>
<guid isPermaLink="false">http://myurl.com/?p=500</guid>
<description></description>
<content:encoded><![CDATA[This letter won't make it to you in time
Introverted by your distance from me, and by mine
But the chameleons who sift through the trees
Are garnering a bouquet in my head's faculties
And its filled with scales and perfumes wearing thin
There is no flaw in you, there is no sun on your skin
Where have you been all of my life?
I hear a lizard tongue above my head
Will you be my wife?
Skin and bones and things that make my heart beat
My possession my obsession, everything to me
The sound of your voice and all your fingertips
Is like a bible verse spilling right across your lips
Waiting for my bride no longer taking it's toll
Like a great horned owl swallowing fruit bats whole
Now that you're here I feel a presence that I didn't before
I feel your love I feel the warmth I'm feeling so much more
No more stiff joints, no more skin dry and rigid
You're like a funnel in my heart
No longer artic and frigid
I'm indebted to you, you are my only one
Straight from the breath of the almighty Father, Spirit and Son
Skin and bones and things that make my heart beat
My possession my obsession, everything to me
The sound of your voice and all your fingertips
Is like a bible verse spilling right across your lips
Skin and bones and things that make my heart beat
My possession my obsession, everything to me
The sound of your voice and all your fingertips
Is like a bible verse spilling right across your lips
Skin and bones and things that make my heart beat
My possession my obsession, everything to me
The sound of your voice and all your fingertips
Is like a bible verse spilling right across your lips]]></content:encoded>
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>500</wp:post_id>
<wp:post_date>2009-04-26 12:00:00</wp:post_date>
<wp:post_date_gmt>2009-04-26 17:00:00</wp:post_date_gmt>
<wp:comment_status>closed</wp:comment_status>
<wp:ping_status>closed</wp:ping_status>
<wp:post_name>showbread-your-owls-are-hooting-lyrics</wp:post_name>
<wp:status>publish</wp:status>
<wp:post_parent>0</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type>post</wp:post_type>
<wp:post_password></wp:post_password>
<wp:postmeta>
<wp:meta_key>letter</wp:meta_key>
<wp:meta_value>s</wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>song</wp:meta_key>
<wp:meta_value>Your Owls Are Hooting</wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>album</wp:meta_key>
<wp:meta_value>Age of Reptiles</wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>tracknum</wp:meta_key>
<wp:meta_value>03</wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>mp3link</wp:meta_key>
<wp:meta_value>http://linktobuymp3here.com</wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>artist</wp:meta_key>
<wp:meta_value>Showbread</wp:meta_value>
</wp:postmeta>
</item>
</channel>
</rss>
All of the elements are the same structurally, just some of the values are changed. Does anyone have any idea as to what could be causing the issue? It's got me completely stumped.
Also, if anyone knows of any sites that give a good explanation of the wordpress import/export xml files, I'd appreciate it if they could point me in the right direction.
Thanks