What I’m trying to do
Extract annotations of single color from multiple articles in one import, while excluding other colors.
Purpose :- useful for summarizing findings across dozens of articles w/o going through each individual extracted note.
Things I have tried
Though I was successful using persist function, and re-running the same import function across multiple zotero articles to append annotations. I am unable to loop articles and so I can just run it once.
What I Noticed : Though the plugin can pull multiple articles when using normal note templates, while using the persist function once causes “only the last file” selected in multiple selection to be written in output file.
Code below shows I used Author-Date format to differentiate extracted annotations as well as CSS formatting to reflect their original annotation color.
### Yellow Notes
{% persist "notes" %}
# {% if creators | length !=1 %}{{creators[0].lastName}} et al. {{date | format ("YYYY")}}{%else%} {{creators[0].lastName}} {{date | format ("YYYY")}}
{% endif%}
{% for annotation in annotations%}
{%- if annotation.colorCategory == "Yellow" -%}
<span class="customZot-{% if annotation.color %}{{annotation.colorCategory}} {% endif %}">{{annotation.annotatedText | escape}}</span>
{% endif -%}
{% endfor %}
{% endpersist %}
Below is the final result I want using one run of import function. (Though I can using multiple re-runs to get the same result.)
