Coder Social home page Coder Social logo

ppub's Introduction

pPub 1.1

Version 1.1 by Thanasis Georgiou ([email protected])

Description

pPub is a simple epub reader written in Python using GTK3 and WebKit. It has most features expected from a book reader and some support for ebook-convert. It's licenced under GPLv2.

Features

  • Bookmarks use MD5 hashes so filenames are irrelevant.
  • Keyboard shortcuts.
  • Table of contents support.
  • Night mode and custom user CSS support.
  • Javascript toggle.
  • Basic support for ebook-convert.
  • Support for files that don't pass epubcheck.
  • Lightweight.

Here is a screenshot.

Installation

  • For Archlinux: Install ppub from AUR.

  • For Salix: slapt-src -i ppub (Probably not working anymore, if anyone can confirm notify me)

  • For other Linux distros and BSDs:

    make install

This command will install ppub under "/usr" prefix and configure it to invoke python 2.x via "/usr/bin/python2" command. To alter this behavior set PREFIX and PYTHON environment variables, eg.:

PREFIX=/usr/local PYTHON=`which python2.7` make install

Also note, icons and desktop file are installed by default. If you want to install only the program itself, invoke make with "install-bin" target instead of "install".

Configuration

Most features can be configured from inside the application with these exceptions:

  • cachedir = Path to cache, default is /tmp/ppub-cache-username. If you change this, keep the trailing '/'.
  • usercss = Path to custom CSS folder. Each file in that folder will appear as a separate menu entry. If invalid or 'None', custom CSS is disabled. Config is saved at ~/.ppub.conf. Bookmarks are stored inside the same file.

Help:

If you find a book that does not work, please extract it (like a zip file) and attach any .opf or .ncx it has inside to your bug report. These will help me resolve the problem. Also feel free to email me requests.

Contributors:

-Tristan Rice (https://github.com/d4l3k) -ehainry (https://github.com/ehainry) -Laurent Bigonville (https://github.com/bigon) -Laurent Peuch (https://github.com/Psycojoker) -Dmitrij D. Czarkoff (https://github.com/czarkoff)

Thanks for trying pPub out!

ppub's People

Contributors

bigon avatar czarkoff avatar d4l3k avatar psycojoker avatar thgeorgiou avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ppub's Issues

ImportError: cannot import name WebKit

Getting import error when I try to run ppub:

$ ppub
Traceback (most recent call last):
  File "/usr/share/ppub/ppub.py", line 22, in <module>
    from gi.repository import Gdk, Gtk, GObject, WebKit
ImportError: cannot import name WebKit

Installed on Debian 8, "Jessie":

# make install
install -d /usr/bin
install -d /usr/share/ppub
install ppub /usr/bin
install -m 644 contentprovider.py /usr/share/ppub/contentprovider.py
install -m 644 dialogs.py /usr/share/ppub/dialogs.py
install -m 644 night.css /usr/share/ppub/night.css
install -m 644 ppub.py /usr/share/ppub/ppub.py
install -m 644 xml2obj.py /usr/share/ppub/xml2obj.py
install -d /usr/share/icons/hicolor/24x24/apps
install -d /usr/share/icons/hicolor/32x32/apps
install -d /usr/share/icons/hicolor/48x48/apps
install -d /usr/share/icons/hicolor/64x64/apps
install -d /usr/share/icons/hicolor/scalable/apps
install -d /usr/share/applications
install -m644 misc/ppub-24.png \
    /usr/share/icons/hicolor/24x24/apps/ppub.png
install -m644 misc/ppub-32.png \
    /usr/share/icons/hicolor/32x32/apps/ppub.png
install -m644 misc/ppub-48.png \
    /usr/share/icons/hicolor/48x48/apps/ppub.png
install -m644 misc/ppub-64.png \
    /usr/share/icons/hicolor/64x64/apps/ppub.png
install -m644 misc/ppub-scalable.svg \
    /usr/share/icons/hicolor/scalable/apps/ppub.svg
install -m644 misc/ppub.desktop \
    /usr/share/applications/ppub.desktop

desktop integration

HI,

To make pPub appear in Xfce/Gnome/... menu, we need a .desktop file and an icon.
This is a ppub.desktop file:

[Desktop Entry]
Categories=Office;Viewer;
MimeType=application/epub+zip;
Exec=ppub %U
Icon=ppub_48
StartupNotify=false
Terminal=false
Type=Application
Name=pPub
Name[fr]=pPub
Comment=Simple epub ebbok reader
Comment[fr]=Simple lecteur d'ebook au format epub

link: http://people.salixos.org/fredg/packages/ppub/20111031/ppub.desktop

The icon is taken from wikipedia as I mention it in my SLKBUILD to create a slackware package.
Those lines can also be added to your PKGBUILD or in an install script.

Desktop integration

pPub has no official logo for now, in the meantine I
will use this one found on wikipedia converted to png
 http://en.wikipedia.org/wiki/File:EPUB_logo.svg

this is a logo owned by International Digital
Publication Forum for the EPUB file format. It is a
historical logo. Its historical usage is as follows:
The logo was recently accepted (2010-06) as part of a
competition to create a logo for EPUB. Further
details: Designed by Ralph Burkhardt as part of the
IDPF competition.
    install -Dm 644 $srcdir/ppub_48.png \
        $pkgdir/usr/share/icons/hicolor/48x48/apps/ppub_48.png
    install -Dm 644 $srcdir/ppub.desktop \
        $pkgdir/usr/share/applications/ppub.desktop

icons: http://people.salixos.org/fredg/packages/ppub/20111031/

And, btw, thanks for this simple app.

Regards.

fredg

Cannot Open File

I can start ppub without issue, but when I try to open an .epub file with it, it just freezes and has issues rendering the help bar or anything else.

Take a look:

20151024_19-15-00

I am running Debian 8, "Jessie" with LXDE desktop environment (which uses Openbox).

This might be a separate issue, but when I try to open it with a command line argument:
ppub path/to/book.epub
Nothing happens. It acts like it's running (doesn't end the process unless I force it to quit), but not windows pop up and not messages are logged ... :-(

Port to GTK+2

Is it planned to support GTK+2 and WebKitGTK?

Since most distributions, still, do not have WebKitGTK3 installed nor available, I guess a GTK+2 version of pPub will be easily provided and I hope it will make ePub more prevalent and known.

ppub fails to open ebook [libavutil.so.49: cannot open shared object file: No such file or directory]

I just installed ppub 1.0 on ArchLinux. I can start the GUI, however cannot load a epub which should be good.

Command line output:

> ppub
Unable to load the real plugin libavutil.so.49: cannot open shared object file: No such file or directory
Unable to load the real plugin libavutil.so.49: cannot open shared object file: No such file or directory
java version "1.7.0_45"
OpenJDK Runtime Environment (IcedTea 2.4.3) (ArchLinux build 7.u45_2.4.3-1-x86_64)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)
Traceback (most recent call last):
  File "/usr/share/ppub/dialogs.py", line 41, in respond
    self.activate(widget, data)
  File "/usr/share/ppub/ppub.py", line 607, in open_book
    self.load_book(filename)
  File "/usr/share/ppub/ppub.py", line 401, in load_book
    if self.provider.prepare_book(filename) == True: #If book is ready
  File "/usr/share/ppub/contentprovider.py", line 49, in prepare_book
    for x in metadata.manifest.item:
