Zotero tags query

This script will query the Zotero library to produce tables or graphs identifying the number of items associated with specific tags.
Provide a list of tags to include in the results, one per line. Provide a list of tags to include in the results, one per line. If both x and y axes are specified, the query results will include the number of items matching the intersection of each (x,y) pair. Provide a list of tags to to filter the results, one per line. These tags will not be included explicitly in the resulting dataset, but only items that match ALL the tags in this list will be included in the results. Use a hyphen prefix for tags to be excluded, e.g., -ignore to prevent items with the tag ignore from being listed in the results.

Graph options

SVG images (default) can be resized without loss of quality, but may not display properly in some applications. Use horizontal bar graphs if the labels are longer. Represent values in (x,y) unions as raw numbers (default). Represent values in (x,y) unions as a percentage of the total number of items in the library matching tag x. The total is adjusted to include only items matching the filter criteria given above. Represent values in (x,y) unions as a percentage of the total number of items in current result set. This will result in stacked bar graphs that add up to 100%. Sort data according to the y axis. (EXPERIMENTAL: Generally leave checked.) If both x and y are arrays, generate a series of graphs, one for each value in x. Print source values on each bar in a bar graph. Currently only works for horizontal bar graphs. Transpose x and y axes in the resulting table or graph. Present graph results in stacked format. Create a square graph.