Skip to content

Instantly share code, notes, and snippets.

View ckolumbus's full-sized avatar
🐧
Live, Love, Code

Chris Drexler ckolumbus

🐧
Live, Love, Code
View GitHub Profile
@ckolumbus
ckolumbus / extract_pdf_comments.py
Created April 8, 2014 09:12
PDF Comment extraction with Python and PDFMIner
from pdfminer.pdfparser import PDFParser
from pdfminer.pdfdocument import PDFDocument
from pdfminer.pdftypes import PDFObjectNotFound
pages = []
def extract(objid, obj):
global pages
if isinstance(obj, dict):
# 'Type' is PDFObjRef type
@ckolumbus
ckolumbus / waf.vim
Created March 14, 2014 09:29
waf build support settings for vim when used under Windows (not tested under Linux yet)
" add this to your vimrc or, if using [Project Addin](http://www.vim.org/scripts/script.php?script_id=69)
" you can use this file as in.vim
set makeprg=waf\ --notests
set shellpipe=2>&1\|tee
set errorformat=
"set errorformat+=%f(%l)\ :\ %t%*\\D%n:\ %m
"set errorformat+=%*[^\"]\"%f\"%*\\D%l:\ %m
"set errorformat+=%f(%l)\ :\ %m
"set errorformat+=%*[^\ ]\ %f\ %l:\ %m
@ckolumbus
ckolumbus / gist:2764461
Created May 21, 2012 20:29
Cherrypy Jinja handler
"""A Jinja Handler and tool. This code is in the public domain.
Adjusted for CherryPy 3.2
Usage:
@cherrypy.expose
@cherrypy.tools.jinja(template='index.html')
def controller(**kwargs):
return {
} # This dict is the template context