LoginSignup
2
1

Qiitaから記事をエクスポートする

Posted at

はじめに

個人ブログを作りたく、Qiitaの記事を引っ越したいなぁと思っていたのですが、
どうやら機能としてエクスポートはサポートされていない様子。

手間かけずにMarkdownで出力できないかと調べていたら既に先人がいらっしゃったので参考にしました。

記事のエクスポート

ほとんど以下の記事の内容で出力できました。ありがたや。。
https://qiita.com/Trouble_SUM/items/d14ec5abae867b9e5a6b

少し手を加えた部分として、一発のAPIで取得できる項目数がデフォルト 20 なので、per_pageを指定することで取得数を上書きしています。

wget $(curl -H Bearer 5f7c14db673f13a831867b66a4a8f4dc6e32d3bf -s 'https://qiita.com/api/v2/users/<ユーザID>/items?per_page=50' | jq -r '[.[].url+".md"]|join(" ")')       
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1