<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>dataMigration &amp;mdash; Matt&#39;s Dev Log</title>
    <link>https://matt.writefreely.dev/tag:dataMigration</link>
    <description></description>
    <pubDate>Sun, 03 May 2026 12:09:50 +0000</pubDate>
    <item>
      <title>Data Format for WriteFreely Import</title>
      <link>https://matt.writefreely.dev/data-format-for-writefreely-import</link>
      <description>&lt;![CDATA[To import posts into WriteFreely from an outside platform, it is ideal to get all articles into a JSON document that looks like the following, where each object in the array is a complete article:&#xA;&#xA;[&#xA;  {&#xA;    &#34;title&#34;: &#34;Optional Post Title&#34;,&#xA;    &#34;slug&#34;: &#34;optional-post-title&#34;,&#xA;    &#34;body&#34;: &#34;Entire post content, in Markdown or HTML, including any images and #hashtags.\n\nNote: newlines should be preserved in this field, even when using HTML.&#34;,&#xA;    &#34;font&#34;: &#34;serif&#34;,&#xA;    &#34;lang&#34;: &#34;en&#34;,&#xA;    &#34;rtl&#34;: false,&#xA;    &#34;created&#34;: &#34;2006-01-02T15:04:05Z&#34;&#xA;  }&#xA;]&#xA;&#xA;These field names map directly to the API -- you can read details in the API documentation. Otherwise, a few notes:&#xA;&#xA;The slug should contain only alphanumerics and hypens. Any invalid characters will be automatically converted.&#xA;&#xA;The body property should include all original markup (HTML) and Markdown, with newlines (WriteFreely respects and requires newline literals). Note: Getting as close to Markdown / plain text as possible here is ideal, as it provides the best editing and data export experience. But WF will render HTML.&#xA;&#xA;Include any categories or tags as #hashtags, inline in the body. To make it look nice, you might append any to the end of the post, separated from the post body by \n\n.&#xA;&#xA;Supply a created time, in the RFC3339 format (shown above) and converted to the UTC timezone, to preserve original publish date and time.&#xA;&#xA;In this format, we can trivially loop through the array of objects and POST each one directly to the WriteFreely API -- creating either drafts or blog posts.&#xA;&#xA;\#WriteFreely #import #dataMigration&#xA;&#xA;---&#xD;&#xA;&#xD;&#xA;Get future updates via RSS and ActivityPub: @devlog@matt.writefreely.dev.]]&gt;</description>
      <content:encoded><![CDATA[<p>To import posts into WriteFreely from an outside platform, it is <em>ideal</em> to get all articles into a JSON document that looks like the following, where each object in the array is a complete article:</p>

<pre><code class="language-json">[
  {
    &#34;title&#34;: &#34;Optional Post Title&#34;,
    &#34;slug&#34;: &#34;optional-post-title&#34;,
    &#34;body&#34;: &#34;Entire post content, in Markdown or HTML, including any images and #hashtags.\n\nNote: newlines should be preserved in this field, even when using HTML.&#34;,
    &#34;font&#34;: &#34;serif&#34;,
    &#34;lang&#34;: &#34;en&#34;,
    &#34;rtl&#34;: false,
    &#34;created&#34;: &#34;2006-01-02T15:04:05Z&#34;
  }
]
</code></pre>

<p>These field names map directly to the API — you can read details in <a href="https://developers.write.as/docs/api/#publish-a-collection-post">the API documentation</a>. Otherwise, a few notes:</p>
<ul><li><p>The <code>slug</code> should contain only alphanumerics and hypens. Any invalid characters will be automatically converted.</p></li>

<li><p>The <code>body</code> property should include all original markup (HTML) and Markdown, with newlines (WriteFreely respects and <em>requires</em> newline literals). <strong>Note:</strong> Getting as close to Markdown / plain text as possible here is <em>ideal</em>, as it provides the best editing and data export experience. But WF <em>will</em> render HTML.</p></li>

<li><p>Include any categories or tags as <a href="https://matt.writefreely.dev/tag:hashtags" class="hashtag"><span>#</span><span class="p-category">hashtags</span></a>, inline in the <code>body</code>. To make it look nice, you might append any to the end of the post, separated from the post body by <code>\n\n</code>.</p></li>

<li><p>Supply a <code>created</code> time, in the RFC3339 format (shown above) and converted to the UTC timezone, to preserve original publish date and time.</p></li></ul>

<p>In this format, we can trivially loop through the array of objects and <code>POST</code> each one directly to the WriteFreely API — creating either <a href="https://developers.write.as/docs/api/#publish-a-post">drafts</a> or <a href="https://developers.write.as/docs/api/#publish-a-collection-post">blog posts</a>.</p>

<p>#WriteFreely <a href="https://matt.writefreely.dev/tag:import" class="hashtag"><span>#</span><span class="p-category">import</span></a> <a href="https://matt.writefreely.dev/tag:dataMigration" class="hashtag"><span>#</span><span class="p-category">dataMigration</span></a></p>

<hr>

<p>Get future updates via <a href="https://matt.writefreely.dev/feed/">RSS</a> and ActivityPub: <a href="https://matt.writefreely.dev/@/devlog@matt.writefreely.dev" class="u-url mention">@<span>devlog@matt.writefreely.dev</span></a>.</p>
]]></content:encoded>
      <guid>https://matt.writefreely.dev/data-format-for-writefreely-import</guid>
      <pubDate>Thu, 20 Aug 2020 13:26:43 +0000</pubDate>
    </item>
  </channel>
</rss>