This script is able to convert zotero annotations formed by 'Zotero PDF Translate' plugin into anki cards.
Requirements:
- Installation of Zotero
- Installation of Anki
- Installation of the 'Zotero PDF Translate' plugin provided by windingwind in Zotero (can be downloaded here: https://github.com/windingwind/zotero-pdf-translate#readme)
- Installation of Python
How to use:
After the prepration of software installation. You can use the plugin 'Zotero PDF Translate' to generate some annotations.
Then, you should use the "add notes from annotations" provided by Zotero.
And open this notes in the right-window of Zotero.
Next, you should copy all of the contents in the note to a '.txt' file named '2.txt' in this path 'C:/Users/hu/Desktop'.
Now, you can run the Python script and a '.txt' file named 'anki.txt' will be creaed in the same path 'C:/Users/hu/Desktop'.
Next, open the Anki and import the 'anki.txt' file using the specific Notetype, please use pipe as the field separator.
After that, the annotations have been created as crads in the Anki; furthermore, there are two links to the Item in Zotero and the annotation in the Zotero PDF, respectively.
Besides, if you want to add some personal thoughts, please firsly marked the original sentense or words by the 'Zotero PDF Translate' plugin in Zotero. Then you can edit the comment on this annotation. After pressing the space bar twice, youu can add the personal thoughts before "~" in the annotation.
In the Anki, you can see your personal thoughts in the back of the card.
Last but not least, all of the file name or path used should be reivesed according to your machine.