Coder Social home page Coder Social logo

sdlbook's Introduction

SDLBook - a tiny djvu/pdf eBook reader

What?

Tiny eBook reader using only SDL or SDL2, djvulibre, and libmupdf.

Why?

Since there are no djvu readers with reasonable dependency requirements (i.e. GTK+2, X11, SDL1 or 2, framebuffer) available, I decided to write my own, by taking a firm glance at what djvulibre's ddjvu utility does and rendering to a video buffer instead of a file. I'm not interested in installing heavy-weight GUI toolkits such as QT4,5,GTK+3,4 etc just for a simple eBook reader. Nor in installing python3 just to run someone's meson build recipe.

As I dislike the interruptive page jumping of mupdf-x11, I've added mupdf support too so it can take advantage of the smooth page border scrolling mechanism of SDLBook. Therefore it now also supports all the formats supported by mupdf, namely pdf, epub, fb2, xps, openxps, cbz, cbr.

How?

  • Install SDL and djvulibre libraries including development headers.
  • Compile using gnu make by running make CFLAGS=-O2. if you want to use SDL2, run make SDL2=1 CFLAGS=-O2 instead.
  • Install as root user by doing make install prefix=/usr.
  • Run like sdlbook /path/to/file.djvu
  • Press F1 to see available keyboard shortcuts
  • Have fun reading.

sdlbook's People

Contributors

apaczer avatar rofl0r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sdlbook's Issues

DSO missing from command line (build error)

I'm trying to build this on Ubuntu following the instructions however I encounter the following error:

$ make CFLAGS=-O2
cc    -O2 -c -o sdlbook.o sdlbook.c
cc  -O2   sdlbook.o -ldjvulibre -lmupdf -lSDL -lm -o sdlbook
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libmupdf.a(load-jpeg.o): undefined reference to symbol 'jpeg_resync_to_restart@@LIBJPEG_8.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libjpeg.so.8: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [Makefile:40: sdlbook] Error 1

How could this be fixed?

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.