Skip to content

Instantly share code, notes, and snippets.

View wlpotter's full-sized avatar

William L Potter wlpotter

View GitHub Profile
@wlpotter
wlpotter / zotero_add_uris_to_extra.js
Last active May 22, 2025 15:59
Simple JavaScript using the Zotero JS API to update selected records' extra field with Syriaca and Zotero item URIs
/*
author: William L. Potter
version: 1.0
This JS will update the extra field for selected records in a Zotero library.
It adds to the extra field the Zotero URI for the item, as well as the Syriaca URI
It only adds these properties if they do not already exist
To run the script,
1. Open the Zotero desktop client
@wlpotter
wlpotter / spear-predicates-for-persons
Created May 21, 2025 19:42
This is the set of predicates in SPEAR data used with a person URI as either its subject or object
{
"predicates": [
"http://syriaca.org/prop/direct/professional-relationship",
"http://syriaca.org/prop/child-of-sibling-of",
"http://syriaca.org/prop/direct/bishop-over-clergy",
"http://syriaca.org/prop/commemorates",
"http://syriaca.org/prop/follower-of",
"http://syriaca.org/prop/direct/socec-status",
"http://syriaca.org/prop/sanctity",
"http://syriaca.org/refuter-of",
@wlpotter
wlpotter / tei-example.xml
Created March 8, 2024 16:22
Sample TEI XML example
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://raw.githubusercontent.com/srophe/syriaca/2023_SchemaWork/documentation/schemas/out/syriacaPersons.compiled.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://raw.githubusercontent.com/srophe/syriaca/2023_SchemaWork/documentation/schemas/out/syriacaPersons.compiled.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<?xml-model href="https://raw.githubusercontent.com/srophe/syriaca/2023_SchemaWork/documentation/schemas/uniqueLangHW.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:srophe="https://srophe.app" xml:lang="en">
<teiHeader>
<fileDesc>
<titleStmt>
<title level="a" xml:lang="en">ʿAbdelmasih — <foreign xml:lang="syr">ܥܒܕܐܠܡܣܝܚ</foreign>
</title>
@wlpotter
wlpotter / simple-xml-booklist.xml
Created March 8, 2024 15:45
Simple XML example for TEI XML training
<?xml version="1.0" encoding="UTF-8"?>
<bookList>
<book id="1">
<title>Fourth Wing</title>
<author>Rebecca Yarros</author>
<date>2023</date>
<publisher>Red Tower Books</publisher>
<isbn>9781649374042</isbn>
</book>
<book id="2">
@wlpotter
wlpotter / place8-merged.xml
Created January 19, 2024 22:37
Merged place example record
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://raw.githubusercontent.com/srophe/syriaca/2023_SchemaWork/documentation/schemas/out/syriacaPlaces.compiled.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?><?xml-model href="https://raw.githubusercontent.com/srophe/syriaca/2023_SchemaWork/documentation/schemas/out/syriacaPlaces.compiled.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?><?xml-model href="https://raw.githubusercontent.com/srophe/syriaca/2023_SchemaWork/documentation/schemas/uniqueLangHW.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:svg="http://www.w3.org/2000/svg" xmlns:srophe="https://srophe.app" xmlns:syriaca="http://syriaca.org" xml:lang="en">
<teiHeader>
<fileDesc>
<titleStmt>
<title level="a" xml:lang="en">Amida
— <foreign xml:lang="syr">ܐܡܝܕ</foreign>
@wlpotter
wlpotter / person51-merged.xml
Created January 19, 2024 22:35
Merged person record example
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://raw.githubusercontent.com/srophe/syriaca/2023_SchemaWork/documentation/schemas/out/syriacaPersons.compiled.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://raw.githubusercontent.com/srophe/syriaca/2023_SchemaWork/documentation/schemas/out/syriacaPersons.compiled.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<?xml-model href="https://raw.githubusercontent.com/srophe/syriaca/2023_SchemaWork/documentation/schemas/uniqueLangHW.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:srophe="https://srophe.app" xmlns:functx="http://www.functx.com" xmlns:saxon="http://saxon.sf.net/" xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl" xml:lang="en">
<teiHeader>
<fileDesc>
<titleStmt>
<title level="a" xml:lang="en">Severus of Antioch — <foreign xml:lang="s
@wlpotter
wlpotter / cbss-betterbibtex-json.json
Created January 12, 2024 15:55
An example export of BetterBibTex JSON format from Zotero
{
"config": {
"id": "36a3b0b5-bad0-4a04-b79b-441c7cef77db",
"label": "BetterBibTeX JSON",
"preferences": {
"ascii": "",
"asciiBibLaTeX": false,
"asciiBibTeX": true,
"autoAbbrev": false,
"autoAbbrevStyle": "",
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "https://gist.githubusercontent.com/wlpotter/a5d8b2179f1d932c561f49188f21fa3e/raw/89b7994e3528b2ecd789fc4d96f8ab263bcc0aaa/sinai-reconstr-v2-one-range-test.json",
"@type": "sc:Manifest",
"label": "Sinai, St. Catherine’s Monastery, Syriac 50",
"viewingHint": "paged",
"viewingDirection": "right-to-left",
"attribution": "Images: Contact the Monastery of St. Catherine's of the Sinai. Metadata: Unless otherwise indicated all metadata associated with this manuscript is copyright the authors and released under Creative Commons Attribution 4.0 International License.",
"metadata": [
{
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "https://gist.githubusercontent.com/wlpotter/6c1903163fc8db6e099a650e46056b09/raw/643537fdf14e19cc341105bf3d65613cc75b917a/sinai-reconstr-v2-sequences.json",
"@type": "sc:Manifest",
"label": "Sinai, St. Catherine’s Monastery, Syriac 50",
"viewingHint": "paged",
"viewingDirection": "right-to-left",
"attribution": "Images: Contact the Monastery of St. Catherine's of the Sinai. Metadata: Unless otherwise indicated all metadata associated with this manuscript is copyright the authors and released under Creative Commons Attribution 4.0 International License.",
"metadata": [
{
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "https://gist.githubusercontent.com/wlpotter/26955f60108ac5298d2f8ade5c38a4a2/raw/ade715aaa4e99ccf040715b6d3fa324b79b2d564/sinai-reconstruction-test-v2-manifest.json",
"@type": "sc:Manifest",
"label": "Sinai, St. Catherine’s Monastery, Syriac 50",
"viewingHint": "paged",
"viewingDirection": "right-to-left",
"attribution": "Images: Contact the Monastery of St. Catherine's of the Sinai. Metadata: Unless otherwise indicated all metadata associated with this manuscript is copyright the authors and released under Creative Commons Attribution 4.0 International License.",
"metadata": [
{