dogsheep / github-to-sqlite

Save data from GitHub to a SQLite database
https://github-to-sqlite.dogsheep.net/
Apache License 2.0
402 stars 43 forks source link

Command for fetching file contents #53

Open simonw opened 3 years ago

simonw commented 3 years ago

Something like this:

github-to-sqlite files github.db simonw/datasette

This would fetch all files from the main branch into a files table.

Additional options could handle things like pulling files from a branch or tag, or just pulling files that match a specific glob or that exist in a specific directory.

simonw commented 3 years ago

Given rate limits (see #51) this command might be better implemented by running a git clone into a temporary directory - doing so would retrieve all of the files in one go.