1
0
Fork 0
mirror of https://git.sr.ht/~nixgoat/vento synced 2024-11-16 03:53:04 +00:00
Commit graph

123 commits

Author SHA1 Message Date
Lux Aliaga e96110748e
history: Add history migration
This adds an option to the vento command which allows users to migrate
from the old history file to the newer database. It parses the history
file, writes the changes into the database, and then deletes the
previous file.
2024-02-22 01:14:41 -03:00
Lux Aliaga 46ac7ee8b7
history: Add history viewer
It works by showing n changes before and after the current position
in a table. Requires an 83+ column wide terminal. Command usage is
"vento -v [<n>]".
2024-02-22 01:14:41 -03:00
Lux Aliaga 600c3e4f3a
history: Implement new database system
The new database system uses SQLite3, and allows users to move across
a linear history of their actions, including moving forward from a
previous action. Whenever a user runs a new action, the actions after
the current position within the history will be removed.
2024-02-22 01:14:35 -03:00
Lux Aliaga 92b2942471
manifest: Bump version to v1.4-alpha
After a few months, it's time to prepare the next Vento release. I've
been cooking some ideas, so this one might be big. 👀
2024-02-21 20:16:56 -03:00
Lux Aliaga cba202fd0d manifest: Bump version to v1.3
Goals for this release have been worked on and the software has been
tested enough. Bump the version and update the installation
instructions.
2023-08-28 09:06:15 -04:00
Lux Aliaga 73ef278372 inv: Use is_empty() method for empty comparisons
This was suggested by cargo-clippy. Instead of comparing against "",
it's better use the method is_empty() to determine if the dir argument
in the list() function is not empty.
2023-08-28 02:03:29 -04:00
Lux Aliaga 2b8126eb53 build: Update manpages
Changes the maintainer information, adds the new configuration
directives and specifies format for hierarchies.
2023-08-28 01:56:50 -04:00
Lux Aliaga 343c97e92c item: Remove extra whitespace on Take message
If you were to take a file with display_dir enabled and the slot flag,
it would add an additional whitespace. Remove it.
2023-08-26 21:36:10 -04:00
Lux Aliaga 9589fcb674 inv: Don't display slot unless argument is passed
Similarly to item actions, when the slot argument is not passed, it is
implied that the slot used is the active slot, therefore it is not
necessary to reiterate it.
2023-08-26 15:32:27 -04:00
Lux Aliaga e9aa1b2ee1 common: Add Item hierarchy in config
To avoid confusion, this moves the config "display_dir" to a new
section named "Item". For now this is the only config this new section
will have.
2023-08-26 11:24:15 -04:00
Lux Aliaga 1506dc811c item: Don't display slot if not stated explicitly
It is implied that if you're working without the slot argument you are
working with the active slot, therefore it's not needed for the message
to output that.
2023-08-26 10:54:53 -04:00
Lux Aliaga 63777e6f61 history: Add config to disable displaying dirs
This option is separate from the item actions, since it may be
important for some users to still see where the actions are being
undone. Therefore, I've added this option to a new hierarchy named
"history", which is why I've imported serde into the crate.
2023-08-26 10:51:20 -04:00
Lux Aliaga 2ab970c371 item: Add display_dir config
This option allows the user to prevent showing the path where the file
was taken/dropped from. Next up would be implementing this in history
changes.
2023-08-23 08:48:26 -04:00
Lux Aliaga bb02a070f9 help: Deprecate in favor of Clap
Since Clap integrates its own help page, help.rs is not necessary
anymore. Remove it.
2023-08-21 13:41:41 -04:00
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 56c12f5d4e readme: Update logo URL
When migrating this repo, I didn't change the URL for the logo, which
was hosted on Codeberg. Update it to Sourcehut.
2023-08-19 20:33:44 -04:00
Lux Aliaga 925513a136 manifest: Update crate dependencies
I've changed the format of the versions to the ones recommended for
each crate. This should keep the package up-to-date when updates come
for it.
2023-08-19 20:30:00 -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 d80ccbea07 manifest: Update metadata and installation guide
Add a step to make the user check out to the latest stable release.
Also, update my email in the crate's maintainer list.
2023-08-19 18:58:40 -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 1e2fb49dac inv: Remove whitespace between emoji and message
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.
2023-08-19 18:54:43 -04:00
Lux Aliaga 941d4c07d5 manifest: Bump version to v1.3-alpha
Finally, I've learned my lesson and on development trees I'll start
using prefixed version numbers in order to not cause confusions.
2023-08-19 18:54:36 -04:00
Lux Aliaga b5c0818719
manifest: Bump version to v1.2
New features, new version!
2023-02-19 18:24:27 -03:00
Lux Aliaga 0424ec2ba9
src: Add public documentation for remaining functions
Essentially the documentation that will go into docs.rs.
2023-02-19 18:23:00 -03:00
Lux Aliaga 27b42e963e
error: Add more error types
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.
2023-02-19 14:42:26 -03:00
Lux Aliaga 67d2da8767
error: Fix switchup between SpecifyFile and SpecifySlot
Turns out SpecifyFile would show the message for SpecifySlot and
viceversa. Whoops!
2023-02-19 13:34:32 -03:00
Lux Aliaga 5e2763f5df
manifest: Remove unused flate2 crate
I accidentally added this crate which ended up not being used. Oh well.
2023-02-19 13:32:40 -03:00
Lux Aliaga 75fb04d674
help: Document the archiving flags
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.
2023-02-19 13:30:48 -03: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 faf8036b19
archive: Fixed slot colors
In the confirmation message the slot being exported showed as white. It
should now be colored in either green, blue or red.
2023-02-17 12:44:18 -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 791cdf3193
src: Supress clippy warnings
Most of them were related to unnecessary borrows, although one was
because I pointlessly added a format! inside a println!. Whoops.
2023-02-09 21:35:12 -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 986c0f7f20
help: Update year in copyright notice
Since we're not in 2022 anymore and I'll be working further on this
later, I'm extending the year in the copyright notice to 2023.
2023-02-09 12:03:01 -03:00
Lux Aliaga 6750a387db
manifest: Bump version to v1.1.3
To apply the changes I've made in Crates.io, I'll need to create a new
release.
2022-11-16 17:20:56 -03:00
Lux Aliaga 86d3a00f02
project: Sourcehut migration
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.
2022-11-16 17:19:41 -03:00
Lux Aliaga 1b533160e6
manifest: Remove patch version for Anyhow
This should make it so Anyhow gets the latest patch updates instead of
staying on v1.0.65.
2022-11-16 11:44:01 -03:00
Lux Aliaga 5a0988d2c6
manifest: Bump version to v1.1.2
I don't really have more changes to add to Vento after this, so I guess
I'll push these changes to a new release. Have fun!
2022-11-07 18:21:02 -03:00
Lux Aliaga 833669af3c
item: Add slot to take/drop messages
To be more consistent with undo messages, I've added the slot in which
items are involved to take and drop messages. Simple as that.
2022-11-07 18:18:25 -03:00
Lux Aliaga dadb0d721f
readme: Fixed typo
The command to undo the last action is "vento -u" and not "vento -c".
2022-11-03 22:56:55 -03:00
Lux Aliaga ab313e2f50
manifest: Bump version to v1.1.1
Enough changes have been done for a newer version and I can confidently
call this a stable release. Enjoy.
2022-11-03 21:32:30 -03:00
Lux Aliaga ef3dcf8acc
inv: Emoji consistency
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.
2022-11-03 21:15:00 -03:00
Lux Aliaga 1cbfc5a568
history: Nicer messages for undo result
It includes more details such as:
- What action was undone
- What item was affected in the action
- What that action involved
2022-11-03 21:06:28 -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