Skip to content

Instantly share code, notes, and snippets.

View cmharlow's full-sized avatar

Christina Harlow cmharlow

View GitHub Profile
@anarchivist
anarchivist / pcdm-profile-template.md
Last active October 24, 2017 15:46
Profile template for PCDM-based models

title: PCDM Profile Template author:

  • Mark A. Matienzo
  • Christina Harlow date: 2016-10-20 profile: project: PCDM Profiles namespaces: pcdm: http://pcdm.org/models#
@bmcbride
bmcbride / google-form-to-github-issue.md
Last active September 11, 2024 08:13
Create a new GitHub Issue from a Google Form submission

Wiring up a Google Form to GitHub is not that difficult with a little bit of Apps Script automation. All you need is a Google account, a GitHub account, and a web browser...

Set up your GitHub Personal Access Token

Personal access tokens provide an easy way to interact with the GitHub API without having to mess with OAuth. If you don't already have a personal access token with repo or public_repo access, visit your GitHub settings page and generate a new token.

Be sure to copy your token some place safe and keep it secure. Once generated, you will not be able to view or copy the token again.

Set up the Form & Spreadsheet

  1. Create a Google Form.
@edsu
edsu / gist:dd92a2964e95782ce675
Last active April 12, 2019 20:59
Here's an example of the API call that WikiData's search box uses for suggesting entities. The suggestion is based on the text "ch" in the search URL query parameter.
curl --silent 'https://www.wikidata.org/w/api.php?action=wbsearchentities&search=ch&format=json&language=en&type=item&continue=0' | python -m json.tool
{
"search": [
{
"aliases": [
"encyclopaedia",
"encyclop\u00e6dia"
],
"description": "type of reference work",
"id": "Q5292",
#!/usr/bin/env python
import csv
from pymarc import MARCReader
from os import listdir
from re import search
# change this line to match your folder structure
SRC_DIR = '/path/to/mrc/records'