Skip to content
a small .pdf management tool with a command-line UI
Haskell Shell Nix
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci circleci+stack Apr 20, 2019
app wip Jan 6, 2019
doc readme, todo and screenshot May 21, 2018
nix versions bump Oct 25, 2019
src lib cleanup, open files with 'o' Oct 25, 2019
tools Update install-stack.sh Oct 16, 2018
.ghcid remove stack, add some niceties Mar 25, 2019
.gitignore stack lts bump Jun 17, 2019
.hlint.yaml cleanups Apr 3, 2019
.stylish-haskell.yaml remove stack, add some niceties Mar 25, 2019
.travis.yml remove nix + osx from travis Apr 20, 2019
Changelog.txt 1.3 release date Oct 27, 2019
LICENSE init Apr 13, 2018
README.md Add dependency on libtinfo.so.5 Oct 27, 2019
Roadmap.md license and roadmap Apr 20, 2019
default.nix cleanups Apr 3, 2019
pboy.cabal version number bump Jun 17, 2019
pboy.nix cleanups Apr 3, 2019
stack.yaml versions bump Oct 25, 2019
ui_states.dot help screen Apr 19, 2019

README.md

import screen

CircleCI Build Status

Paperboy is a tiny .pdf management utility.

If you download papers and other pdf documents, you might have noticed that filenames like 1412.4880.pdf are not terribly helpful for finding anything later on. Especially if your download folder also contains about eighty files along the lines of catloaf.jpg, David_Lynch_Teaches_Typing.zip, and 160502_0001.wav.

This tool helps with that. It will offer to rename and move files to a specified folder, and it even gives some filename suggestions by looking at the content and the pdf metadata.

Paperboy keeps its file management dumb on purpose (no keeping files in a database or hidden library folder), so you can uninstall it at any time and your files will remain perfectly accessible.

Usage

  • Open a new file import dialog with Enter or Space.
  • Switch between inbox and library with Tab.
  • Open a file from the library with Enter or Space.
  • Rename an already imported file with r.
  • Quit the application with Esc or q or abort with Ctrl + c.

Install

Homebrew on macOS

If you're a Homebrew user, you can install the latest version and its dependencies from the repo's tap:

$ brew install 2mol/tools/pboy

Linux/Mac binary release

Download the archive for your operating system from https://github.com/2mol/pboy/releases. Extract and install it with

$ tar zxvf pboy*.tar.gz
$ mv pboy ~/.local/bin/

For the latter to work, ~/.local/bin/ needs to exist and be in your PATH. Alternatively, put it in /usr/local/bin.

Note that pboy is linked against libtinfo.so.5, but some distros now have libtinfo.so.6. On Debian 10, for example, pboy doesn't work unless the libtinfo5 package is installed

sudo apt install libtinfo5

Linux, any distro

I am still looking to package Paperboy for Debian/Ubuntu, Arch/Manjaro, Fedora, Doge Linux, or whatever else people install these days.

Any pointers or help with regards to generate .deb, .rpm, AUR PKGBUILD, etc is appreciated. Ideally this could be mostly automated in CI, in the end Paperboy is just a single binary with a dependency or two. How do other packages do it? If you got a good example or link, open a GitHub issue!

Cabal/Stack

Make sure you have poppler installed, which will provide both pdftotext and pdfinfo. On Linux, install poppler with your package manager of choice. If you are on Mac and using Homebrew you can do brew install poppler.

Assuming you have cabal or stack, the following will compile, then install the pboy executable in your .local/bin:

$ git clone git@github.com:2mol/pboy.git
$ cd pboy
$ stack install

Replace stack install with cabal new-install at your leisure.

Nix

If you have Nix, then you can install pboy with a single command:

$ nix-env -if https://github.com/2mol/pboy/tarball/master

Config

Paperboy creates a pboy.ini in your XDG config directory. This is probably in ~/.config/pboy/pboy.ini, the welcome or help screen will tell you. Use this to change your library and incoming folders, as well as to specify whether you want to move the imported files or just copy them.

Note: The config file location & format changed in version 1.1. Sorry to existing users, but the update should be trivial. Simply tweak the inbox and library folders in the new config. You can then delete ~/.pboy.toml.

Current Limitations

Paperboy doesn't do anything fancy with providing renaming patterns yet. For example, some people requested to be able to specify a format like author-document_name-date.pdf, others have asked if they could compose multiple suggestions into one. I haven't figured out a way to do this while keeping the UI simple and straightforward, so the idea needs a bit of design work first.

Contribute

You're very welcome to suggest new features or open issues. See the Roadmap https://github.com/2mol/pboy/blob/master/Roadmap.md to get an idea about what's planned for future releases.

Thanks

  • brick is a lovely way to a write a command-line UI.
  • nmattia did the work to get Paperboy to build with nix and patiently explained some of the basics to me.
  • OsugiSakae and bri-an on reddit helped me with an annoying performance issue!
  • Nils Steinger for feature contributions.

The name 'Paperboy' is a reference to this game, which I had for the NES and never quite mastered.

You can’t perform that action at this time.