<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: David Berlin</title>
    <description>The latest articles on DEV Community by David Berlin (@davbree).</description>
    <link>https://dev.to/davbree</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F178677%2F6e9216bf-a00b-4a04-8ad9-256076cedd20.jpeg</url>
      <title>DEV Community: David Berlin</title>
      <link>https://dev.to/davbree</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/davbree"/>
    <language>en</language>
    <item>
      <title>Migrating From Medium - A Developer's Guide</title>
      <dc:creator>David Berlin</dc:creator>
      <pubDate>Mon, 17 Jun 2019 19:06:19 +0000</pubDate>
      <link>https://dev.to/stackbit/migrating-from-medium-a-developer-s-guide-3djh</link>
      <guid>https://dev.to/stackbit/migrating-from-medium-a-developer-s-guide-3djh</guid>
      <description>&lt;p&gt;The large migration from Medium has led to the creation of many useful tools to help you accomplish that. &lt;/p&gt;

&lt;p&gt;The tools mostly rely on the following &lt;strong&gt;methods of obtaining your content from Medium&lt;/strong&gt;:&lt;/p&gt;

&lt;h3&gt;
  
  
  RSS Feeds
&lt;/h3&gt;

&lt;p&gt;Medium provides &lt;a href="https://help.medium.com/hc/en-us/articles/214874118-RSS-feeds"&gt;officially supported&lt;/a&gt; RSS feeds that are available by prepending &lt;code&gt;/feed/&lt;/code&gt; to your feed's URL. &lt;/p&gt;

&lt;p&gt;For example - &lt;a href="https://medium.com/feed/@prashantramnyc"&gt;https://medium.com/feed/@prashantramnyc&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;item&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;![CDATA[Difference between var, let and const in Javascript.]]&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;description&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;![CDATA[&amp;lt;div class="medium-feed-item"&amp;gt;...&amp;lt;/div&amp;gt;]]&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/description&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;link&amp;gt;&lt;/span&gt;https://codeburst.io/difference-between-var-let-and-const-in-javascript-fbce2fba7b4?source=rss-eeafca132b1e------2&lt;span class="nt"&gt;&amp;lt;/link&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;guid&lt;/span&gt; &lt;span class="na"&gt;isPermaLink=&lt;/span&gt;&lt;span class="s"&gt;"false"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;https://medium.com/p/fbce2fba7b4&lt;span class="nt"&gt;&amp;lt;/guid&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;category&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;![CDATA[codingbootcamp]]&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/category&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;category&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;![CDATA[coding]]&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/category&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;category&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;![CDATA[javascript-tips]]&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/category&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;category&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;![CDATA[programming]]&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/category&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;category&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;![CDATA[javascript]]&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/category&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dc:creator&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;![CDATA[Prashant Ram]]&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/dc:creator&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;pubDate&amp;gt;&lt;/span&gt;Tue, 21 May 2019 18:59:39 GMT&lt;span class="nt"&gt;&amp;lt;/pubDate&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;atom:updated&amp;gt;&lt;/span&gt;2019-05-22T14:18:46.943Z&lt;span class="nt"&gt;&amp;lt;/atom:updated&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/item&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Officially supported&lt;/li&gt;
&lt;li&gt;Works for both user and publication feeds&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Only latest articles are available - not a good solution for retrieving all your posts.&lt;/li&gt;
&lt;li&gt;Feed won't necessarily have entire article content - as is the nature of RSS, some articles may only show an excerpt with a link to the full article.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tools using this approach: the DEV &lt;a href="https://dev.to/settings/publishing-from-rss"&gt;feed import&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  JSON API
&lt;/h3&gt;

&lt;p&gt;For the more adventurous, it's possible to retrieve a low-level JSON structure of feeds and posts. &lt;/p&gt;

