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

Zotero RDF: Rewrite annotation links in notes on export/import #3074

Open
dstillman opened this issue Jul 9, 2023 · 2 comments
Open

Zotero RDF: Rewrite annotation links in notes on export/import #3074

dstillman opened this issue Jul 9, 2023 · 2 comments

Comments

@dstillman
Copy link
Member

https://forums.zotero.org/discussion/106095/show-on-page-function-doesnt-work-after-transfering-my-library-to-another-laptop

I think we'd have to rewrite these on export to point to an identifier and rewrite again to the new item keys on import.

CC @mrtcode for any input

@mrtcode
Copy link
Member

mrtcode commented Jul 10, 2023

We can probably just replace item keys with regular expressions, without parsing note HTML. There is a chance that you pasted item key manually into note text, and it will also be replaced, but I don't think we should care about this case.

@dstillman
Copy link
Member Author

Oh, but there's no guarantee that the referenced attachment is actually in the export. So really we should only replace keys that match attachments that are actually being exported and leave the rest unchanged (so if you just exported a note and reimported it into the same library, the links would still work, even if that would rarely be the case).

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

No branches or pull requests

2 participants