a python client for Citeulike.
This project has just been spun off possumpalace_kit, my blog engine.
If you notice any problems with paths or dependencies, please file a patch. Or just fork it. I'll make you maintainer in all likelihood, as I'm no longer using CiteULike so very much, having banned myself from spending too much time working around its foibles.
The CUL "API" was pieced together from forum comments made by the CUL staff over time.
e.g. how to
Here is an example of how i to write out a bibtex file of all records and download all PDFs:
from citeulike.citeulike_api import CiteULike
username = "exampleuser" password = "examplepassword" outjsonpath = "./bib.json" outpdfpath = "./pdfs/" outbibtexpath =
#initialize API and login cul = CiteULike(username=username,password=password, json_cache=outjsonpath, attachment_path=outpdfpath
) # download all records for ease of bulk operation # these will stay on a JSON file on the local disk cul.cache_records()
# create a BibTeX version, somewhat more likely to be taken as # well-formed than the CUL default: bibtex_string = cul.render('bibtex')
- with codecs.open(outbibtexpath, 'w', 'utf-8') as bf:
# For each record, download its attachments cul.bulk_apply(filt=lambda r: 'userfiles' in r,method_names=['download_attachments'])