Code Monkey home page Code Monkey logo

npdfr's Introduction

npdfr

npdfr (ncurses PDF reader) is a command-line PDF reader prioritizing fast searches.

Why?

I use a lot of PDFs for running tabletop RPGs and often need to search through them. This isn't nearly as snappy as it could be because of the tendency of PDF readers to lazy-render the PDF. I wanted a command-line reader that wouldn't do this and would respond to search queries more immediately.

Platform Support

Really intended for use on Linux only, but should be reasonably easy to adapt to other operating systems.

Project Status

Complete and ready to use! Please open an issue if you find any problems or it stops working.

Contributions

Contributions are accepted.

How to Build

Make sure the following dependencies are available:

  • python 3.8+
  • pip
  • virtualenv
  • cmake
  • make
  • jsoncpp
  • ncursesw

Then run the following commands:

mkdir -p build
cd build
cmake ..
make -j$(nproc)

The following CMake flags are available:

Flag Default Value Use
NPDFR_DEPLOYMENT On When enabled compiles with optimizations, otherwise compiles with debugging symbols.

How to Install

After running the build commands, run this command:

sudo make install

Usage Instructions

If you have installed the program globally run:

npdfr /path/to/file.pdf

Otherwise run ./run.sh /path/to/file.pdf in the project root directory. You can open multiple PDFs by supplying multiple file names.

Keybindings

The keybindings are mostly the same as the less utility.

Key Action
g, home Go to first page
G, end Go to last page
u, U Go to start of page
d, D Go to end of page
tab Next document
shift+tab Previous document
space, f, F, page down Next page
b, B, page up Previous page
h, H, left arrow Pan left
e, E, j, J, enter, down arrow Scroll down
y, Y, k, K, up arrow Scroll up
l, L, right Pan right
q, Q Quit
n Find next
N Find previous
/ Search forwards
? Search backwards

Credit & License

Developed by Amini Allight, licensed under the GPL 3.0.

npdfr's People

Contributors

amini-allight avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.