fix issue #18

parent 91730ffc
......@@ -16,6 +16,9 @@ from xciterst.util import html2rst
DEFAULT_CITATION_STYLE = "http://www.zotero.org/styles/chicago-author-date"
class ZoteroConnection(xciterst.CiteprocWrapper):
styleId = "chicago-author-date"
def __init__(self, style, **kwargs):
self.local_items = {}
self._in_text_style = True # XXXX should get from zotxt
......@@ -30,7 +33,7 @@ class ZoteroConnection(xciterst.CiteprocWrapper):
def citeproc_process(self, clusters):
request_url = "http://localhost:23119/zotxt/bibliography"
request_json = {
"styleId": "chicago-author-date",
"styleId": self.styleId,
"citationGroups": clusters
}
data = json.dumps(request_json, indent=2,
......@@ -79,6 +82,9 @@ class ZoteroSetupDirective(docutils.parsers.rst.Directive):
if self.options.has_key('biblio'):
xciterst.citeproc.load_biblio(self.options['biblio'])
if self.options.has_key('style'):
xciterst.citeproc.styleId = self.options['style']
if xciterst.citeproc.in_text_style:
return []
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment