langs-in-rust
langs-in-rust copied to clipboard
Replace Python script w/ Cargo script.
Fixes #102.
This replaces the Python script for updating data for the tracked languages and regenerating the README with a new Cargo script, which lets us use Rust code instead of Python!
Quick design thing. Related to this, I'm thinking of the following:
- Turning
languages.jsonintolanguages.toml, so it's more human-writeable. - Moving the stars-caching thing into a file under a
.datafolder calledstars.tomlthat just maps languages to stars data, along with anupdated_ontimestamp at the top to say when the file was last updated. - Updating the
READMEto include a regeneration timestamp at the top.
So the workflow as a contributor would be:
- Add a language to
languages.toml - Running
./update.rs -uto update cached data for any langs on GitHub. - Running
./update.rs -gto generate a newREADME.mdfile.
In terms of commands, I'd like to replace the existing commands and rename the script, so it becomes:
./langs [add/remove/edit/update].
addwould add a new language, sync with external API if necessary, update caches, and update the READMEremovewould remove an existing language, clear its data from the cache, and update the READMEeditwould edit an existing language, clear its data from the caches, and update the READMEupdatewould sync with external APIs, update the caches, and update the README
Also probably just have one cache file. Maybe consider even making it SQLite