wp-md

wp-md

Wordpress to Jekyll markdown extractor and converter.

wp-md

Wordpress to Jekyll markdown extractor and converter.

I needed this because I nolonger had my website. Only an SQLDump.

You will need to create a mysql database and load your SQLDump. But that's not hard.

This set of scripts will query your mysql database and convert and rename the posts into individual jekyll/markdown posts using jekyll/markdown conventions for the header and naming.

You'll need to edit the posts afterward just to be sure. You may have HTML that the 'convert.sed' script does not handle. But the bulk of the work will be done.


environment

If you would like to share what is needed for your platform do a pull request and update this readme.


If you are wondering... This is shell, awk and sed. It just evolved that way. But It's a nice way to build things. If we get new queries, great. Everything is encapsulated and clear. Nothing is huge. New patterns for conversion, those go over there in the convert.sed file. It has, by default, a nice sustainable, maintainable architecture. I doubt that any other languages be faster.


Why ?

I needed this because I no longer had my wordpress site. I Only had the last SQLDump.

How ?

The first step is to set up a MySQL server and load your SQLDump into it. There are a bunch of articles on how to do that. It's really not hard.

I use Arch Linux so I just followed the directions for MariaDB the prefered flavor of MySQL on Arch.

There are ton of articles on how to setup mysql and restore an SQLDump, so I'm not going to talk about that here. Once you have your database up and running, all you really need to do is run the 'gen-posts' script.


gen-posts -u <userid> -d <database-name>

For me that was gen-posts -u eric -d ericgebhart

Or like this if you want to extract your pages into a different place:

gen-posts -u <username> -d <databasename> -q select_pages.sql -w wp_pages -m md_pages

Or if you don't want to query again but want to reconvert:

gen-posts -n

For help:

gen-posts -h

With my measly 22 posts this runs in a second or two. Then I have to check them all, edit any weirdness and add annoying things to the convert.sed script.

There is help. gen-posts -h to get a verbose explanation.


The process

