Skip to content

Commit

Permalink
Arara rule for bibliography pull
Browse files Browse the repository at this point in the history
  • Loading branch information
friflaj committed Dec 10, 2013
1 parent 1a68a22 commit 233883a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -36,7 +36,8 @@ Export dates like 'forthcoming' as 'forthcoming' instead of empty.

## Pull export

You can fetch your library as part of your build,using curl or somesuch, or with a biblatex remote statement like \addbibresource[location=remote]{http://localhost:23119/better-bibtex/collection?/0/8CV58ZVD.biblatex}.
You can fetch your library as part of your build, using curl (for example by using the included zoterobib.yaml arara
rule), or with a biblatex remote statement like \addbibresource[location=remote]{http://localhost:23119/better-bibtex/collection?/0/8CV58ZVD.biblatex}.
For Zotero standalone this is enabled by default; for Zotero embedded, you need to set the config key "extensions.zotero.httpServer.enabled" to true. You can then fetch your bibliography on the url
http://localhost:23119/better-bibtex/collection?\[collectionID].[format], where collectionID is:
* the ID you get by right-clicking your collection and selecting "Show collection key"
Expand Down
28 changes: 28 additions & 0 deletions zoterobib.yaml
@@ -0,0 +1,28 @@
!config
# Pull bibliography from zotero as part of build
# author: Emiliano Heyns
# last edited by: eeh, Dec 2nd 2013
# requires arara 3.0+
#
# Sample usage
#
# % arara: zoterobib
# % arara: zoterobib: {format: biblatex}
#
# for windows, use http://www.confusedbycode.com/curl/#downloads
identifier: zoterobib
name: ZoteroBib
commands:
- <arara> @{ isWindows( "cmd /c ", "" ) } curl --connect-timeout 5 -o "@{base}.bib" "http://localhost:@{port}/better-bibtex/collection?@{collection}.@{format}"
arguments:
- identifier: base
flag: <arara> @{parameters.base}
default: <arara> @{getBasename(file)}
- identifier: port
flag: <arara> @{parameters.port}
default: 23119
- identifier: format
flag: <arara> @{parameters.format}
default: biblatex
- identifier: collection
flag: <arara> @{parameters.collection}

0 comments on commit 233883a

Please sign in to comment.