make stuff more portable and improve the cli #4

Merged
mossfet merged 7 commits from portability into main 2023-07-02 10:39:30 +00:00
Member

this pr has a lot of changes. first, i improved the CLI quite a bit. second, i added the directories crate to the shared crate which means meowy-webring has a data directory it can look to and my abstracted functions automatically create directories and files if they don't exist, so names.json will live in whatever is the default data directory place your OS says it is under the meowy-webring folder.

this pr has a lot of changes. first, i improved the CLI quite a bit. second, i added the directories crate to the shared crate which means meowy-webring has a data directory it can look to and my abstracted functions automatically create directories and files if they don't exist, so names.json will live in whatever is the default data directory place your OS says it is under the meowy-webring folder.
Fries added 7 commits 2023-07-02 05:27:00 +00:00
the cli now uses a new module in the shared crate, called directories
which is a module that has functions for directory stuff, mainly, it
uses the directories crate to have a portable way to have directories
for the application like data directories and config directories.

i also added logging to the shared and cli crates, so you can see debug
stuff with the RUST_LOG environment variable.
this has abstractions for getting the names.json file and reading them
and parsing them. i also moved the cli logger initialization code into
its own module.
this means you can print both the url and the name at the same time
with a seperator character for easy parsing.
this makes the print function a bit cleaner.
this let's you print a json string.
this lets you put a url in and the print command will filter it to that.
mossfet merged commit df86523df2 into main 2023-07-02 10:39:30 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Solarpunk/meowy-webring#4
No description provided.