DISTRO

Automatically transform article HTML for third-party platforms such as:
Instant Articles
NEWS
Google AMP
ISSUE A POST REQUEST WITH YOUR RAW HTML:
curl --data "
<h1>Distro.Mic example</h1>
<p>Text and media embed</p>
<iframe src=\"https://www.youtube.com/embed/M7lc1UVf-VE\"></iframe>
" https://distro.mic.com/1.0/format?output=apple-news

How it works

Grab raw article HTML
raw-article.html
<p>Astronomers just announced the universe might be expanding
<a href="http://hubblesite.org/newscenter/archive/releases/2016/17/text/">up
to 9%</a> faster than we thought.</p><p>It's a surprising insight
that could put us one step closer to finally figuring out what the hell
<a href="http://science.nasa.gov/astrophysics/focus-areas/what-is-dark-energy/">
dark energy and dark matter</a> are.
Or it could mean that we've gotten something fundamentally wrong in our
understanding of physics, perhaps even poking a hole in Einstein's theory
of gravity.</p>
<figure>
  <img width="900" height="445" src="http://bit.ly/1UFHdpf">
  <figcaption>Source:&nbsp;
    <a href="http://www.nasa.gov/mission_pages/hubble/hst_young_galaxies_200604.html">NASA</a>
  </figcaption>
</figure>

Send to Distro
mic —bash
$ curl --data "
<p>Astronomers just announced the universe might be expanding
<a href=\"http://hubblesite.org/newscenter/archive/releases/2016/17/text/\">up
to 9%</a> faster than we thought.</p><p>It's a surprising insight
that could put us one step closer to finally figuring out what the hell
<a href=\"http://science.nasa.gov/astrophysics/focus-areas/what-is-dark-energy/\">
dark energy and dark matter</a> are.
Or it could mean that we've gotten something fundamentally wrong in our
understanding of physics, perhaps even poking a hole in Einstein's theory
of gravity.</p>
<figure>
  <img width=\"900\" height=\"445\" src=\"http://bit.ly/1UFHdpf\">
  <figcaption>Source:&nbsp;
    <a href=\"http://www.nasa.gov/mission_pages/hubble/hst_young_galaxies_200604.html\">NASA</a>
  </figcaption>
</figure>
" https://distro.mic.com/1.0/format
Get back the format of your choice
Check out a sample response for:
Instant Articles
NEWS
Google AMP
mic —bash
<article>
  <p>Astronomers just announced the universe might be expanding
  <a href="http://hubblesite.org/newscenter/archive/releases/2016/17/text/">up to 9%</a>
  faster than we thought.</p>
  <p>It's a surprising insight that could put us one step closer to
  finally figuring out what the hell
  <a href="http://science.nasa.gov/astrophysics/focus-areas/what-is-dark-energy/">
  dark energy and dark matter</a> are. Or it could mean that we've
  gotten something fundamentally wrong in our understanding of physics,
  perhaps even poking a hole in Einstein's theory of gravity.</p>
  <figure data-feedback="fb:likes,fb:comments">
    <img src="http://bit.ly/1UFHdpf"></img>
    <figcaption><cite>
      Source: <a href="http://www.nasa.gov/mission_pages/hubble/hst_young_galaxies_200604.html">NASA</a>
    </cite></figcaption>
  </figure>
</article>
{
  "article": [
    {
      "text": "Astronomers just announced the universe might be expanding up to 9% faster than we thought.\n",
      "additions": [
        {
          "type": "link",
          "rangeStart": 59,
          "rangeLength": 8,
          "URL": "http://hubblesite.org/newscenter/archive/releases/2016/17/text/"
        }
      ],
      "inlineTextStyles": [
        {
          "rangeStart": 59,
          "rangeLength": 8,
          "textStyle": "bodyLinkTextStyle"
        }
      ],
      "role": "body",
      "layout": "bodyLayout"
    },
    {
      "text": "It's a surprising insight that could put us one step closer to finally figuring out what the hell  dark energy and dark matter are. Or it could mean that we've gotten something fundamentally wrong in our understanding of physics, perhaps even poking a hole in Einstein's theory of gravity.\n",
      "additions": [
        {
          "type": "link",
          "rangeStart": 98,
          "rangeLength": 28,
          "URL": "http://science.nasa.gov/astrophysics/focus-areas/what-is-dark-energy/"
        }
      ],
      "inlineTextStyles": [
        {
          "rangeStart": 98,
          "rangeLength": 28,
          "textStyle": "bodyLinkTextStyle"
        }
      ],
      "role": "body",
      "layout": "bodyLayout"
    },
    {
      "role": "container",
      "components": [
        {
          "role": "photo",
          "URL": "bundle://image-0.jpg",
          "style": "embedMediaStyle",
          "layout": "embedMediaLayout",
          "caption": {
            "text": "Source: \n    NASA\n  \n",
            "additions": [
              {
                "type": "link",
                "rangeStart": 13,
                "rangeLength": 4,
                "URL": "http://www.nasa.gov/mission_pages/hubble/hst_young_galaxies_200604.html"
              }
            ],
            "inlineTextStyles": [
              {
                "rangeStart": 13,
                "rangeLength": 4,
                "textStyle": "embedCaptionTextStyle"
              }
            ],
            "textStyle": "embedCaptionTextStyle"
          }
        }
      ],
      "layout": "embedLayout",
      "style": "embedStyle"
    }
  ],
  "bundlesToUrls": {
    "image-0.jpg": "http://bit.ly/1UFHdpf"
  }
}
<article>
  <p>Astronomers just announced the universe might be expanding
  <a href="http://hubblesite.org/newscenter/archive/releases/2016/17/text/">up to 9%</a>
  faster than we thought.</p>
  <p>It's a surprising insight that could put us one step closer to
  finally figuring out what the hell
  <a href="http://science.nasa.gov/astrophysics/focus-areas/what-is-dark-energy/">
  dark energy and dark matter</a> are. Or it could mean that we've
  gotten something fundamentally wrong in our understanding of physics,
  perhaps even poking a hole in Einstein's theory of gravity.</p>
  <figure>
    <amp-img width="900" height="445" layout="responsive" src="http://bit.ly/1UFHdpf"></amp-img>
    <figcaption>Source:
    <a href="http://www.nasa.gov/mission_pages/hubble/hst_young_galaxies_200604.html">NASA</a>
    </figcaption>
  </figure>
</article>