This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Mode for Caleb: The lives of Douglass: Part II</title> | |
<style type="text/css"> | |
body{margin:0px;padding:0px;background:#fff;color:#000000;font:1.5em "Trebuchet MS",Verdana,Arial,Sans-Serif;font-size:13px;} | |
a{text-decoration:none; color:#C4372D;} | |
a:hover{border-bottom:solid 1px;} | |
#logo{padding:0px;margin:0px;} | |
div#mainClm{float:right;width:60%;padding:30px 7% 10px 3%;border-left:dotted 1px #000;border-right:dotted 1px #000;text-align:left;border-bottom:dotted 1px #000;} | |
div#sideBar{width:200px;margin:20px;padding-top:20px;padding-left:5px;padding-right:5px;text-align:left;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Take a PDF, OCR it, and add OCR Text as background layer to original PDF to make it searchable. | |
# Hacked together using tips from these websites: | |
# http://www.jlaundry.com/2012/ocr-a-scanned-pdf-with-tesseract/ | |
# http://askubuntu.com/questions/27097/how-to-print-a-regular-file-to-pdf-from-command-line | |
# Dependencies: pdftk, tesseract, imagemagick, enscript, ps2pdf | |
# Would be nice to use hocr2pdf instead so that the text lines up with the PDF image. | |
# http://www.exactcode.com/site/open_source/exactimage/hocr2pdf/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# Pandoc filter that grabs the BibTeX code block from each note file | |
# and then uses bibtexparser to add a "short title" entry in the "note" field, | |
# appending finished BibTeX entry to a bibliography file. | |
from pandocfilters import toJSONFilter, CodeBlock | |
# https://github.com/sciunto/python-bibtexparser | |
import bibtexparser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python | |
# -*- coding: utf-8 -*- | |
# Usage: pandoc --filter=wayback.py input | |
# Install pandocfilters and requests with pip before using | |
# Warning: may take a while to process input with lots of links | |
# Note: Links that can't be saved to WBM or already point to WBM are left as is | |
from pandocfilters import toJSONFilter, Link | |
import requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
TODAY=$(date +%m) | |
FILE=~/.duesoon | |
# This may be more complex than need be, but it permits months with or without leading zeroes | |
let THISMO=$TODAY-0 | |
if [ $THISMO = 12 ]; then | |
let NEXTMO=01 | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
## docvert.py | |
## by W. Caleb McDaniel | |
## http://wcm1.web.rice.edu | |
## This is a wrapper script for sending documents to Docverter | |
## for conversion from markdown to PDF. It offers a python | |
## alternative to using cURL. For more information, see: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
## iMDtoPDF.py | |
## by W. Caleb McDaniel | |
## http://wcm1.web.rice.edu | |
## This is a wrapper script for sending documents to Docverter | |
## for conversion from markdown to PDF using Pandoc. Typically | |
## Docverter calls are made with cURL; this script uses httplib. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clear console | |
import console | |
console.clear() | |
print "Tap a photo to fetch a new one!" | |
print "Finding cute grandkid photos ..." | |
from scene import * | |
import urllib2 | |
import random |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from pandocfilters import toJSONFilter, RawInline, Space, Str, walk | |
""" | |
Pandoc filter for Markdown that converts most endnotes into | |
Pandoc's inline notes. If input notes had multiple paragraphs, | |
the paragraphs are joined by a space. But if an input note | |
had any blocks other than paragraphs, the note is left as is. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import sys, requests | |
# Usage: Pass URL to script, get back URL to Wayback Machine snapshot | |
base_url = 'http://web.archive.org' | |
r = requests.get(base_url + '/save/' + sys.argv[1]) | |
if r.status_code == requests.codes.ok: |
NewerOlder