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 / 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 / digital-collections.md
Last active September 5, 2023 14:05
Digital Collections

Digital Collections & Archives

Description

Digital archives + collections are a curated set of items pertaining to a specific topic, often described with some form of standardized metadata, that are shared for use with a public user base. These kinds of projects are among the earliest examples of Digital Humanities work, and generally tend to make public otherwise unavailable material, especially in projects focused on marginalized or silenced voices. In addition to gathering historical materials, digital collections can also actively request first-person accounts and materials in response to specific events.

Examples

@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.
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@200;300&display=swap" rel="stylesheet">
<style>
html,body {
margin:0;
padding:0;
}