Zetoro 6, How to get current selected annotation metadata on reader?
Hi, my client is zotero 6.
I tried to develop a plugin for zetoro, the basic feature is to make the annotation to link another another annotation on some related pdf, so user can click and jump to related pdf directly.
Now I have troubles to do something.
First, I can't get the metadata about the annotation selected or clicked, I didn't find any api and functions that are available.
Second, I can't add context menu for annotation that right-clicked by mouse. I think it will be support on zetoro 7.
Any suggestions and replies would be gratifying.
I tried to develop a plugin for zetoro, the basic feature is to make the annotation to link another another annotation on some related pdf, so user can click and jump to related pdf directly.
Now I have troubles to do something.
First, I can't get the metadata about the annotation selected or clicked, I didn't find any api and functions that are available.
Second, I can't add context menu for annotation that right-clicked by mouse. I think it will be support on zetoro 7.
Any suggestions and replies would be gratifying.
Note that some of the scripts provided there are for workflows outside of Zotero, so choose you link type accordingly. But using link in annotation fileds, such as notes or tags doesn't work for me. The hyperlinks are not shown in PDF reader tab.
Now I know the metadata of the annotation, How can I open the pdf on reader and point to the page that annotation is located.
I cant find the method for getting to pdf page that I want. On the note panel, I found that the "Show On Page" label when an annotation paste on note panel, If I click this label, then it will create a new reader tab for PDF and jump to the page annotation is located, This "Show on Page" feature is what I want, How to find the interface or function that it("Show On Page") offer.
https://s3.amazonaws.com/zotero.org/images/forums/u11764939/omoui2yqmfxa8tk184ul.png
1. Install Actions and Tags plugin.
2. Add this script into plugin,add a shortcut to it and check annotation menu while adding thr script. You should also add a label to it in order to find it later in the tree dot menu.(You can find instructions for this on the homepage of plugin's github repo.) https://github.com/windingwind/zotero-actions-tags/discussions/115
3. Select the annotation and execute shortcut or select the corresponding label in the tree dot menu.
4. Paste anywhere in notes or other program with an open link in anywhere functionality.
5. Upon clicking, the link will take you directly to the annotation itself.
If you need further assitance with this and can't get your head around via github documents, just ping me again in this thread.
First, I have A_annotation that on A_PDF page, and it quotes a part of B_PDF; As shown below:
https://s3.amazonaws.com/zotero.org/images/forums/u11764939/3r1g9geeb6sx41damwtx.png
Second, I make B_annotation that on B_PDF, as you know, the B_annotation is the one quoted by A_annoatiaon textually, As show below:
https://s3.amazonaws.com/zotero.org/images/forums/u11764939/m2o64sc5ni0ht1wrquhr.png
Third, I try to add a hyperlink to A_annotation, and this hyperlink is point to B_annotation, so I can click the label when right-click A_annotation, then it will jump to the B_PDF and the position annotation is located. As Show below
https://s3.amazonaws.com/zotero.org/images/forums/u11764939/l1b6u55hfc8ahsvg8bd6.png
this feature can binding the relationship between two related references.
```json
[
"0": {
"key": "4ZJ6FJXV",
"version": 2468,
"itemType": "annotation",
"parentItem": "255HN5RN",
"annotationType": "highlight",
"annotationAuthorName": "",
"annotationText": "5.1.4.4 电容耦合要求",
"annotationComment": "",
"annotationColor": "#aaaaaa",
"annotationPageLabel": "9",
"annotationSortIndex": "00008|000412|00574",
"annotationPosition": "{\"pageIndex\":8,\"rects\":[[68.604,246.586,174.372,267.047]]}",
"tags": [],
"relations": {},
"dateAdded": "2024-03-11T03:29:36Z",
"dateModified": "2024-03-11T03:29:36Z"
}
]
```
This field is suitable for storage the location data of B_annotation.
So The only problem is how to achieve the jump feature like "Show On Page" label