Skip to content

Instantly share code, notes, and snippets.

View jeremyboggs's full-sized avatar

Jeremy Boggs jeremyboggs

  • Scholars' Lab, UVa Library
  • Charlottesville, Virginia
View GitHub Profile
@jeremyboggs
jeremyboggs / games-lab.md
Created September 9, 2024 16:01
GamesLab resources
@jeremyboggs
jeremyboggs / tei-resources.md
Last active September 10, 2024 15:06
TEI Resources
title author layout
TEI Resources
jeremy-boggs
page

TEI is a XML-based approach for encoding texts in machine-readable ways for humanities and social sciences applications.

Learning Resources

@jeremyboggs
jeremyboggs / jsonl-to-csv.py
Created March 13, 2024 18:32
Converts JSONL generated from Browsertrix to CSV.
import json
import csv
# Identify the JSONL fields we wish to retrieve and write
# to the CSV file.
fields = ['id','title','text','url']
# Open a new CSV file and open the existing JSONL file.
with open('pages.csv', 'w') as csv_file, open("pages.jsonl", "r") as json_file:
# Create a CSV writer object.
@jeremyboggs
jeremyboggs / prosody.html
Created January 8, 2024 19:43
prosody.html
<?xml version="1.0"?>
<div xmlns="http://www.w3.org/1999/xhtml" id="rhyme" style="display:none;"><div id="rhymespacer"> </div><form name="abbaabbacdcdcd" id="rhymeform" autocomplete="off"><p><br/></p><div class="lrhyme"><input size="1" maxlength="1" value="" name="lrhyme-1-1" type="text" onFocus="this.value='';this.style['color'] = '#44FFFF';"/></div><div class="lrhyme"><input size="1" maxlength="1" value="" name="lrhyme-1-2" type="text" onFocus="this.value='';this.style['color'] = '#44FFFF';"/></div><div class="lrhyme"><input size="1" maxlength="1" value="" name="lrhyme-1-3" type="text" onFocus="this.value='';this.style['color'] = '#44FFFF';"/></div><div class="lrhyme"><input size="1" maxlength="1" value="" name="lrhyme-1-4" type="text" onFocus="this.value='';this.style['color'] = '#44FFFF';"/></div><div class="lrhyme"><input size="1" maxlength="1" value="" name="lrhyme-1-5" type="text" onFocus="this.value='';this.style['color'] = '#44FFFF';"/></div><div class="lrhyme"><input size="1" maxlength="1" value=""
@jeremyboggs
jeremyboggs / soup.py
Created January 8, 2024 18:32
First few lines to get some web text for Beautiful Soup.
import requests
from bs4 import BeautifulSoup
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0'}
page_url = 'https://example.com'
page_text = requests.get(page_url,headers=headers).text
soup = BeautifulSoup(feed_text);
print(soup);
@jeremyboggs
jeremyboggs / dh-portfolio.md
Created February 22, 2023 21:17
Notes and Resources for DH Portfolio Workshop
@jeremyboggs
jeremyboggs / zotero.md
Created November 10, 2022 20:01
Zotero things

Jekyll

  • Pandemic Academy (Github) was a modest attempt to create a website from a group bibliography, in collaboration with Alison.
  • Jekyll Scholar, a gem that provides tools for mixing blogging and scholarly activity (e.g. citation, bibliography)
  • jekyll-ld, a gem for parsing various Linked Data attributed in a Jekyll site.
  • rzotero, early (and not up-to-date) Ruby wrapper for the Zotero API.

Python

@jeremyboggs
jeremyboggs / checklist.md
Created October 3, 2022 14:47
Checklist for removing a project

Removing a project from our hosting

Checklist

  • Remove DNS entry
  • Remove nginx configuration; turn off Github Pages; Remove Traefik
  • docker-compose down
  • Delete container from websites directory

Questions and considerations

  • Protocol for archiving it.