Commit Graph

18 Commits

Author SHA1 Message Date
Lux Aliaga a841ba974c bin: Refactor binaries on Clap
This has been an idea that has been on my mind for a bit. My argument
parser was very complex and hard to maintain. Therefore, I've decided
to refactor them using the Clap crate, which should make this more
straight forward.
2023-08-21 13:34:01 -04:00
Lux Aliaga 52a830331c src: Linting and formatting
I passed the file through rustfmt and rust-clippy in order to fulfill
some suggestions. Didn't do this before because I didn't have these
utilities in hand, but here we go!
2023-08-20 12:36:45 -04:00
Lux Aliaga c1576270b9 common: Implement display_colors config
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.
2023-08-19 20:26:28 -04:00
Lux Aliaga 17217173f4 src: Revamp message displaying
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.
2023-08-19 18:54:43 -04:00
Lux Aliaga d148a96e06
archive: Reword Vento directory archives
Calling the action of archiving the Vento directory "Archiving Vento
installs" was a bit misleading, so I changed it to Vento directories.
2023-02-19 13:19:20 -03:00
Lux Aliaga 2a4ee258a3
archive: Add install importing
Allows exported installs to be imported using the command `vento -G`.
Mind the uppercase "G" there!
2023-02-19 13:04:33 -03:00
Lux Aliaga 13d0889ad1
archive: Add inventory importing
Allows exported inventories to be imported using the command `vento -g`
2023-02-19 12:49:11 -03:00
Lux Aliaga c5cc1ea97a
archive: Add install exporting
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!
2023-02-17 13:39:56 -03:00
Lux Aliaga b6162a9dcb
archive: Add inventory exporting
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!
2023-02-17 02:07:28 -03:00
Lux Aliaga 4427dadcfc
src: bin: Remove unused crates
After refactoring the compiler started warning about some crates that
were unused, so I removed them.
2023-02-09 21:30:09 -03:00
Lux Aliaga 9e5e0716d1
src: Error refactoring on vento CLI
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.
2023-02-09 21:10:39 -03:00
Lux Aliaga 19aa1955c8
inv: Add "message" arg to slot switching
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.
2022-11-03 19:42:39 -03:00
Lux Aliaga c1533e6b41
inv: Include slot switching in undoable actions
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.
2022-11-03 19:26:15 -03:00
Lux Aliaga 6ad43bbf82
src: Remove periods from end of sentences
For many messages there were some consistency issues in terms of
punctuation. I've fixed this issue by removing every period from every
sentence.
2022-11-03 19:08:50 -03:00
Lux Aliaga 26699fe765
item: Implement undo command
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)
2022-10-26 16:37:52 -03:00
Lux Aliaga 6ec32037db
src: Code comments and cleanup
Basically some last refinements to make the code look a bit more
readable and presentable.
2022-09-27 20:05:08 -03:00
Lux Aliaga 8fe5bca167
src: Universal error handling
This commit should unify the way Vento handles errors. Solves #7.
2022-09-27 19:16:18 -03:00
Lux Aliaga ac986f8822
vento: The BIG commit
Since I worked on a LOT of stuff here, it's quite hard for me to
separate every change I've done. Take this as one huge refactor, which
includes:
- Changing the syntax of the Vento command
- Separating Vento into three binaries: vento, take, drop
- Moving the help messages into a new file called help.rs
- Removing unnecessary format macros
- Changing expect macros to context, for better anyhow compatibility
- Updating the documentation for these changes.
2022-09-26 16:58:33 -03:00