{"id":286,"date":"2024-04-21T11:54:04","date_gmt":"2024-04-21T11:54:04","guid":{"rendered":"https:\/\/www.beer.org\/blog\/?p=286"},"modified":"2024-04-21T11:54:04","modified_gmt":"2024-04-21T11:54:04","slug":"migrating-from-mediawiki-to-bookstack","status":"publish","type":"post","link":"https:\/\/www.beer.org\/blog\/index.php\/2024\/04\/21\/migrating-from-mediawiki-to-bookstack\/","title":{"rendered":"Migrating from MediaWiki to Bookstack."},"content":{"rendered":"<p>My long relationship with MediaWiki is over.\u00a0 It&#8217;s been over for a while if I&#8217;m honest.<\/p>\n<p>Anyway, there&#8217;s no trivial way to import MediaWiki data into Bookstack but here&#8217;s what I did:<\/p>\n<ol>\n<li>First I installed Bookstack.<\/li>\n<li>Then export MediaWiki data to xml:<br \/>\n<blockquote><p>php maintenance\/dumpBackup.php &#8211;current &#8211;include-files &gt; \/tmp\/all_pages.xml<\/p><\/blockquote>\n<\/li>\n<li>Clone https:\/\/github.com\/outofcontrol\/mediawiki-to-gfm<br \/>\n<blockquote><p>.\/convert.php &#8211;filename=\/tmp\/all_pages.xml &#8211;output=\/path\/to\/converted\/files<\/p><\/blockquote>\n<\/li>\n<li>Find where your images went:<br \/>\n<blockquote><p>php maintenance\/dumpUploads.php<\/p><\/blockquote>\n<\/li>\n<li>Clone<br \/>\n<blockquote><p>https:\/\/github.com\/Yetangitu\/bs<\/p><\/blockquote>\n<\/li>\n<li>Go to your bookstack implementation and get an API key.<\/li>\n<li>Follow the instructions for &#8216;bs&#8217; to configure it with your API key.<\/li>\n<li>use &#8216;bs&#8217; to create books\/chapters\/pages using the data from step 3.<\/li>\n<li>Upload the images from step 4.<\/li>\n<li>A bunch of manual cleanup and reorganizing.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>This is not for the faint of heart but it&#8217;s also not difficult.\u00a0 Just a bit tedious.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My long relationship with MediaWiki is over.\u00a0 It&#8217;s been over for a while if I&#8217;m honest. Anyway, there&#8217;s no trivial way to import MediaWiki data into Bookstack but here&#8217;s what I did: First I installed Bookstack. Then export MediaWiki data to xml: php maintenance\/dumpBackup.php &#8211;current &#8211;include-files &gt; \/tmp\/all_pages.xml Clone https:\/\/github.com\/outofcontrol\/mediawiki-to-gfm .\/convert.php &#8211;filename=\/tmp\/all_pages.xml &#8211;output=\/path\/to\/converted\/files Find where&#8230; <a class=\"moretag\" href=\"https:\/\/www.beer.org\/blog\/index.php\/2024\/04\/21\/migrating-from-mediawiki-to-bookstack\/\">Continue reading &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-286","post","type-post","status-publish","format-standard","hentry","category-tech-stuff"],"_links":{"self":[{"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/286","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=286"}],"version-history":[{"count":1,"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/286\/revisions"}],"predecessor-version":[{"id":287,"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/286\/revisions\/287"}],"wp:attachment":[{"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}