thgeorgiou / ppub Goto Github PK
View Code? Open in Web Editor NEWA simple epub reader written using python, gtk3 and webkit.
License: GNU General Public License v2.0
A simple epub reader written using python, gtk3 and webkit.
License: GNU General Public License v2.0
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:
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 ... :-(
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
++
Could you make a v1.1 tag ? It's more easy for package management.
Thanks.
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 ;)
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'
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 "$@"
Traceback (most recent call last):
File "ppub.py", line 489, in open_book
self.window.set_title(str(self.provider.book_name)+" by "+str(self.provider.book_author))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)
Ppub is a great tool to simply read and epub file without the heavy ennoying library management as with calibra
it's sad that the 1.2 version from kstopa was not commited
as asked by sakisd here is an exemple of file not openng in ppub with only an empty page
https://github.com/Sigil-Ebook/Sigil/raw/master/docs/Sigil_User_Guide.epub
This project[0] just came up into my knowledge[1]. Do you think it would be good to utilize ebooklib using pPub?
[0] https://github.com/aerkalov/ebooklib
[1] mate-desktop/atril#13 (comment)
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
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
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?
At least on xfce (xubuntu?), the Ctrl++ and Ctrl+- hotkeys do not work for zooming the text, while these controls work on other programs (for example, Firefox).
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.