noembryo / KoHighlights

KOHighlights is a utility for viewing KOReader's highlights and/or export them to simple text, html, csv or markdown files.
MIT License
128 stars 5 forks source link

Highlight Sync is not working and unreliable (NEVER SOLVED). #25

Closed uncharted-user closed 1 year ago

uncharted-user commented 1 year ago
  1. Make highlight (and nothing more on device)
  2. Connect device to KOHighlights > "Archive" highlights
  3. Connect other device with KOHighlights > "Sync with archived"
  4. Connect other device with KOHighlights > "Sync with archived"
  5. Also, if you can connect all your devices at once, you can use the option "Sync with file", and use your most recent metadata.xxx.lua file to sync the others..

Step 1-4(did not work with different screen size and highlight removal) only worked for same size devices. I also noticed the following,

I don't know whether it is supposed to be for all .epub or there are exceptions. It seems to me KOReader (.sdr+epub) is portable at least worked on Linux and Android. This is probably also possible to do using Syncthing over USB.

Another problem was KOHighlight browser did not see my mounted phone or windows drive!

Devices used:

  1. Laptop with Fedora 36
  2. Samsung phone with Android 12
noembryo commented 1 year ago

Step 1-4(did not work with different screen size and highlight removal) only worked for same size devices.

Can you please elaborate a little more? What step did not work? What did it do and what did you expect it to do? What devices, with what screen sizes did not work? Again, what did they do vs what did you expect them to do?

I also noticed the following, All the highlight + notes + bookmarks synced/ported if I manually copy the .sdr folder along with .epub from Android and paste in anywhere on Linux

Yes, the books are portable like this.

(this is probably KOHighlight "Sync with file" does although I do not need to match hash as I know my most updated file) and vice versa.

No. KOHighlights reads only the highlights from the .lua file and sync them with the loaded book's highlights. It doesn't copy the original .lua file. This is the same as the "Sync with archived", only it uses the data from the .lua file and not the data from the archive database. The hash must match between books, to ensure that the location of each highlighted text is the same. If not, KOReader will highlight some random text, which of course will be wrong.

Another problem was KOHighlight browser did not see my mounted phone or windows drive!

KOHighlights has access only to the drives that are normally mounted and present on the OS. Android phones do not mount their storage as normal drives but rather as MTP drives (which is a kind of FTP thingy) see #13. The only solution to this, is to copy the "History" folder manually to a normal drive and select it with the "Scan Directory" button..

Your windows drive on the other hand should be accessible. Are you sure that although it is mounted on your system, KOHighlights doesn't see it?

uncharted-user commented 1 year ago

What step did not work?

Highlights were not being shown after following step 1-4 for the Android => Linux.

What did it do and what did you expect it to do?

I did expect it to work as usual.

What devices, with what screen sizes did not work?

My phone has 6.3 inch viewable area, and it did not work for this device.

Again, what did they do vs what did you expect them to do?

Highlights were being shown nowhere.

KOHighlights reads only the highlights from the .lua file and sync them with the loaded book's highlights.

Does KOHighlight edit the epub file?

KOHighlights has access only to the drives that are normally mounted and present on the OS.

Yes, I was able to access NTFS drives using File browser but are not being shown on KOHighlight.

noembryo commented 1 year ago

Highlights were not being shown after following step 1-4 for the Android => Linux.

OK. Lets walk through it.

You do this by right-clicking on a book. After that, by pressing the "Archived" button you should see an entry of the book you archived.

You go to the "Loaded" part of KOHighlights and you should see the books of the second device. If there is an identical version of the book that you already archived (hash and all), when you right click it, you should see an extra sub-menu inside the "Sync" sub-menu, named "Sync with archived". One of the actions in there, is to merge the archived highlights with the highlights of the selected book. The other action syncs only the reading position.

Keep in mind that if your second device is an Android phone and you manually copied the "History" folder over to your Laptop, you should copy it back to your phone after syncing.

I did expect it to work as usual.

I couldn't know what your usual means now, could I? That's why I asked you the question. If you want your issue to be resolved, be prepared to at least describe it.

My phone has 6.3 inch viewable area, and it did not work for this device. Highlights were being shown nowhere.

So, I have to ask you again. What devices? OK, you mention a 6.3" phone but what is the second device? Or the phone is your second device, but then, what is the first? Is your laptop running KOReader too? Another reader device? Who has the NTFS drive? Where are you made the highlights? Where are you not seeing them?

Does KOHighlight edit the epub file?

No. It only edit the .lua files

Yes, I was able to access NTFS drives using File browser but are not being shown on KOHighlight.

So, just to be clear. Although that you can see the drive's contents using the system's file manager, the file selector dialog that opens when you press the "Scan directory" button inside KOHighlights does not see the mounted drive?

I'm not familiar with Linux, and specially Fedora, but is there anything in the "mnt" folder of root? This is where some Ubuntu variants mounts my Windows drives.

uncharted-user commented 1 year ago

