See what changed during synchronization, API call?

Hi all,

following situation: I have two PCs, a private one and a second one for work. I sync Zotero on both PCs using Zotero Web Library.

My private PC has not been active for a while. Today, I synced all items and I have the *feeling* that there might some annotations be missing, but I'm not sure. I can't compare with the work PC, because I'm on vacation.

Is there a way to understand what has been synced, i.e. which items and which fields of the items? Can I access any API of the Zotero server or so?

There are specifically 25 Zotero items with a modification date of today. The PDF has the same modification date, so I *assume* the modification is not due to some meta data of the item, but of the PDF. How Can I figure out what's changed?

Since I've not done any changes on my private PC, how can I "push" the version from my work PC to remote to ensure consistency?

General question: Are annotations of a PDF deleted when the pdf is changed, e.g. by ZotFile? I assume no, since annotations are now stored in the DB, is that assumption correct?

Thank you!
Jan
  • The API doesn't have a log of recent changes, so no, there's no way you can track changes during sync. It's generally quite reliable, though, so I'd assume it has worked correctly absent specifics to the contrary.

    Your local version will sync with changes on the server on startup, when you make any local changes, and at regular intervals in between. Nothing to push.
    General question: Are annotations of a PDF deleted when the pdf is changed, e.g. by ZotFile? I assume no, since annotations are now stored in the DB, is that assumption correct?
    Really depends on the nature of the changes. ZotFile doesn't change PDFs at all, so hard to say what you're referring to here, but smaller changes to the PDF itself (e.g. annotations in an external PDF reader) or renaming the file within Zotero (as ZotFile does) won't delete annotations. Changing the PDF significantly, e.g., turning or removing pages outside of Zotero, will not per-se delete annotations, but will prevent them from showing up correctly.
  • Thank you very much for your quick answer.

    I was wondering why there are modified files with current date at all. I did not change anything explicitly, just synced.

    Then ZotFile and its Ebook/Tablet "mode" came to my mind - I had some PDFs on my ebook reader. But I did not click on "read items from tablet" yet, so even if the files were old on my ebook, nothing should've changed, right?

    But: ZotFile creates a tag "_tablet_modified" to the pdf. I assume that's why there's a modification date.

    > Your local version will sync with changes on the server on startup, when you make any local changes, and at regular intervals in between. Nothing to push.

    In case I don't what to have the files synced because I didn't know why they were modified, is there a way to overwrite the web version with the contents from the work PC and just throw away my private PC's probably unintended changes?

    > The API doesn't have a log of recent changes, so no, there's no way you can track changes during sync

    That feels very unsecure - the user has no way to check what really has been modified. Is there anything like a log for recent changes planned?

    Do you have any recommendations for tools to compare the sqlite databases?

    Thanks!
  • I don't know exactly what ZotFile does, but I'd assume it would cause the data modified change, yes (though just adding a tag wouldn't).

    Beyond that, what Zotero does is pretty standard syncing behavior -- a human-readable logfile would be massive (and thus likely not actually human readable) and I very much doubt that's going to happen. You can check recent changes online using the API's features designed for syncing https://www.zotero.org/support/dev/web_api/v3/syncing although I think you're wasting your time here. Happy to troubleshoot specific issues, but again, absent any actual observed issues (and the date modified stamps aren't relevant in that context) I'd assume everything is working as it should (because it does for hundreds of thousands of users virtually all of the time).
  • Okay, thanks.

    What does affect the data modified property of the Zotero parent item?

    Please note I'm not saying the sync doesn't work. I just would like to understand what got synced. What is the mechanism to find out what's the most recent version? Would there be a notification in case of sync conflicts?

    Coming from VCS tools like Git, I think there's a new revision each time a sync starts, why couldn't that be stored/logged (and filtered of course, sure the changes are big). Is that assumption incorrect?

    What would happen if:
    - a Zotero item is stored locally on a PC and a newer version of that item is available on the server. Zotero is not started, so no sync has been done yet on that PC.
    - then Zotero is started, the sync starts
    - the mentioned item is *not yet* synced, because many items have to be synced
    - the file gets modified, e.g. by a plugin, so the modified timestamp updates, before the sync took place
    - the sync mechanism reaches the file - what gets synced? Are the remote/server information merged with the local ones or is the the most recent file, i.e. the local file used to overwrite the remote one?

    Hope that example makes sense :)

    Thanks!
Sign In or Register to comment.