Commit graph

13 commits

Author SHA1 Message Date
33f0b6a5e9 don't panic on parsing error with running watcher
this means the watcher doesn't stop working if someone makes an edit to
names.json that results in a parser error. it will just print out the
error and keep the old configuration. if you restart the program and the
file still has an error, the program won't start.
2023-07-03 22:41:32 -07:00
d6a763a90b change spelling of seperator to separator
looks like i spelt that wrong..
2023-07-03 16:19:45 -07:00
82e8f68862 make printing less complicated and refactor cli
i made printing less complicated by making printing both the name and
the url with the seperator the default option and using both those flags
at the same time should do the same thing as just printing without any
flags.

i also refactored commands into their own module folder with each
command getting their own file module.
2023-07-02 19:46:19 -07:00
0c5fce59ca add an error if you try to add a url that exists. 2023-07-01 22:14:33 -07:00
a08502cc73 add a filter argument to the print command
this lets you put a url in and the print command will filter it to that.
2023-07-01 22:10:58 -07:00
f37034b8d8 add json string support to the cli's print command
this let's you print a json string.
2023-07-01 20:49:59 -07:00
e93b201d77 move command group printing logic into function
this makes the print function a bit cleaner.
2023-07-01 20:39:56 -07:00
7f36560e25 add a seperator character
this means you can print both the url and the name at the same time
with a seperator character for easy parsing.
2023-07-01 20:34:28 -07:00
b58b0cd78f meowy_webring::main now uses the shared crate
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.
2023-07-01 19:49:48 -07:00
8206cc6105 make the cli more portable, and add logging
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.
2023-07-01 18:27:03 -07:00
9411e4a097 add a remove command and error handling to the cli 2023-06-30 23:12:55 -07:00
c729d2115b add a add command to the cli
this command can add sites to the names.json file
2023-06-30 22:11:44 -07:00
c481999c55 add a work in progress cli and fix bugs
i'm making a cli that lets you add stuff to the names.json file and read
data from it and i moved stuff that can be shared between them like the
Site struct to a shared crate thats in workspace, like the cli crate. i
also switched to using typed json parsing which works well.
2023-06-30 21:43:18 -07:00