Skip to content

Instantly share code, notes, and snippets.

Brenton M. Wiernik bwiernik

Block or report user

Report or block bwiernik

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bwiernik
bwiernik / chicago-author-date-footnotes.csl
Created Dec 14, 2017
Chicago CSL style - author-date in footnotes
View chicago-author-date-footnotes.csl
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" demote-non-dropping-particle="display-and-sort" page-range-format="chicago">
<info>
<title>Chicago Manual of Style 17th edition (author-date in footnotes)</title>
<id>http://www.zotero.org/styles/chicago-author-date-footnotes</id>
<link href="http://www.zotero.org/styles/chicago-author-date-footnotes" rel="self"/>
<link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
<author>
<name>Julian Onions</name>
<email>julian.onions@gmail.com</email>
@bwiernik
bwiernik / RIS.js
Created Dec 13, 2017
Modified Zotero import translator for Endnote RIS files - import Accession Number as PMID
View RIS.js
{
"translatorID": "32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7",
"translatorType": 3,
"label": "RIS",
"creator": "Simon Kornblith and Aurimas Vinckevicius",
"target": "ris",
"minVersion": "3.0.4",
"maxVersion": null,
"priority": 100,
"inRepository": true,
@bwiernik
bwiernik / antiquity-custom.csl
Created Oct 20, 2017
Custom citation style based on Antiquity
View antiquity-custom.csl
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never" page-range-format="chicago" default-locale="en-GB">
<info>
<title>Antiquity</title>
<id>http://www.zotero.org/styles/antiquity</id>
<link href="http://www.zotero.org/styles/antiquity" rel="self"/>
<link href="http://www.zotero.org/styles/chicago-author-date" rel="template"/>
<link href="http://journal.antiquity.ac.uk/contribute" rel="documentation"/>
<author>
<name>Sebastian Karcher</name>
@bwiernik
bwiernik / ape-numeric.csl
Created Oct 5, 2017
Numeric APA CSL style
View ape-numeric.csl
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never">
<info>
<title>American Psychological Association 6th edition (numeric)</title>
<title-short>APA (numeric)</title-short>
<id>http://www.zotero.org/styles/apa-numeric</id>
<link href="http://www.zotero.org/styles/apa-numeric" rel="self"/>
<link href="http://owl.english.purdue.edu/owl/resource/560/01/" rel="documentation"/>
<author>
<name>Simon Kornblith</name>
View Random Sampling of Zotero Items
/*
Based on batch editing script from zuphilip
How does this work?
0) make a backup copy
1) create a collection of all entries you want to randomly sample
(maybe use a smart search or drag and drop, delete individual items)
2) check that you have exactly the items you want to change in your collection
3) choose one example here and adapt it to your needs
4) run the code
View apa-short-authors.csl
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never">
<info>
<title>American Psychological Association 6th edition (Short Authors)</title>
<title-short>APA (Short Authors)</title-short>
<id>http://www.zotero.org/styles/apa-short-authors</id>
<link href="http://www.zotero.org/styles/apa-short-authors" rel="self"/>
<link href="http://owl.english.purdue.edu/owl/resource/560/01/" rel="documentation"/>
<author>
<name>Simon Kornblith</name>
@bwiernik
bwiernik / gist:d6e9ec536d0b88c439b1
Created Apr 17, 2015
Web of Science "Citing references" translator records output
View gist:d6e9ec536d0b88c439b1
12:11:25 [
"0": [object HTMLDivElement] {
"align": ""
"click": function click() { [native code] }
"focus": function focus() { [native code] }
"blur": function blur() { [native code] }
"title": ""
"lang": ""
"dir": ""
"dataset": [object DOMStringMap] <<Maximum depth reached>>
@bwiernik
bwiernik / gist:ebe05a5b7017fedec68c
Created Apr 17, 2015
Web of Science "Cited references" translator records output
View gist:ebe05a5b7017fedec68c
12:12:53 [
"0": [object HTMLDivElement] {
"align": ""
"click": function click() { [native code] }
"focus": function focus() { [native code] }
"blur": function blur() { [native code] }
"title": ""
"lang": ""
"dir": ""
"dataset": [object DOMStringMap] <<Maximum depth reached>>
View zotbear.js
/*
How does this work?
0) make a backup copy
1) create a collection of all entries you want to batch edit
(maybe use a smart search or drag and drop, delete individual items)
2) check that you have exactly the items you want to change in your collection
3) choose one example here and adapt it to your needs
4) run the code
5) save the log if needed
*/
@bwiernik
bwiernik / gist:06b3cdd93b7602813aac
Created Mar 24, 2015
Batch edit item language to de for German items
View gist:06b3cdd93b7602813aac
var fieldName = "title";
var fieldName2 = "language";
var oldValue = "für";
var newValue = "de";
var fieldID = Zotero.ItemFields.getID(fieldName);
var fieldID2 = Zotero.ItemFields.getID(fieldName2);
var s = new Zotero.Search;
s.addCondition(fieldName, 'contains', oldValue);
s.addCondition("itemType", 'isNot', "attachment");
You can’t perform that action at this time.