Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suggestion: compare highlights metadata files for same book's in sdr folder #6

Closed
richo67 opened this issue May 14, 2020 · 15 comments
Closed

Comments

@richo67
Copy link

richo67 commented May 14, 2020

Hello,
often I end up with two or more metadata lua files in the sdr books file, normally there is one .old and sometime som others. The reason is that I read books on more devices and sometime they do not manage synchronize and there is a conflict in file later.

It would be great if there would be sort of merge tool, which would merge those conflicting file into one nice. Merging only highlights and setting position to latest one.

It could be part of this or it could be some kind of command line tool.
Do you think this could be useful and not too complex to make?

@noembryo
Copy link
Owner

Interesting..
How come you end up with more than one metadata file?
I need a little more background here, since I never encounter such a case.
Most of the time I have an metadata.old.lua file, but that one is always older then the current, so I wouldn't sync with it.

Anyway it looks doable, but the other metadata file must also be from the same book and use the same version cre (there was a version bump up recently).

@richo67
Copy link
Author

richo67 commented May 14, 2020

it is always as an effect of synching files from multiple devices on my personal cloud. Some devices I have off line or they have no connection for some time and when they sync then files was already changed before by some other device.

All files would be from same book. Only they all would have strange names with some id of a device and date when sync from cloud failed. So it would be something like this:

metadata.epub_aPad_Dec-02-181542-2019_Conflict.lua metadata.epub.lua metadata.epub.lua.old metadata.epub.lua_rNokia_Nov-30-102256-2019_Conflict.old metadata.epub_rNokia_Jan-09-095752-2020_Conflict.lua metadata.epub_rNokia_Nov-30-102301-2019_Conflict.lua
version can be an issue, but still, does it effect highlights?
Thanks for considering this

@noembryo
Copy link
Owner

Well, the version might matter, so I always check it..
Apart from this, I will try to find a way for the user to manually select a file for syncing with the currently selected book.

@richo67
Copy link
Author

richo67 commented May 14, 2020

Apart from this, I will try to find a way for the user to manually select a file for syncing with the currently selected book.

Maybe select only files in books sdr folder show it in check boxed list and let user to check which to merge

@noembryo
Copy link
Owner

Since the merging is happening in pairs anyway, what I could do is have an option to select a file to merge with the current..

@richo67
Copy link
Author

richo67 commented May 15, 2020

or ;-) merge all selected in turn with current.

@noembryo
Copy link
Owner

OK, last offer!
File selector with multiple selections enabled...
Do we have a deal? ;o)

@richo67
Copy link
Author

richo67 commented May 15, 2020

:-D sure, you are the boss. Thanks

@noembryo
Copy link
Owner

Bonus feature: KOHighlights will now load all the lua files of a book...

@richo67 richo67 changed the title sugestion: compare highlights metadata files for same book's in sdr folder suggestion: compare highlights metadata files for same book's in sdr folder May 16, 2020
@richo67
Copy link
Author

richo67 commented May 16, 2020

Bonus feature: KOHighlights will now load all the lua files of a book...

It means it will automatically merge them?
what would happen to those other lue files, will you remove them?

@noembryo
Copy link
Owner

No, no, it will display them as rows in the book list.

@richo67
Copy link
Author

richo67 commented May 16, 2020

And I could select more than two in the same time for merging?
And possible option to remove them after merge (checkbox in merge dialog?)

@noembryo
Copy link
Owner

Nah, the mechanism is the same as before. Only pairs can be synced/merged.
I wouldn't like to re-write all the code.. ;o)

For your case, the file selector (were you can select many files) is still the best solution.
The reason to add the bonus (!) feature was to inform the user of the different .lua files and to allow to sync the freshly appeared ones..

@richo67
Copy link
Author

richo67 commented May 16, 2020

I understand. Good, thanks.

@noembryo
Copy link
Owner

Added with v.1.3.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants