This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print('zotero-live-citations 4b9705e') | |
| local mt, latest = pandoc.mediabag.fetch('https://retorque.re/zotero-better-bibtex/exporting/zotero.lua.revision') | |
| latest = string.sub(latest, 1, 10) | |
| if '4b9705e' ~= latest then | |
| print('new version "' .. latest .. '" available at https://retorque.re/zotero-better-bibtex/exporting') | |
| end | |
| do | |
| local _ENV = _ENV |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print('zotero-live-citations 4b9705e') | |
| local mt, latest = pandoc.mediabag.fetch('https://retorque.re/zotero-better-bibtex/exporting/zotero.lua.revision') | |
| latest = string.sub(latest, 1, 10) | |
| if '4b9705e' ~= latest then | |
| print('new version "' .. latest .. '" available at https://retorque.re/zotero-better-bibtex/exporting') | |
| end | |
| do | |
| local _ENV = _ENV |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| declare const Zotero: any | |
| declare const location: any | |
| export const is7 = (typeof location !== 'undefined' && location.search) ? ((new URLSearchParams(location.search)).get('is7') === 'true') : Zotero.platformMajorVersion >= 102 | |
| function clientname(): string { | |
| if (typeof location !== 'undefined' && location.search) return (new URLSearchParams(location.search)).get('clientName') | |
| // if (process.versions.node) return 'Zotero' // testing | |
| if (Zotero.clientName) return Zotero.clientName as string | |
| if (Zotero.BetterBibTeX?.clientName) return Zotero.BetterBibTeX.clientName as string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // class from https://gist.github.com/lentschi/3fcbf7f6894b11bee1eb3d6a832a84e6 | |
| /** | |
| * Asyncronous iterable iterator for IndexedDB object stores or indexes | |
| * | |
| * @author Florian Lentsch <[email protected]> | |
| * @license MIT | |
| * | |
| * ____________________________________________________________________________ | |
| * REQUIREMENTS: You may have to add "lib": ["esnext.asynciterable"] to | |
| * your tsconfig.json - see https://stackoverflow.com/questions/43694281/ts2318-cannot-find-global-type-asynciterableiterator-async-generator?answertab=votes#tab-top |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var CSL = require('citeproc') | |
| var styleAsText = <contents of style.csl> | |
| // Load your list of references | |
| const references = { | |
| item1: { | |
| id: 'item1', | |
| type: 'book', | |
| title: 'Stuff', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "tt", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "index.js", | |
| "scripts": { | |
| "test": "tap && echo success" | |
| }, | |
| "author": "", | |
| "license": "ISC", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { createDB, createTable, insertMany, many } from "blinkdb"; | |
| import loki from "lokijs"; | |
| import { Bench } from "tinybench"; | |
| import charsJson from "./config2.json"; | |
| charsJson.forEach((char, i) => char.id = i) | |
| interface Char { | |
| id: number; | |
| u: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { createDB, createTable, insertMany, many } from "blinkdb"; | |
| import loki from "lokijs"; | |
| import { Bench } from "tinybench"; | |
| import charsJson from "./config2.json"; | |
| charsJson.forEach((char, i) => char.id = i) | |
| interface Char { | |
| id: number; | |
| u: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { createDB, createTable, insertMany, many } from "blinkdb"; | |
| import loki from "lokijs"; | |
| import { Bench } from "tinybench"; | |
| import charsJson from "./config2.json"; | |
| charsJson.forEach((char, i) => char.id = i) | |
| interface Char { | |
| id: number; | |
| u: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print('zotero-live-citations a522fcd') | |
| local mt, latest = pandoc.mediabag.fetch('https://retorque.re/zotero-better-bibtex/exporting/zotero.lua.revision') | |
| latest = string.sub(latest, 1, 10) | |
| if 'a522fcd' ~= latest then | |
| print('new version "' .. latest .. '" available at https://retorque.re/zotero-better-bibtex/exporting') | |
| end | |
| do | |
| local _ENV = _ENV |