Skip to content

Instantly share code, notes, and snippets.

@agoldst
agoldst / enex.R
Last active August 6, 2017 10:09
Quick and dirty conversion of exported evernote notes to tagspaces-type files
# Please see the accompanying enex.md file for usage notes.
library(xml2)
library(stringr)
enex_tagspace <- function (enex, d, dry=T) {
node_title <- . %>% xml_find_all(".//title") %>% xml_text()
# Tagspaces delimits tags by spaces, so we have to eliminate spaces from
# tag names.
@agoldst
agoldst / contacts_query.sh
Last active November 28, 2023 01:15
Query macOS contacts for mutt
#!/bin/bash
#
# contacts_query.sh
# Andrew Goldstone, July 2017. All yours to use or modify, but no promises.
#
# The mutt e-mail client has an option to query an external address book for
# e-mail addresses. On a Mac it is nice to be able to query the Address Book
# (now known as Contacts). For a while I used a utility called contacts
# (http://gnufoo.org/contacts) but this stopped working under Sierra. There is
# an official API for querying Contacts as a unified datastore, but it is only
---
title: "Nobel genre tallies"
output:
html_document:
self_contained: false
...
```{r setup, include=F}
library(tidyverse)
library(rvest)