OK. Lets walk through it.

  • Connect device to KOHighlights > "Archive" highlights You do this by right-clicking on a book. After that, by pressing the "Archived" button you should see an entry of the book you archived.
  • Connect other device with KOHighlights > "Sync with archived" You go to the "Loaded" part of KOHighlights and you should see the books of the second device. If there is an identical version of the book that you already archived (hash and all), when you right click it, you should see an extra sub-menu inside the "Sync" sub-menu, named "Sync with archived". One of the actions in there, is to merge the archived highlights with the highlights of the selected book. The other action syncs only the reading position. Keep in mind that if your second device is an Android phone and you manually copied the "History" folder over to your Laptop, you should copy it back to your phone after syncing.

Yes, I did exactly as you said here.

OK, you mention a 6.3" phone but what is the second device?

I was syncing my Laptop 17.3 inch with my phone 6.3-inch screen sizes.

Is your laptop running KOReader too?

Not during the sync, as .lua might be inaccessible.

Who has the NTFS drive?

My system is a dual boot Windows and Fedora. I was doing this while on Fedora.

Where are you made the highlights?

I made highlight on 6.3 inch device running Android 12.

Where are you not seeing them?

I don't see those highlight on 17.3 inch device running Fedora.

Although that you can see the drive's contents using the system's file manager, the file selector dialog that opens when you press the "Scan directory" button inside KOHighlights does not see the mounted drive?

Yes, exactly.

noembryo commented 1 year ago

Yes, I did exactly as you said here.

Yes, and... Come on, describe something.. I don't have to dig them out from you! After the sync, what happened? Does clicking on the book (on the second device) shows all the highlights or some of them? In what device the highlights where in wrong position? How was this device synced? Did you tried the "Sync with file" method?

Being that tight-lipped, is tiresome.

My system is a dual boot Windows and Fedora. I was doing this while on Fedora.

And what is the windows drive has to do with the sync?

uncharted-user commented 1 year ago

Yes, and... Come on, describe something.. I don't have to dig them out from you!

I don't know what you are expecting from me.

After the sync, what happened?

Come on, you are asking the same thing over and over again. There was no error or nothing weird happened, except no highlight was synced.

Does clicking on the book (on the second device) shows all the highlights or some of them?

Nothing was highlighted.

In what device the highlights where in wrong position?

Laptop.

How was this device synced?

By bringing copy from phone to laptop.

Did you tried the "Sync with file" method?

Yes, it did worked fine i.e. Highlights were synced properly.

And what is the windows drive has to do with the sync?

Nothing it was just additional information that if I wanted sync there it wouldn't be possible.

noembryo commented 1 year ago

I don't know what you are expecting from me.

Come on, you are asking the same thing over and over again. There was no error or nothing weird happened, except no highlight was synced.

Well, there is a story that I will tell you.

  1. You were making some highlights in your android phone using KOReader, and because you were reading the same book in your Linux laptop which also run KOReader (that BTW does not run on windows), you wanted to sync them. Just these devices, no other eReaders involved and no Windows.
  2. You first connected the phone, copied the "History" over, scan it for the books and right clicked a book.
  3. You selected the action "Archive", and with that, you copied the highlights to the database.
  4. After that, you scanned your laptop's books, found the one that you were reading on your phone and when right clicked it, it gave you the option to "Sync">"Sync with archived", which meant that it was the same with the book on the phone.
  5. You pressed "Merge highlights" and you saw the warning popup.
  6. You pressed "Yes" to this one and after that you saw a second warning telling you that this can not be undone, to which you also press "Yes"
  7. After that, when you pressed the synced book's entry, you did not see the highlights that the phone's book had.
  8. Maybe you also checked the "Archived" version of the book's highlights and establish that they are there (or not), maybe you didn't.

I was not there. I didn't know what happen. You just wrote:

Step 1-4(did not work with different screen size and highlight removal) only worked for same size devices.

How was I suppose to find out what happened out of this sentence? How did I learn the story? What I wrote above is what I have managed to coax out of you by many, many questions. For steps 4, 5, 6 and 8 I'm not even that sure, since you never actually told them.

If you're too lazy to properly describe the issue you are having, I can't help you. Sorry.

uncharted-user commented 1 year ago

I think you could have some pre-formatted questions instead of asking so many questions. I also think you made it overcomplicated. Furthermore, I tried every possible ways to use the app and reported back and all you need to know did I follow those steps or not. If I can submit an issue here, you should assume that I am not that stupid!

I am done, Man! # Unsolved

noembryo commented 1 year ago

I think you could have some pre-formatted questions instead of asking so many questions.

Nope. Every problem has its own description. I will not do your work for you. You just wrote some one-liners and expect me to be telepathic. Well, I'm not.

I also think you made it overcomplicated. Furthermore, I tried every possible ways to use the app and reported back and all you need to know did I follow those steps or not.

OK. Since you know what I needed to know, then you should also know how to solve it.. No need for me. :stuck_out_tongue:

If I can submit an issue here, you should assume that I am not that stupid!

Do you know for a fact that whoever submits an issue here is not stupid? Where did you got it from? I'm sorry that you think that by helping me to identify a problem (that you have), you seem stupid. I never thought you were, but hey, we all do mistakes.. :grinning:

uncharted-user commented 1 year ago

I'm sorry that you think that by helping me to identify a problem (that you have), you seem stupid. I never thought you were, but hey, we all do mistakes.. 😀

REALLY!!! Your avatar truly describes who you are. Well, I am not going to join and end up like you. Good luck.