The steps done by gen-posts are as follows:

  • Query the database and create all_posts.txt using the select-posts.sql query.
  • Use awk to extract all the posts into individual files in the wp_posts directory. These will be named in the pattern of wp_post<#>
  • Use html-md.sh to rename and convert the posts, using convert.sed for the cleanup and conversion to markdown, place the resulting markdown posts in the md_posts directory. These will have a nice name in the form of -.md</em></li> </ul> <hr> <h2 id="the-files">The Files</h2> <p>The program files should be pretty obvious, but just in case.</p> <h3 id="gen-posts">gen-posts</h3> <p>The master of all. It uses the query in <em>select-posts.sql</em> to get everything into a file named <strong>all_posts.txt</strong>. Then it has a line of awk to break <strong>all_posts.txt</strong> into individual wordpress posts. Then it lets <em>html-md</em> do the rest. There are options to do just about everything you would want. Run an alternate query, not run a query at all, put stuff in different directories. A basic command will look something like this. <code>gen-posts -u eric -d ericgebhart</code></p> <p>A more complex command could be something like this.</p> <p><code>gen-posts -u eric -d ericgebhart -q select_pages.sql -w wp_pages -m md_pages</code></p> <p>or to just redo the conversions from html to markdown again,</p> <p><code>gen-posts -n</code> or maybe <code>gen-posts -n -w wp_pages -m md_pages</code></p> <p>for a single file, which implies no query, this works.</p> <p><code>gen-posts -f <wp-post-filename></code><br>Add <code>-m directory-name</code> needed.</p> <h3 id="select-postssql-and-select-pagessql">select-posts.sql and select-pages.sql</h3> <p>There are two SQL queries one is <em>select-posts.sql</em> and the other is <em>select-pages.sql</em> They are pretty basic queries so you may want to roll your own. I'm sure you can find a post on the internet about the various ways to query posts by author and other things. The important parts are that the query uses the '\G' and that you get the title, the date and the content.</p> <p>If you dive into that take a look at the resulting 'all-posts' file you'll want your results to look like that.</p> <p><em>gen-posts</em> script has an option '-q' to pass any query you like.</p> <h3 id="html-md">html-md</h3> <p>The rest of this is done with <em>Awk</em> and <em>Sed</em>. The <em>html-md</em> script extracts the date and title to create the filename and creates the jekyll header for the post. It uses the <em>convert.sed</em> file for cleanup and the conversion from html to markdown Finally the output is piped through <em>fmt</em> which reformats the paragraphs from continuous text into lines with newlines. The default is a line length of 75 characters.</p> <p>If tags and category fields were added, this script would be the one that would need to change.</p> <h3 id="convertsed">convert.sed</h3> <p>This is just a list of sed commands to swap html tags for markdown or delete them all together. It also gets rid of the _^M_s that are everywhere, and the <em>Content:</em> label from the query. URLs are fixed, <em><pre></em> tags are left because they work.</p> <p>My HTML was pretty simple, YMMV. </p> <p>If you run into things I didn't cover which is likely, just add new patterns to 'convert.sed'.</p> <hr> <p>For more details on how this actually works read the code and additionally read my <a target="_blank" rel="nofollow noreferrer noopener external" href="http://ericgebhart.com/blog/code/2019-07-39-Converting-from-wordpress-to-markdown" title="Jekyll Themes">post</a></p> <hr> <p>Please, if you make improvements do a pull request so other people can enjoy the fruits of your labor.</p> <!-- HTML_TAG_END --></div> <div class="categories grid grid-cols-1 md:grid-cols-3 gap-1 lg:grid-cols-4 mt-3"><a data-sveltekit-prefetch class="relative font-bold grid place-items-center bg-red-400 hover:bg-red-600 text-white p-4" href="/category/minimal">minimal</a><a data-sveltekit-prefetch class="relative font-bold grid place-items-center bg-red-400 hover:bg-red-600 text-white p-4" href="/category/academic">academic</a><a data-sveltekit-prefetch class="relative font-bold grid place-items-center bg-red-400 hover:bg-red-600 text-white p-4" href="/category/resume">resume</a><a data-sveltekit-prefetch class="relative font-bold grid place-items-center bg-red-400 hover:bg-red-600 text-white p-4" href="/category/portfolio">portfolio</a><a data-sveltekit-prefetch class="relative font-bold grid place-items-center bg-red-400 hover:bg-red-600 text-white p-4" href="/category/documentation">documentation</a><a data-sveltekit-prefetch class="relative font-bold grid place-items-center bg-red-400 hover:bg-red-600 text-white p-4" href="/category/wiki">wiki</a><a data-sveltekit-prefetch class="relative font-bold grid place-items-center bg-red-400 hover:bg-red-600 text-white p-4" href="/category/tailwind">tailwind</a><a data-sveltekit-prefetch class="relative font-bold grid place-items-center bg-red-400 hover:bg-red-600 text-white p-4" href="/category/bootstrap">bootstrap</a><a data-sveltekit-prefetch class="relative font-bold grid place-items-center bg-red-400 hover:bg-red-600 text-white p-4" href="/category/dark">dark</a><a data-sveltekit-prefetch class="relative font-bold grid place-items-center bg-red-400 hover:bg-red-600 text-white p-4" href="/category/ecommerce">ecommerce</a><a data-sveltekit-prefetch class="relative font-bold grid place-items-center bg-red-400 hover:bg-red-600 text-white p-4" href="/category/github-pages">github-pages</a><a data-sveltekit-prefetch class="relative font-bold grid place-items-center bg-red-400 hover:bg-red-600 text-white p-4" href="/category/blog">blog</a></div> </div> <footer class="border-t border-gray-400 mt-20 py-4"><ul class="md:flex items-center"><li class="mr-3"><a class="underline hover:text-red-500" href="/" title="Home">Home</a> </li><li class="mr-3"><a class="underline hover:text-red-500" href="/blog" title="Blog">Blog</a> </li><li class="mr-3"><a class="underline hover:text-red-500" href="/free" title="Free Themes">Free Themes</a> </li><li class="mr-3"><a class="underline hover:text-red-500" href="/category" title="Categories">Categories</a> </li><li class="mr-3"><a class="underline hover:text-red-500" href="/sitemap.xml" title="Sitemap">Sitemap</a> </li></ul></footer></div> <div class="loader-animation svelte-dd0kya"><div class="box-loader svelte-15wh1h2"><div class="container-1 svelte-15wh1h2"><div class="glass svelte-15wh1h2"><div class="cap-left svelte-15wh1h2"><span></span></div> <div class="cap-right svelte-15wh1h2"><span></span></div> <div class="fill svelte-15wh1h2"><div class="bubble-1 svelte-15wh1h2"><span></span></div> <div class="bubble-2 svelte-15wh1h2"><span></span></div> <div class="bubble-3 svelte-15wh1h2"><span></span></div> <div class="bubble-4 svelte-15wh1h2"><span></span></div> <div class="bubble-5 svelte-15wh1h2"><span></span></div> <div class="bubble-6"><span></span></div></div></div></div> </div></div> <script type="application/json" data-sveltekit-fetched data-url="/api/EricGebhart/wp-md.json" data-ttl="604800">{"status":200,"statusText":"","headers":{},"body":"{\"id\":\"MDEwOlJlcG9zaXRvcnkxOTkyOTg5MDg=\",\"stargazerCount\":0,\"updatedAt\":\"2019-07-31T10:17:22Z\",\"homepageUrl\":null,\"description\":\"Wordpress to Jekyll markdown extractor and converter.\",\"descriptionHTML\":\"\u003Cdiv>Wordpress to Jekyll markdown extractor and converter.\u003C/div>\",\"forkCount\":0,\"openGraphImageUrl\":\"https://opengraph.githubassets.com/47ebaae4d8e49d71def43945942c9041d42604e339cad34a44c2d7250248f416/EricGebhart/wp-md\",\"url\":\"https://github.com/EricGebhart/wp-md\",\"nameWithOwner\":\"EricGebhart/wp-md\",\"name\":\"wp-md\",\"readme1\":{\"text\":\"# wp-md\\nWordpress to Jekyll markdown extractor and converter.\\n\\nI needed this because I nolonger had my website. \\n*Only an SQLDump.* \\n\\nYou will need to create a mysql database and load your SQLDump.\\nBut that's not hard. \\n\\nThis set of scripts will query your mysql database and convert\\nand rename the posts into individual jekyll/markdown posts using\\njekyll/markdown conventions for the header and naming.\\n\\nYou'll need to edit the posts afterward just to be sure. \\nYou may have HTML that the 'convert.sed' script does not handle.\\nBut the bulk of the work will be done.\\n\\n---\\n\\n### environment\\n\\nIf you would like to share what is needed for your platform do\\na pull request and update this readme.\\n\\n---\\nIf you are wondering...\\nThis is shell, awk and sed. \\nIt just evolved that way.\\nBut It's a nice way to build things. If we get new\\nqueries, great. Everything is encapsulated and clear. \\nNothing is huge. New patterns for\\nconversion, those go over there in the _convert.sed_ file. It has, by default, a nice sustainable, maintainable architecture.\\nI doubt that any other languages be faster.\\n\\n---\\n\\n## Why ?\\n\\nI needed this because I no longer had my wordpress site. I Only \\nhad the last SQLDump.\\n\\n## How ?\\n\\nThe first step is to set up a MySQL server and load your SQLDump\\ninto it. There are a bunch of articles on how to do that.\\nIt's really not hard.\\n\\nI use Arch Linux so I just followed the [directions](http://wiki.archlinux.org/index.php/MariaDB) for MariaDB\\nthe prefered flavor of MySQL on Arch.\\n\\nThere are ton of articles on how to setup mysql and restore\\nan SQLDump, so I'm not going to talk about that here.\\nOnce you have your database up and running, all you really \\nneed to do is run the 'gen-posts' script.\\n\\n---\\n\\n`gen-posts -u \u003Cuserid> -d \u003Cdatabase-name>`\\n\\nFor me that was `gen-posts -u eric -d ericgebhart` \\n\\nOr like this if you want to extract your pages into a different place:\\n\\n`gen-posts -u \u003Cusername> -d \u003Cdatabasename> -q select_pages.sql -w wp_pages -m md_pages`\\n\\nOr if you don't want to query again but want to reconvert:\\n\\n`gen-posts -n`\\n\\nFor help:\\n\\n`gen-posts -h`\\n\\nWith my measly 22 posts this runs in a second or two. \\nThen I have to check them all, edit any weirdness and \\nadd annoying things to the `convert.sed` script.\\n\\nThere is _help_. `gen-posts -h` to get a verbose explanation.\\n\\n---\\n\\n## The process\\n\\nThe steps done by _gen-posts_ are as follows:\\n\\n * Query the database and create _all_posts.txt_ using the\\n *select-posts.sql* query.\\n * Use *awk* to extract all the posts into individual files \\n in the *wp_posts* directory. These will be named \\n in the pattern of _wp_post\u003C#>_\\n * Use *html-md.sh* to rename and convert the posts, \\n using *convert.sed* for the cleanup and conversion to markdown,\\n place the resulting markdown posts in the \\n _md_posts_ directory. These will have a nice name in\\n the form of _\u003CDate>-\u003CTitle>.md_\\n\\n---\\n\\n## The Files\\n\\nThe program files should be pretty obvious, but just in case.\\n\\n### gen-posts\\n\\nThe master of all. It uses the query in *select-posts.sql* \\nto get everything into a file named __all_posts.txt__.\\nThen it has a line of awk to break __all_posts.txt__ into individual wordpress posts. \\nThen it lets _html-md_ do the rest.\\nThere are options to do just about everything you would want.\\nRun an alternate query, not run a query at all, put stuff in\\ndifferent directories. A basic command will look something like this. \\n`gen-posts -u eric -d ericgebhart`\\n\\nA more complex command could be something like this.\\n\\n`gen-posts -u eric -d ericgebhart -q select_pages.sql -w wp_pages -m md_pages`\\n\\nor to just redo the conversions from html to markdown again,\\n\\n`gen-posts -n` or maybe `gen-posts -n -w wp_pages -m md_pages`\\n\\nfor a single file, which implies no query, this works.\\n\\n`gen-posts -f \u003Cwp-post-filename>` \\nAdd `-m directory-name` needed.\\n\\n### select-posts.sql and select-pages.sql\\n\\nThere are two SQL queries one is *select-posts.sql* and \\nthe other is *select-pages.sql* They are pretty\\nbasic queries so you may want to roll your own.\\nI'm sure you can find a post on the internet \\nabout the various ways to query posts by author and \\nother things. \\nThe important parts are that the query uses the '\\\\G'\\nand that you get the title, the date and the content.\\n\\nIf you dive into that take a look at the resulting 'all-posts' \\nfile you'll want your results to look like that.\\n\\n_gen-posts_ script has an option '-q' to pass any query you like.\\n\\n### html-md\\n\\nThe rest of this is done with *Awk* and *Sed*. The _html-md_ script\\nextracts the date and title to create the filename and creates the jekyll\\nheader for the post. It uses the _convert.sed_ file for cleanup and the conversion from html to markdown\\nFinally the output is piped through *fmt* which reformats the paragraphs\\nfrom continuous text into lines with newlines. The default is a line length of 75 characters.\\n\\nIf tags and category fields were added, this script would be the\\none that would need to change.\\n\\n### convert.sed\\n\\nThis is just a list of sed commands to swap html tags for markdown\\nor delete them all together. It also gets rid of the _^M_s that are\\neverywhere, and the _Content:_ label from the query.\\nURLs are fixed, _\u003Cpre>_ tags are left because they work.\\n\\nMy HTML was pretty simple, YMMV. \\n\\nIf you run into things I didn't cover which is likely,\\njust add new patterns to 'convert.sed'.\\n\\n---\\n\\nFor more details on how this actually works read the code\\nand additionally read my [post](http://ericgebhart.com/blog/code/2019-07-39-Converting-from-wordpress-to-markdown)\\n\\n---\\n\\nPlease, if you make improvements do a pull request so other\\npeople can enjoy the fruits of your labor.\\n\\n \\n\"},\"readme2\":null,\"readme3\":null,\"readme4\":null,\"readme5\":null,\"repositoryTopics\":{\"nodes\":[]},\"owner\":{\"avatarUrl\":\"https://avatars.githubusercontent.com/u/3607474?s=30&v=4\",\"url\":\"https://github.com/EricGebhart\",\"login\":\"EricGebhart\"},\"htmlContent\":\"\u003Ch1 id=\\\"wp-md\\\">wp-md\u003C/h1>\\n\u003Cp>Wordpress to Jekyll markdown extractor and converter.\u003C/p>\\n\u003Cp>I needed this because I nolonger had my website. \\n\u003Cem>Only an SQLDump.\u003C/em> \u003C/p>\\n\u003Cp>You will need to create a mysql database and load your SQLDump.\\nBut that's not hard. \u003C/p>\\n\u003Cp>This set of scripts will query your mysql database and convert\\nand rename the posts into individual jekyll/markdown posts using\\njekyll/markdown conventions for the header and naming.\u003C/p>\\n\u003Cp>You'll need to edit the posts afterward just to be sure. \\nYou may have HTML that the 'convert.sed' script does not handle.\\nBut the bulk of the work will be done.\u003C/p>\\n\u003Chr>\\n\u003Ch3 id=\\\"environment\\\">environment\u003C/h3>\\n\u003Cp>If you would like to share what is needed for your platform do\\na pull request and update this readme.\u003C/p>\\n\u003Chr>\\n\u003Cp>If you are wondering...\\nThis is shell, awk and sed. \\nIt just evolved that way.\\nBut It's a nice way to build things. If we get new\\nqueries, great. Everything is encapsulated and clear. \\nNothing is huge. New patterns for\\nconversion, those go over there in the \u003Cem>convert.sed\u003C/em> file. It has, by default, a nice sustainable, maintainable architecture.\\nI doubt that any other languages be faster.\u003C/p>\\n\u003Chr>\\n\u003Ch2 id=\\\"why-\\\">Why ?\u003C/h2>\\n\u003Cp>I needed this because I no longer had my wordpress site. I Only \\nhad the last SQLDump.\u003C/p>\\n\u003Ch2 id=\\\"how-\\\">How ?\u003C/h2>\\n\u003Cp>The first step is to set up a MySQL server and load your SQLDump\\ninto it. There are a bunch of articles on how to do that.\\nIt's really not hard.\u003C/p>\\n\u003Cp>I use Arch Linux so I just followed the \u003Ca target=\\\"_blank\\\" rel=\\\"nofollow noreferrer noopener external\\\" href=\\\"http://wiki.archlinux.org/index.php/MariaDB\\\" title=\\\"Jekyll Themes\\\">directions\u003C/a> for MariaDB\\nthe prefered flavor of MySQL on Arch.\u003C/p>\\n\u003Cp>There are ton of articles on how to setup mysql and restore\\nan SQLDump, so I'm not going to talk about that here.\\nOnce you have your database up and running, all you really \\nneed to do is run the 'gen-posts' script.\u003C/p>\\n\u003Chr>\\n\u003Cp>\u003Ccode>gen-posts -u <userid> -d <database-name>\u003C/code>\u003C/p>\\n\u003Cp>For me that was \u003Ccode>gen-posts -u eric -d ericgebhart\u003C/code> \u003C/p>\\n\u003Cp>Or like this if you want to extract your pages into a different place:\u003C/p>\\n\u003Cp>\u003Ccode>gen-posts -u <username> -d <databasename> -q select_pages.sql -w wp_pages -m md_pages\u003C/code>\u003C/p>\\n\u003Cp>Or if you don't want to query again but want to reconvert:\u003C/p>\\n\u003Cp>\u003Ccode>gen-posts -n\u003C/code>\u003C/p>\\n\u003Cp>For help:\u003C/p>\\n\u003Cp>\u003Ccode>gen-posts -h\u003C/code>\u003C/p>\\n\u003Cp>With my measly 22 posts this runs in a second or two. \\nThen I have to check them all, edit any weirdness and \\nadd annoying things to the \u003Ccode>convert.sed\u003C/code> script.\u003C/p>\\n\u003Cp>There is \u003Cem>help\u003C/em>. \u003Ccode>gen-posts -h\u003C/code> to get a verbose explanation.\u003C/p>\\n\u003Chr>\\n\u003Ch2 id=\\\"the-process\\\">The process\u003C/h2>\\n\u003Cp>The steps done by \u003Cem>gen-posts\u003C/em> are as follows:\u003C/p>\\n\u003Cul>\\n\u003Cli>Query the database and create \u003Cem>all_posts.txt\u003C/em> using the\\n\u003Cem>select-posts.sql\u003C/em> query.\u003C/li>\\n\u003Cli>Use \u003Cem>awk\u003C/em> to extract all the posts into individual files \\nin the \u003Cem>wp_posts\u003C/em> directory. These will be named \\nin the pattern of \u003Cem>wp_post<#>\u003C/em>\u003C/li>\\n\u003Cli>Use \u003Cem>html-md.sh\u003C/em> to rename and convert the posts, \\nusing \u003Cem>convert.sed\u003C/em> for the cleanup and conversion to markdown,\\nplace the resulting markdown posts in the \\n\u003Cem>md_posts\u003C/em> directory. These will have a nice name in\\nthe form of \u003Cem>\u003CDate>-\u003CTitle>.md\u003C/em>\u003C/li>\\n\u003C/ul>\\n\u003Chr>\\n\u003Ch2 id=\\\"the-files\\\">The Files\u003C/h2>\\n\u003Cp>The program files should be pretty obvious, but just in case.\u003C/p>\\n\u003Ch3 id=\\\"gen-posts\\\">gen-posts\u003C/h3>\\n\u003Cp>The master of all. It uses the query in \u003Cem>select-posts.sql\u003C/em> \\nto get everything into a file named \u003Cstrong>all_posts.txt\u003C/strong>.\\nThen it has a line of awk to break \u003Cstrong>all_posts.txt\u003C/strong> into individual wordpress posts. \\nThen it lets \u003Cem>html-md\u003C/em> do the rest.\\nThere are options to do just about everything you would want.\\nRun an alternate query, not run a query at all, put stuff in\\ndifferent directories. A basic command will look something like this. \\n\u003Ccode>gen-posts -u eric -d ericgebhart\u003C/code>\u003C/p>\\n\u003Cp>A more complex command could be something like this.\u003C/p>\\n\u003Cp>\u003Ccode>gen-posts -u eric -d ericgebhart -q select_pages.sql -w wp_pages -m md_pages\u003C/code>\u003C/p>\\n\u003Cp>or to just redo the conversions from html to markdown again,\u003C/p>\\n\u003Cp>\u003Ccode>gen-posts -n\u003C/code> or maybe \u003Ccode>gen-posts -n -w wp_pages -m md_pages\u003C/code>\u003C/p>\\n\u003Cp>for a single file, which implies no query, this works.\u003C/p>\\n\u003Cp>\u003Ccode>gen-posts -f <wp-post-filename>\u003C/code>\u003Cbr>Add \u003Ccode>-m directory-name\u003C/code> needed.\u003C/p>\\n\u003Ch3 id=\\\"select-postssql-and-select-pagessql\\\">select-posts.sql and select-pages.sql\u003C/h3>\\n\u003Cp>There are two SQL queries one is \u003Cem>select-posts.sql\u003C/em> and \\nthe other is \u003Cem>select-pages.sql\u003C/em> They are pretty\\nbasic queries so you may want to roll your own.\\nI'm sure you can find a post on the internet \\nabout the various ways to query posts by author and \\nother things. \\nThe important parts are that the query uses the '\\\\G'\\nand that you get the title, the date and the content.\u003C/p>\\n\u003Cp>If you dive into that take a look at the resulting 'all-posts' \\nfile you'll want your results to look like that.\u003C/p>\\n\u003Cp>\u003Cem>gen-posts\u003C/em> script has an option '-q' to pass any query you like.\u003C/p>\\n\u003Ch3 id=\\\"html-md\\\">html-md\u003C/h3>\\n\u003Cp>The rest of this is done with \u003Cem>Awk\u003C/em> and \u003Cem>Sed\u003C/em>. The \u003Cem>html-md\u003C/em> script\\nextracts the date and title to create the filename and creates the jekyll\\nheader for the post. It uses the \u003Cem>convert.sed\u003C/em> file for cleanup and the conversion from html to markdown\\nFinally the output is piped through \u003Cem>fmt\u003C/em> which reformats the paragraphs\\nfrom continuous text into lines with newlines. The default is a line length of 75 characters.\u003C/p>\\n\u003Cp>If tags and category fields were added, this script would be the\\none that would need to change.\u003C/p>\\n\u003Ch3 id=\\\"convertsed\\\">convert.sed\u003C/h3>\\n\u003Cp>This is just a list of sed commands to swap html tags for markdown\\nor delete them all together. It also gets rid of the _^M_s that are\\neverywhere, and the \u003Cem>Content:\u003C/em> label from the query.\\nURLs are fixed, \u003Cem>\u003Cpre>\u003C/em> tags are left because they work.\u003C/p>\\n\u003Cp>My HTML was pretty simple, YMMV. \u003C/p>\\n\u003Cp>If you run into things I didn't cover which is likely,\\njust add new patterns to 'convert.sed'.\u003C/p>\\n\u003Chr>\\n\u003Cp>For more details on how this actually works read the code\\nand additionally read my \u003Ca target=\\\"_blank\\\" rel=\\\"nofollow noreferrer noopener external\\\" href=\\\"http://ericgebhart.com/blog/code/2019-07-39-Converting-from-wordpress-to-markdown\\\" title=\\\"Jekyll Themes\\\">post\u003C/a>\u003C/p>\\n\u003Chr>\\n\u003Cp>Please, if you make improvements do a pull request so other\\npeople can enjoy the fruits of your labor.\u003C/p>\\n\"}"}</script> <script> { __sveltekit_2alqnt = { base: new URL("..", location).pathname.slice(0, -1), env: {} }; const element = document.currentScript.parentElement; const data = [null,null]; Promise.all([ import("../_app/immutable/entry/start.60b4bdf8.js"), import("../_app/immutable/entry/app.d56797c8.js") ]).then(([kit, app]) => { kit.start(app, element, { node_ids: [0, 13], data, form: null, error: null }); }); if ('serviceWorker' in navigator) { addEventListener('load', function () { navigator.serviceWorker.register('../service-worker.js'); }); } } </script> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js" crossorigin="anonymous"></script> </div> </body> </html>