Skip to main content

Offline-friendly PDF renamer that generates meaningful, keyword-rich filenames from first-page content.

Project description

meaningful-pdf-names

Offline-friendly CLI to turn your messy paper filenames into compact, keyword-rich names based on the PDF's first page.

Example:

final_v3_really_final.pdfurban-resilience-transport-inequality-policy-a9f.pdf

Features

  • Uses only the first page (title, authors, abstract region) for speed
  • Up to 5 meaningful keywords per file
  • Adds a 3-character [a-z0-9] suffix to avoid collisions
  • Works fully offline with pypdf
  • Optional: use a small local Hugging Face summarizer (sshleifer/distilbart-cnn-12-6) via transformers + torch

Prerequisites

  • Python 3.9+ installed on your system
  • pip (Python package manager) - usually comes with Python

Quick Install

From PyPI (Recommended)

pip install meaningful-pdf-names

Quick Start Guide

For Mac Users

  1. Install the package (see above)
  2. Navigate to your PDF folder:
    • Open Finder and go to the folder containing your PDFs
    • Right-click on the folder and select "New Terminal at Folder"
    • This opens Terminal directly in that folder
  3. Run the command:
    mpn .
    

For Linux Users

  1. Install the package (see above)
  2. Navigate to your PDF folder:
    cd /path/to/your/pdf/folder
    
  3. Run the command:
    mpn .
    

For Any Folder Location

If you want to rename PDFs in a different folder without navigating there:

mpn /full/path/to/your/pdf/folder

Usage Examples

Basic usage (current folder):

mpn .

Specific folder:

mpn ~/Downloads/research_papers
mpn /Users/username/Documents/PDFs

Dry run (preview changes without renaming):

mpn . --dry-run

Quiet mode (minimal output):

mpn . --quiet

What It Does

  • Scans all PDF files in the specified folder
  • Extracts text from just the first page (fast!)
  • Identifies meaningful keywords from titles, authors, abstracts
  • Generates clean, readable filenames like:
    • climate-change-urban-planning-sustainability-a9f.pdf
    • machine-learning-neural-networks-research-4x2.pdf
    • healthcare-policy-digital-transformation-b7c.pdf

Why Not Existing Tools?

Other tools often:

  • Depend on OpenAI / web APIs (requires internet, API keys)
  • Require DOIs or external metadata (not always available)
  • Use long Author - Title - Year patterns (hard to read)

meaningful-pdf-names is:

  • Local-only (no API keys, no network required)
  • Fast (first-page only extraction)
  • Slug-based: short, grep- and git-friendly names

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meaningful_pdf_names-0.1.1.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

meaningful_pdf_names-0.1.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file meaningful_pdf_names-0.1.1.tar.gz.

File metadata

  • Download URL: meaningful_pdf_names-0.1.1.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for meaningful_pdf_names-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a5d52065abcc7c74a5b8068deb041655c3d7b8299bbcb259408505c0abf9d355
MD5 d3d878c433a49265a69da6446c0e7d0f
BLAKE2b-256 7557ef542f242156c15e3ff448bc6d0b1c2ba6be7c52e748a75cbe782586cf49

See more details on using hashes here.

File details

Details for the file meaningful_pdf_names-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for meaningful_pdf_names-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fdb871420635b3de9470ccf94b81fc473e0a74241399622b5dab7d6086f31ad1
MD5 1c7437d505f95841bfdbe192262ef951
BLAKE2b-256 6d41350096cf274192dd94f79d36d122eba7db7a358dbb491803ccba7717aedb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page