AttributeError: 'NoneType' object has no attribute 'item'

Use random path in /tmp

Hi,

It seems that pPub always uses "/tmp/ppub-cache/" as path for uncompressing the .epub.

This is not good as several users may want use the application at the same time.

Please use a random path (maybe with the user name in the path).

Could also be good the restrict the permission of the directory to 700 and to delete it when pPub exits

Segfault when importing books

Traceback (most recent call last):
File "/usr/share/ppub/ppub.py", line 633, in open_book
self.load_book(filename)
File "/usr/share/ppub/ppub.py", line 406, in load_book
if self.provider.prepare_book(filename) == True: #If book is ready
File "/usr/share/ppub/contentprovider.py", line 49, in prepare_book
for x in metadata.manifest.item:
AttributeError: 'NoneType' object has no attribute 'item'
/usr/bin/ppub: line 2: 15823 Segmentation fault (core dumped) /usr/bin/python2 /usr/share/ppub/ppub.py "$@"

Custom themes

Is there a way to provide custom themes? Like CSS files in ~/.config/ppub/themes ?
Btw, great project. It's very light on system resources, and minimalistic. I like it ;)

Themes not being loaded

Placed themes in ~/.ppub and have set "usercss = /home/x/.ppub" (also tried trailing '/').

When going into "View > Styles", I can see that "User" has been changed from grey to black, which suggests that it is finding the directory. There is however no list of user themes, which the README.md states. The CSS files should work, as they are duplicates (with color changes) of dark.css supplied.

Any ideas?

AttributeError: 'gobject.GProps' object has no attribute 'enable_webgl'

Hi,

Just installing today (20111031) on my Slackware/Salix system, I got this error when trying to launch it.

fredg[~]$ ppub
Traceback (most recent call last):
File "/usr/bin/ppub", line 677, in
main = MainWindow()
File "/usr/bin/ppub", line 253, in init
self.viewer = Viewer()
File "/usr/bin/ppub", line 467, in init
settings.props.enable_webgl = False
AttributeError: 'gobject.GProps' object has no attribute 'enable_webgl'

Deps installed: pygtk, pywekbitgtk, infozip

++

1.1 release

Could you make a v1.1 tag ? It's more easy for package management.

Thanks.

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.