Skip to main content

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

Project description

Mac users: If you just want the ready-to-use macOS installer (right-click integration, no terminal required), head to Meaningful PDF Names — macOS DMG Release.

meaningful-pdf-names

Python application PyPI version codecov Code style: black Downloads

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 the first 2 pages by default (title, authors, abstract, introduction) for better context
  • Configurable page count with -p flag (e.g., -p 4 for 4 pages)
  • Up to 5 meaningful keywords per file
  • Adds a 3-character [a-z0-9] suffix to avoid collisions
  • Works fully offline with pypdf + pdfminer.six fallback
  • 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

Single PDF file:

mpn document.pdf
mpn ~/Downloads/paper.pdf

Multiple PDF files:

mpn paper1.pdf paper2.pdf paper3.pdf
mpn ~/Downloads/*.pdf

Mixed files and folders:

mpn . document.pdf ~/Downloads/research_papers

Dry run (preview changes without renaming):

mpn . --dry-run
mpn document.pdf --dry-run

Quiet mode (minimal output):

mpn . --quiet

Custom page count (read more pages for better context):

mpn . -p 4          # Read first 4 pages
mpn . -p 10         # Read up to 10 pages (or all if PDF has fewer)
mpn document.pdf -p 3  # Read first 3 pages of specific file

What It Does

  • Scans all PDF files in the specified folder
  • Extracts text from first pages (-p, default 2) with quality checks
  • Fallback order: pypdf -> pdfminer.six -> PDF metadata -> filename stem
  • 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.2.2.tar.gz (12.4 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.2.2-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: meaningful_pdf_names-0.2.2.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for meaningful_pdf_names-0.2.2.tar.gz
Algorithm Hash digest
SHA256 99070fdfcd275f14e988ee2428c9580644e697f6bace97b289a157ff8eefe457
MD5 23c3f6f1039b09c46fbe95fabb1a81e0
BLAKE2b-256 82b0bbb0b7e56e4301e6726c78b215ab62f4f196bd0aedf2d5d66425b325c38a

See more details on using hashes here.

Provenance

The following attestation bundles were made for meaningful_pdf_names-0.2.2.tar.gz:

Publisher: publish.yml on abcnishant007/meaningful-pdf-names

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for meaningful_pdf_names-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 77c793a8bc8232d16e9dcf45c290689a81b2d1c2ac41eeab3ab03b2a027130ca
MD5 f09841bad4d5abcf5d46f39e0d5c23b3
BLAKE2b-256 5002fb389d9b6e6b6e33c8446035bcbe00477c3ce91c8be62e8796207a5abe2a

See more details on using hashes here.

Provenance

The following attestation bundles were made for meaningful_pdf_names-0.2.2-py3-none-any.whl:

Publisher: publish.yml on abcnishant007/meaningful-pdf-names

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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