Skip to content

Instantly share code, notes, and snippets.

# This sample code will get data from excel files that are sent as gmail attachments by scraping the embedded "sheet1.xml" files, if the files are formatted the same way.
# The data in each attachment (in this example, arrest records) will be saved a csv file in the "outpath" subdirectory. The csvs can later be combined using csvkit or another tool if so desired.
# Code originally written in Python 2.7 (sorry!)
import os
import re
import csv
import imaplib

Style Book

We're currently using the Chicago Manual of Style. It's imperfect, but it's better than the alternatives, so far.

Style Basics & Deviations From the Stylebook

  • We don't wrap article titles within text in quotes, but we do link to them on first usage
  • We don't italicize the names of publications in article text
  • We don't cap "The" in publication titles in article text, but we do in Organization entries
  • Commas and periods go inside closing quotation marks