Skip to content

Flameeyes/pdfrename

Repository files navigation

PDF Renaming Utilities

This is a rough and hacky script that looks into the first page of PDF files to figure out what they are, and propose (or applies) a new name to them based on their content.

Supported PDFs

As this is aimed at my (@Flameeyes) own use, the list of supported PDFs pretty much focuses on bills and statements from UK, Italian, or Irish services and banks.

Usage

Set up the virtual environment as follows. Select the script for bash (Linux, OSX, etc.) or Windows PowerShell (especially for Visual Studio Code).

$ python -m venv venv
$ . venv/bin/activate  # bash
$ venv\Scripts\activate.ps1  # Windows PowerShell
(venv) $ pip install -e .

Once the venv is activated and the dependencies installed, you can run the script from the directory and point it to one or more PDFs:

# Only prints suggested renames
(venv) $ pdfrename unsortedbill.pdf

# Actually rename files
(venv) $ pdfrename --rename unsortedbill.pdf

# Verifies names
(venv) $ pdfrename --list-all "2155-10-28 - AWS - Neo - Bill.pdf"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages