Skip to content

Instantly share code, notes, and snippets.

@fpunktk
fpunktk / document_to_text.py
Created February 27, 2018 12:57 — forked from bufke/document_to_text.py
Convert odt, doc, docx, pdf to text with python and some linux programs. Doesn't require Libreoffice.
from subprocess import Popen, PIPE
from docx import opendocx, getdocumenttext
#http://stackoverflow.com/questions/5725278/python-help-using-pdfminer-as-a-library
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
from pdfminer.pdfpage import PDFPage
from cStringIO import StringIO
@fpunktk
fpunktk / wipe.sh
Created April 15, 2017 11:48
wipe a large disk faster than with urandom
#!/bin/sh
# copy from http://www.codegist.net/snippet/shell/wipesh_fpunktk_shell
which openssl > /dev/null || exit 1
which pv > /dev/null || exit 1
which sudo > /dev/null || exit 1
test -n "$1" || exit 2
disk="$1"

Keybase proof

I hereby claim:

  • I am fpunktk on github.
  • I am fpunktk (https://keybase.io/fpunktk) on keybase.
  • I have a public key whose fingerprint is C1AB D253 F388 528D E4E6 155B 7603 B69E 0EB3 6DFA

To claim this, I am signing this object: