Skip to content

Instantly share code, notes, and snippets.

@chrK
chrK / pdf-date-rename
Last active December 11, 2015 18:38
********* Moved to: https://github.com/chrK/pdf-rename ********* A Simple script to parse dates from pdfs and rename them with a date prefix and a keyword. Run the script inside the folder with the pdfs you want to rename. ! Attention: This renames and moves your files. Be sure to have backups of the data you're working on.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, getopt, os, re, time, locale, csv
from cStringIO import StringIO
try:
from pdfminer.pdfinterp import PDFResourceManager, process_pdf
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams