Open simonw opened 3 years ago
I'm going to start with github-to-sqlite get
and github-to-sqlite post
- I may add put
and suchlike later on.
I'd like a --paginate
option that does the same thing as https://github.com/simonw/paginate-json
Fun demo of the --nl
option:
github-to-sqlite get /users/simonw/repos --paginate --nl | sqlite-utils insert simonw.db repos - --nl
Bug with endpoints that return dictionaries rather than arrays:
github-to-sqlite get /users/simonw
[
"login",
"id",
"node_id",
"avatar_url",
"gravatar_id",
"url",
"html_url",
"followers_url",
"following_url",
"gists_url",
"starred_url",
"subscriptions_url",
"organizations_url",
"repos_url",
"events_url",
"received_events_url",
"type",
"site_admin",
"name",
"company",
"blog",
"location",
"email",
"hireable",
"bio",
"twitter_username",
"public_repos",
"public_gists",
"followers",
"following",
"created_at",
"updated_at"
]
It would be useful if you could pass an --accept
option to this.
Demo of --accept
:
github-to-sqlite get /repos/simonw/datasette/readme --accept 'application/vnd.github.VERSION.html'
Similar to
twitter-to-sqlite fetch
, see https://github.com/dogsheep/twitter-to-sqlite/issues/51