&lt;p&gt;This is achieved by using the &lt;code&gt;format=json&lt;/code&gt; url parameter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Feeds - &lt;a href="https://medium.com/@prashantramnyc/?format=json"&gt;https://medium.com/@prashantramnyc?format=json&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Posts - &lt;a href="https://medium.com/@rossbulat/image-processing-in-nodejs-with-jimp-174f39336153?format=json"&gt;https://medium.com/@rossbulat/image-processing-in-nodejs-with-jimp-174f39336153?format=json&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="p"&gt;{&lt;/span&gt;  
     &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;success&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;payload&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:{&lt;/span&gt;  
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;value&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:{&lt;/span&gt;  
           &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;content&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:{&lt;/span&gt;  
              &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;subtitle&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Full code example: combining images, watermarking, fonts and text&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bodyModel&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:{&lt;/span&gt;  
                 &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;paragraphs&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:[&lt;/span&gt;  
                    &lt;span class="p"&gt;{&lt;/span&gt;  
                       &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2e10&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                       &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                       &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Image Processing in NodeJS with Jimp&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                       &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;markups&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:[&lt;/span&gt; &lt;span class="p"&gt;]&lt;/span&gt;
                    &lt;span class="p"&gt;},&lt;/span&gt;
                    &lt;span class="p"&gt;...&lt;/span&gt;
                 &lt;span class="p"&gt;]&lt;/span&gt;
              &lt;span class="p"&gt;}&lt;/span&gt;
           &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
     &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Note that the JSON is returned with a &lt;code&gt;while(1)&lt;/code&gt; that Medium put in place to prevent &lt;a href="https://haacked.com/archive/2009/06/25/json-hijacking.aspx/"&gt;JSON hijacking&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Contains all available posts and information&lt;/li&gt;
&lt;li&gt;Can be automated&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Undocumented and subject to breaking changes&lt;/li&gt;
&lt;li&gt;Complex JSON structure&lt;/li&gt;
&lt;li&gt;Can be limited by Medium's paywall&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tools using this approach: &lt;a href="https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-medium"&gt;gatsby-source-medium&lt;/a&gt;, &lt;a href="https://github.com/xdamman/mediumexporter"&gt;mediumexporter&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Export File
&lt;/h3&gt;

&lt;p&gt;You can &lt;a href="https://medium.com/me/export"&gt;request to download&lt;/a&gt; all your information from Medium. After making the request you'll receive a link to a zip file with the following directory structure:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;blocks
bookmarks
claps
highlights
interests
posts
profile
pubs-following
sessions
topics-following
users-following
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Each directory contains HTML files with minimal styling and structure. &lt;/p&gt;

&lt;p&gt;The &lt;code&gt;posts&lt;/code&gt; directory contains all your posts including drafts and comments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Officially supported&lt;/li&gt;
&lt;li&gt;Contains all of your posts in one accessible place&lt;/li&gt;
&lt;li&gt;Has lots of other info that a user might want when migrating to a new platform&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Requires the manual process of requesting the Zip file (although an Email with the link is sent very quickly in our experience) - can't easily be automated.&lt;/li&gt;
&lt;li&gt;Posts are missing some information - the post tags aren't available and it's tricky to detect if a post is a full post or a comment.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tools using this approach: &lt;a href="https://github.com/gautamdhameja/medium-2-md"&gt;medium-2-md&lt;/a&gt;, &lt;a href="https://github.com/ageitgey/medium_to_ghost"&gt;medium_to_ghost&lt;/a&gt;, &lt;a href="https://github.com/mathieudutour/medium-to-own-blog"&gt;medium-to-own-blog&lt;/a&gt;, &lt;a href="https://github.com/jamischarles/export-medium-to-gatsby"&gt;export-medium-to-gatsby&lt;/a&gt;, Stackbit!&lt;/p&gt;

&lt;p&gt;As each of these methods has its own set of drawbacks, tools often combine them to get all the content they require. For example - starting with the export zip file and augmenting it with information from the JSON API.&lt;/p&gt;
&lt;h2&gt;
  
  
  At Stackbit
&lt;/h2&gt;

&lt;p&gt;Stackbit makes it extremely easy to create modern websites powered by a variety of data sources including Medium.&lt;/p&gt;

&lt;p&gt;At Stackbit we created a tool that works on the export file obtained from Medium. It converts the posts to Markdown files with a structure that is easy for us to transpile into any of our supported SSG's.&lt;/p&gt;

&lt;p&gt;The importer follows this flow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Extract information&lt;/strong&gt; from each post's HTML - title, thumbnail, excerpt, images, etc. We use &lt;a href="https://github.com/cheeriojs/cheerio"&gt;cheerio&lt;/a&gt; to parse out the information directly from the HTML:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="kd"&gt;get&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;title&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="kd"&gt;get&lt;/span&gt; &lt;span class="nx"&gt;subtitle&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;h4[class*="graf--subtitle"]&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Download images&lt;/strong&gt; - store them locally grouped by the post's slug&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simplify HTML&lt;/strong&gt; - the exported HTML file is very noisy. We use &lt;a href="https://github.com/apostrophecms/sanitize-html"&gt;sanitize-html&lt;/a&gt; to remove unneeded attributes and structural elements. This simplifies the task for the next step and helps us decouple ourselves from future changes to the format of the file. Some information is retained and manipulated to assist the next steps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Convert post content to&lt;/strong&gt; &lt;strong&gt;Markdown&lt;/strong&gt; - combine with extracted info to export front matter with Markdown content. We replace external images with those that were downloaded. We use &lt;a href="https://github.com/domchristie/turndown"&gt;turndown&lt;/a&gt; and take advantage of custom rules to preserve IFrames such as Twitter embeds:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="nx"&gt;turndownService&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;addRule&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;twitter-tweet&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;nodeName&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;BLOCKQUOTE&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
                 &lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getAttribute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;class&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;twitter-tweet&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;replacement&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;innerHTML&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;outerHTML&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Extract profile information&lt;/strong&gt; - the &lt;code&gt;profile.html&lt;/code&gt; file contains the name of the user along with their Email address and social profiles that were connected to Medium. We create a JSON structure with this information to make it easily consumable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At Stackbit the output can then be combined into our existing themes and transpiled to the user's SSG of choice. &lt;/p&gt;

&lt;p&gt;The tool is &lt;a href="https://github.com/stackbithq/stackbit-medium-importer"&gt;available on GitHub&lt;/a&gt; and is live on the &lt;a href="https://www.stackbit.com/medium"&gt;Stackbit site&lt;/a&gt;. We're always looking to improve things and welcome your input.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/stackbithq"&gt;
        stackbithq
      &lt;/a&gt; / &lt;a href="https://github.com/stackbithq/stackbit-medium-importer"&gt;
        stackbit-medium-importer
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Stackbit Medium Importer
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
stackbit-medium-importer&lt;/h1&gt;
&lt;p&gt;A small library to convert &lt;a href="https://medium.com/me/export" rel="nofollow"&gt;medium export&lt;/a&gt; zip files to static-site-generator (SSG) friendly Markdown files.&lt;/p&gt;
&lt;h1&gt;
Demo&lt;/h1&gt;
&lt;p&gt;The Medium importer can be seen in action on the &lt;a href="https://www.stackbit.com/medium" rel="nofollow"&gt;Stackbit website&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;
Install&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;npm install @stackbit/stackbit-medium-importer
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;
How to use&lt;/h1&gt;
&lt;p&gt;The module comes with a utility to invoke the importer directly.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ medium-importer
Usage: medium-importer --input-file=&amp;lt;input-file&amp;gt; --output-dir=&amp;lt;output-dir&amp;gt; --concurrency=&amp;lt;concurrency&amp;gt; --download-images=&amp;lt;download-images&amp;gt; --import-drafts=&amp;lt;import-drafts&amp;amp;gt
Options
  --help                 Show help  [boolean]
  --version              Show version number  [boolean]
  --input-file, -i       medium export zip file  [required]
  --output-dir, -o       target folder for the converted files  [required]
  --concurrency, -c      number of posts to process in parallel [default: 1]
  --download-images, -d  should images be downloaded [default: true]
  --import-drafts, -r    should drafts be imported [default: true]
Examples:
  medium-importer -i medium-export.zip -o output/
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;
Importer output&lt;/h1&gt;
&lt;p&gt;The output directory is populated with the imported data, following a structure that makes it straightforward to later use with an SSG. For certain SSG's (like Hugo) it's possible to point the…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/stackbithq/stackbit-medium-importer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Looking forward to hearing how you migrated off Medium.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>projectbenatar</category>
      <category>medium</category>
      <category>rss</category>
    </item>
  </channel>
</rss>
