[PYTHON] Convert Qiita articles to Jekyll post format for backup

Perhaps a meteorite will fall and the article posted on Qiita will disappear. As a countermeasure, I wrote a script that can back up articles even where I can manage everything myself. It also gets the image and rewrites the link.

kotet/qiita-to-jekyll

How to use

  1. Obtain an access token from the Administration screen.
  2. python qiita-to-jekyll.py <access token>
  3. Articles and images are retrieved, converted and saved.

Example of conversion result/2016-12-14-a2203a400136ba50b41e.md


---
layout: post
title: "Hosting images by exploiting issues on GitHub"
tags: Qiita
---
This article is a reprint of what was posted on Qiita.

---
I didn't know so I posted it.
[Dash](https://github.com/Circular-Studios/Dash)There is a game engine written in D, but I was wondering where the image file of the huge logo at the top of the readme is.
![huge]({{site.url}}/assets/qiita/0/57768/cabd3a50-395c-ee60-6068-875e6b6a96f7.png)
//Omitted below//

option

--tag

tags can be specified.

--note

This article is a reprint of what was posted on Qiita. You can specify \ n --- .

--imgpath

Replace the URL of the image.

--postdir

Storage location of converted articles

--imagedir

Image storage location


It's getting better, but sometimes it still doesn't work. ~~ Make someone ~~ I want to do something about it.

Postscript: I tried using it on my site.

Recommended Posts

Convert Qiita articles to Jekyll post format for backup
Convert binary packages for windows to wheel format
Migrate Qiita articles to GitHub
Migrate Qiita articles to WordPress
Linux script to convert Markdown files from JupyterLab format to Qiita format
How to easily convert format from Markdown
Convert matplotlib graphs to emf file format
Convert GFF3 to MSS for DDBJ submission
[MNIST] Convert data to PNG for keras
Migrate Qiita articles to GitHub Pages + VuePress
Convert PDF attached to email to text format
Convert Python date types to RFC822 format
How to convert DateTimeField format in Django
convert youtube playlist to local m3u format file for smplayer (by toy tool)
Convert json format data to txt (using yolo)
String to Unicode Escape Sequence Format for Python
Convert strings to character-by-character list format with python
Try posting to Qiita for the first time