Introduces a Config struct which right now only contains a base_path URL
The config is loaded when the central Popgetter struct is initialised and then passed into the individual metadata fetching methods.
The config is loaded from ~/.config/popgetter/config.toml (or the equivalent XDG path). If the file doesn't exist, uses the Default implementation.
Reads in the list of countries from a top-level countries.txt file in the blob storage, rather than a hardcoded list of countries.
It's still unclear how we generate this file (I did it manually this time). This should be an upstream issue.
Adds some basic logging
Adds caching of Rust crates to speed up GHA builds
I've also dealt with the merge conflicts from the 30-search-metadata branch 🙂
The key changes are in src/config.rs and src/metadata.rs, the rest is mostly fluff from cleaning up warnings etc
old todolist
[x] Remove http client, remove features for local file reading
As discussed on Monday 3 June, we only intend to support reading files from the Internet and not from the local filesystem. In the event where we want to work offline / develop quickly using data on the local filesystem, we should instead set up a HTTP server that simply serves that data
[x] Refactor command run, only pass config into Popgetter struct
[x] Add serde derives for Config
Figure out what kind of server supports range requests (python -m http.server doesn't do it)
This is now #37
This PR:
Config
struct which right now only contains a base_path URLPopgetter
struct is initialised and then passed into the individual metadata fetching methods.~/.config/popgetter/config.toml
(or the equivalent XDG path). If the file doesn't exist, uses theDefault
implementation.countries.txt
file in the blob storage, rather than a hardcoded list of countries.30-search-metadata
branch 🙂The key changes are in
src/config.rs
andsrc/metadata.rs
, the rest is mostly fluff from cleaning up warnings etcold todolist
Figure out what kind of server supports range requests (This is now #37python -m http.server
doesn't do it)