Closed pwall2222 closed 8 months ago
Is just for feature parity with the KeePassXC
client.
Perhaps it would be better to call this .reindex()
or something similar. I'd like to avoid confusion with the move_entry()
function, which is for hierarchical operations. Also needs a test in tests.py
Is just for feature parity with the KeePassXC client.
How do you do this in KeePassXC? As far as I can tell, the entries are just automatically sorted by Title/Username/URL/etc.
As you sugggested I added a test and I rename the function to reindex
.
The keepassxc custom reorder, but anyway it was a feature in the original keepass.
https://github.com/keepassxreboot/keepassxc/issues/2295
https://github.com/keepassxreboot/keepassxc/pull/4357
To replicate you will first need to click the current sorting column till it shows no icon, then in the context menu you will see move up
and move down
.
Thanks! This looks good so far.
Would you mind adding docstrings on reindex
and index
and also in README.md beneath move_entry
? Sorry, I should've mentioned that before. After that it looks good to merge.
Shouldn't it be near Entry.delete_attachment
since its in the Entry
class it self?
Shouldn't it be near Entry.delete_attachment since its in the Entry class it self?
Actually there doesn't appear to be sections for Group/Entry member functions in the README, so you can ignore that for now.
Thanks for the contribution!
Code changes:
index
property to Entrymove
method to Entry_first_entry
property to GroupExplanation: To move Entries around we need to remove and then insert at the desired index, the KDBX format makes it so that Entries and group info is all mixed, so we have to get the first element index to position correctly the Entries.
If you know a better method to get the index of the first entry I'll put it in.
What it does:
It moves entries around a group, pretty self explanatory, like the Keepass and KeepassXC functionality.