Projects / Gotero
Gotero
A Go client for a Zotero group library. It walks a collection and downloads the PDFs.
Why
A group library is a lot of small files behind one API. Doing them one at a time spends the time on round trips. The work is concurrent workers, an API key, and a collection name, including its subcollections.
Diagrams
A solid outline is the path in the repo. A dashed outline is the alternative that shape is refusing.
The CLI takes a collection, including subcollections, and an output directory. Workers download in parallel. Each file is one request. Zotero stays the source of truth.
flowchart TD
key["Zotero API key"]
col["Collection and subcollections"]
workers["Concurrent workers"]
disk["PDFs on disk"]
key --> col --> workers --> disk
class key,col,workers,disk chosen
One-at-a-time spends the time on round trips. The run this was pointed at pulled 5,000-plus documents and raised throughput 65% against that. Gotero does not keep its own index, and it does not delete a file Zotero removed.
flowchart TD
q{How the files are fetched}
q -->|"one file, one request, shared only at the folder"| par["Parallel workers"]
q -->|"the next file waits"| seq["One at a time"]
index{A local catalog}
index -->|"Zotero is the list"| api["No second index"]
index -->|"also delete what Zotero deleted"| mirror["A mirror"]
class par,api chosen
class seq,mirror rejected
Why this shape
The CLI takes the collection and an output directory. Workers pull PDFs in parallel because each download is independent: one file, one request, no shared write except the destination folder. The Zotero API stays the source of truth. Gotero does not keep its own index of the library.
The workers on the library I pointed it at pulled 5,000+ documents and raised throughput 65% against the one-at-a-time run.
Where it breaks
The API key is the whole auth story. A rate limit from Zotero stalls the workers together if they do not back off. The tool does not sync deletions. It downloads. A file removed in Zotero stays on disk until you delete it.