bin/pwcite
#!/usr/bin/env node
const args = process.argv.slice(2)
if (process.stdin.isTTY || (args.length && args[0].match(/^(-h|--help)/))) {
console.log(`Usage: pandoc -F pwcite document.md ...
or: pandoc -t json ... | pwcite | pandoc -f json ...
Fetch bibliographic records from Wikidata via Pandoc filter.
See <http://wikicite.org/wcite/> for background.
Try 'wcite' to use independently from Pandoc.`)
} else {
require('../lib/pwcite').run(args)
}