Quickly Rename Downloaded PDF Files Based On Metadata And Content With Paperboy (Console)

Paperboy is a small, simple command line PDF management utility written in Haskell that's designed to help with downloaded PDF documents that don't have proper / discernible filenames. The tool uses the PDF metadata and content to offer suggestions for quickly renaming the file, while also letting you open the PDF to check out its content before renaming it. It's available for Linux and macOS.

Paperboy UI

Paperboy can rename PDF files from your Downloads folder based on their metadata and content, and move them to a folder you set, using an interactive command line user interface. This is especially useful for those having a large number of PDF documents in the Downloads folder, which contain names that don't mean anything, like "3325_56545.pdf", names containing only part of the PDF title, and so on.

It'd like to add that using Paperboy, the renaming is still done manually (you have to select a name from the Paperboy suggestions), as the command line tool is intended to be very simple and serve only one purpose, without a database or background watching.

The Paperboy terminal user interface (TUI) consists on 2 screens: the inbox, which by default shows all your PDF documents from the Downloads directory, and a library screen (~/papers by default), which shows the PDFs from the library folder (already imported and renamed PDF documents). Switch between these two screens using the Tab key.

You might also like: How To Edit PDF Metadata Tags On Linux Using A GUI Or Command Line

Paperboy Import dialog with new filename suggestions

To import a PDF and rename it using the suggestions offered by Paperboy, select a PDF from the Inbox screen, press Enter or Space (or r), review and select one of the Paperboy filename suggestions, and press the Enter key. In the Import screen you may also press Ctrl-o to open the current file with your default PDF viewer, to check its contents before renaming.

You can view all the Paperboy keyboard shortcuts by pressing h:

Paperboy help

The Inbox and Library folders, and some other settings are configurable. When you run Paperboy for the first time, it asks you if you want to create a configuration file at ~/.config/pboy/pboy.ini -- select to create this config file, and after that you can edit this file to change:

  • the inbox folder, which is the folder Paperboy checks for new PDF documents to import (defaults to Downloads; it can be either a path relative to your home directory, like "Downloads", or a full path to the folder)
  • the library folder, which is the location where Paperboy places imported PDF documents after renaming them (~/papers by default)
  • choose if you want to move the imported PDF documents or leave the original documents intact (set to true by default)
  • the word separator; this is used to separate words in the PDF document filename (default is _)

It might also interest you: rga: Search Text In PDF, Ebooks, Office Documents, Archives And More (ripgrep Wrapper)

Download and install Paperboy

On Linux, download the pboy linux.tar.gz file, extract it, and install the extracted pboy binary to a directory from your $PATH. For example, install it in /usr/local/bin using (run this command from the folder where you extracted the pboy binary):

sudo install pboy /usr/local/bin