Githubのリポジトリが増えてくると何してたのかわからなくなるので一覧ななにかを用意する。
Descriptionに要素技術とかをちまちま入力していきたい。
- リポジトリ名
- GithubでのURL
- Description
を一覧する
作成物
作成物はここ。
内容
- curlでAPIからjson取得
- 取得結果をパース
プログラム
import json
with open('repos1') as f:
jsons = json.loads(f.read().strip())
for j in jsons:
print(j['full_name'])
print(j['html_url'])
print(j['description'])
print("\n")
#!/bin/bash
curl -u ${1} "https://api.github.com/user/repos?per_page=100&page=1" > repos1
python a.py > result.txt
rm -f repos1
open result.txt
rm -f result.txt
結果(抜粋)
.
.
.
modeverv/filedb
https://github.com/modeverv/filedb
None
.
.
.
modeverv/first-vue.js
https://github.com/modeverv/first-vue.js
None
.
.
.