This works using the override_color() function within common.rs, which,
using colored's set_override function and if set to false in the config
file, will disable all coloring within the program, in case your
terminal isn't that fancy.
Errors and messages will now be handled by a single module called
message.rs. This module has a new function called append_emoji(), which
will prefix emojis to each message. It also adds an enum named
EmojiType, which will contain each possible emoji prefix. Lastly, add
two new configs: "display_emoji" and "display_colors". "display_colors"
is yet to be implemented.
This happened to be an issue with the terminal I was using to test out
Vento. It would not space emojis correctly, causing them to require an
additional whitespace to be displayed correctly. Now that I've switched
terminals, it's now displayed as it really is: two whitespaces. Remove
the additional whitespaces I've accidentally added.
Since error refactoring was quite incomplete, I've added more errors for other parts of Vento. This should cover almost every error except slot errors, since those require their own formatting.
The only caveat is the limitations of the man library will not
allow me to write more in-depth documentation of the new flags. Maybe if
I go through refactoring the binary side using clap this will be easier.
This exports all contents in your vento directory into an xz tarball.
Needs documentation, but essentially it works using `vento -E`. Mind the
uppercase E there!
Currently undocumented, but this should allow users to export their
inventory slots as xz tarballs using `vento -e`. Ideal for sharing
collections of files to friends!
Since many of the errors were being reiterated in the files for the
binaries I've decided to refactor them so we borrow which errors we want
to show from an enum and then execute a function which essentially bails
and matches each error.
After the situation with the developers of Gitea wanting to privatize
their project and experiment with DAOs, I've decided to finally switch
to Sourcehut. The opinions on this forge are generally favorable, so I'm
hoping this will be for the best.
The slot switching action had a different emoji for confirming the
command was successful compared to other actions, so I switched it for
the green checkmark.
When undoing a slot switching command, it would show the message
normally show when running the command by itself, which is not supposed
to happen. This commit fixes that by adding a boolean argument that will
print the message when true.
Turns out the history didn't include undoing slot switching, so an
action could accidentally be undone in the wrong slot. I've fixed that
and also reorganized the source so undoing actions wouldn't be pegged to
the item module.
Brand new feature! Now you can easily undo your last action using "vento
-u". While not a fully-fledged history, if you messed something up
during your last action, you can now easily undo it! Thank you
@Ephera@lemmy.ml for the suggestion!
(https://slrpnk.net/post/103331/comment/24020)
This is part of a user-suggested feature made by @Ephera@lemmy.ml over
on Lemmy (https://slrpnk.net/post/103331/comment/24020). It stores the
last action so it can later be undone by the user. Maybe if I feel
generous I might store a longer history in an SQLite database, but for
now a simple text file will do. The command for undoing will follow.
These suggestions were made by cargo clippy. These clones were
previously there to remove compiler messages, but it seems like they're
not needed anymore.
This was suggested by @Ephera@lemmy.ml on Lemmy
(https://slrpnk.net/post/103331/comment/24020) and I've decided to
implement it, since it's not really a hard thing to do and makes the
tool more intuitive.
This commit should remove some contexts that actually made some errors
more difficult to read. They will now display the idiomatic errors
generated by anyhow.
After learning more about structs, I've decided to try and use them in
the common module. It replaces the original behavior of delivering the
data using a vector in favor of the Settings struct, also defined on the
same file.