Giter Site home page Giter Site logo

ebook-viewer's People

Contributors

cmplstofb avatar ddska avatar giovanism avatar michaldaniel avatar mrproghammer avatar rafaelmardojai avatar trinaldi avatar vonalenberg avatar xerxes2 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  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

ebook-viewer's Issues

Formating

Hi, don't normally use git hub much so I hope I'm not abusing the purpose posting here.

I like the, simple, clean, visually appealing reader you've created. Thank you. I know you plan on creating formating controls like variable font options.

I wanted to suggest, as it seems to be an oversight in many other desktop based readers, variable margins. So that at full screen/maximised you don't have to scan the full screen width each line.

I'm sure you've already considered it.

I thought if I made changes to the CSS file it would effect the changes i'd like for me but when i alter it nothing seems to happen.

Handle opening passed files

The app is great and I wish I could set it as a default app to open epub, however, it doesn't work - the app opens when I double click an epub file in Nautilus but the file is not loaded.

As mentioned in #5.

"Importing is unavailable" message can't be dismissed

When clicking the "Import book" menu item, an error message pops up ("Importing is unavailable - Importing requires Calibre eBook reader to be installed."). This dialog window can't be dismissed - when I click "OK", the main window is not dimmed any more, but the dialog stays open.

System information: Arch Linux, installed ebook-viewer package a few minutes ago using the PKGBUILD from #10. gtk3 package version 3.22.4-1.

Easy install & uninstall script?

wouldn't it be convenient if this package would be available in a repository so it would be easily installed and uninstalled?

Thankyou,
Jigar Wala

Internationalization support

Currently, this application can’t be translated. Please consider using a framework like Gettext so that translators can provide localized UI files in the future :)

Can someone help me with installation?

Beginner Python programmer, don't have the skills/knowledge to follow the install instructions. Any help much appreciated. Specifically:

Installing
Requires: gir1.2-webkit-3.0, libwebkitgtk-3.0-0, gir1.2-gtk-3.0, python3-gi (PyGObject for Python 3)
Questions:
Where do I find these?
How do I install them in my system (e.g. with pip? other method?)

Download or clone this repository then run in project directory:
sudo make install

Questions:
How do I "download this repository" from github?
What is meant by "in project directory"? How do I get to the project directory to run sudo make install?

Thanks again for any advice.

Can only view images, not text

I tried with several epubs, but none is opened correctly. I see a black background, with only images showing correctly (all spaced like the text was really there, just I cannot see it). No errors are displayed.
You can try for example this Open epub from project gutenberg: http://www.gutenberg.org/ebooks/53979 (ebook with images).

I'm on archlinux, using this pkgbuild: https://aur.archlinux.org/packages/ebook-viewer-git/

Python 3.6
Webkit 2.4.11
Gobject introspection 1.50.0+1+gb8d92b0

Please tell me if more info are needed

Dark theme issue

Hi,

nice app :)
here is a little issue with highlighting running under gnome3:

bildschirmfoto von 2016-10-18 19-55-37

Wrong application_id in main.py

Bug:
While creating a window and working, current build throws
GLib-GIO-CRITICAL **: g_application_set_application_id: assertion 'application_id == NULL || g_application_id_is_valid (application_id)' failed

Proposed solution:
Change [main.py:27] application_id="easy-ebook-viewer"to application_id="linux.easy-ebook-viewer"

or whatever, as long as the ID contains two (2) parts separated by a dot.
https://developer.gnome.org/gio/stable/GApplication.html#g-application-id-is-valid

Messed up iumping navigation

So I won't forget this tomorrow: if you jump from first to last page both left and right arrows stay inactive.

Error opening book without author name metadata

Hi, sorry for bothering you with another issue. This time, by taking a quick look at traceback, seems to be related with the book not having the authors name. When trying to open this book from the file manager the program window doesn't appear, and when trying to open using the "Please choose a file" dialog nothing from the book would show up. In the terminal I got this error:

Traceback (most recent call last): File "/usr/share/easy-ebook-viewer/components/header_bar.py", line 229, in __on_open_clicked self.__window.load_book_data(filename) File "/usr/share/easy-ebook-viewer/main_window.py", line 331, in load_book_data self.__continiue_book_loading(filename) File "/usr/share/easy-ebook-viewer/main_window.py", line 279, in __continiue_book_loading if self.content_provider.prepare_book(filename): File "/usr/share/easy-ebook-viewer/workers/content_provider.py", line 89, in prepare_book self.book_name = str(bytes.decode(str(metadata.metadata.dc_title).encode("utf-8"))) AttributeError: 'NoneType' object has no attribute 'dc_title'

If you want, I can send the ebook for you have a better look at it.

Several e-books cannot be opened

I tried opening several ePub books, with limited success. Some can be displayed just fine while others cannot (the main window remains empty, with no content). Calibre can open them instead. Unfortunately I cannot share those e-books publicly, but I'm happy to send them to you in private (e-mail?) if you want.

Mark repo as archive

Hi! I got a reference to your e-book viewer from a post on instagram. I see that your repo is unfortunately not being maintained anymore. Could you mark it as archive to to limit confusion?:)

Best regards

Ebook bad ordering

I have an ebook that when opened with ebook-viewer ends with files in the wrong order.

You can test it with this epub I created in sigil.

Change the extension to .epub: test.txt

Edit: In the meantime, I did this change using "spine". It works for me™.

diff --git a/src/workers/content_provider.py b/src/workers/content_provider.py
index 691c93b..0fc91b7 100644
--- a/src/workers/content_provider.py
+++ b/src/workers/content_provider.py
@@ -198,11 +198,17 @@ class ContentProvider:
         ncx_file_path = self.__get_ncx_file_path
         metadata = self.__get_metadata
         __files = []
+        __files_id = []
         self.chapter_links = []
         chapter_order = []
         for x in metadata.manifest.item:
             if x.media_type == "application/xhtml+xml":
                 __files.append(x.href)
+                __files_id.append(x.id)
+
+        spine_ids = []
+        for x in metadata.spine.itemref:
+            spine_ids.append(x.idref)
 
         self.titles = []
         if os.access(ncx_file_path, os.R_OK):  # Checks if NCX is accessible
@@ -247,14 +253,12 @@ class ContentProvider:
             for i in range(len(self.titles)):
                 self.titles[i] = [self.titles[i], self.chapter_links[i]]
 
-            # If not all all files are chaptered append them
-            # chater_number = 1;
-            if len(__files) > len(self.chapter_links):
-                for i in range(len(__files)):
-                    if __files[i] not in self.chapter_links:
-                        self.chapter_links.insert(i, __files[i])
-                        # self.titles.insert(i, "Unnamed chapter" + " (" + str(chater_number) + ")")
-                        # chater_number += 1;
+            # Rebuild chapter_links
+            self.chapter_links = []
+            if len(spine_ids) > len(self.chapter_links):
+                for i in range(len(spine_ids)):
+                    if spine_ids[i] in __files_id:
+                        self.chapter_links.append(__files[__files_id.index(spine_ids[i])])
 
             # Print some debug
             print("Files: " + str(__files))

WebKit2?

G'day Michal,

For your interest, I'm maintaining another viewer, the Read activity at Sugar Labs, which is bundled on the One Laptop per Child laptops. Our viewer like yours is Python GTK+ and uses WebKit to render EPUB files, and also uses Evince to render PDF files. See User Manual.

We're faced with the impending doom of obsolescence of the WebKit 3.0 API. Are you planning a port to WebKit2 4.0 API?

Just wanted to say thank you

I just wanted to say thank you but there was no other option to do so. That was one thing I missed from Windows - a decent epub reader, the other VirtualDub. The app is great and I wish I could set it as a default app to open epub, however, it doesn't work - the app opens when I double click an epub file in Nautilus but the file is not loaded. Anyway, thank you and keep up the good work!

Issue missing 'Webkit' on Fedora 25

Hi,

can you take a look?

gino@gino-xps13:/tmp$ easy-ebook-viewer 
Traceback (most recent call last):
  File "/usr/share/easy-ebook-viewer/main.py", line 20, in <module>
    from main_window import MainWindow
  File "/usr/share/easy-ebook-viewer/main_window.py", line 21, in <module>
    from components import header_bar, viewer, chapters_list
  File "/usr/share/easy-ebook-viewer/components/viewer.py", line 19, in <module>
    gi.require_version('WebKit', '3.0')
  File "/usr/lib64/python3.5/site-packages/gi/__init__.py", line 118, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace WebKit not available

Best regards
Gino

Header bar icon inconsistency (use symbolic icons)

For the GUI to have a consistent look across different icon themes, you should stick with either the symbolic icon set (as is recommended for GNOME applications) or the regular icon set.

In header-bar.py for instance, it seems that you're using (perhaps unintentionally) a mix of symbolic and regular icons.

I would recommend changing the header-bar to use only symbolic icons. Problematic lines include:

 49        document_open_image = Gtk.Image.new_from_icon_name("document-open", Gtk.IconSize.LARGE_TOOLBAR)`
139        document_properties_image = Gtk.Image.new_from_icon_name("open-menu", Gtk.IconSize.LARGE_TOOLBAR)`

Simply append -symbolic to each icon name listed above to resolve the issue.

Namespace WebKit not available in Ubuntu 19.04

I have a fresh install of Ubuntu 19.04 and once installed all dependencies this error is raised on every launch:

easy-ebook-viewer 
Traceback (most recent call last):
  File "/usr/share/easy-ebook-viewer/main.py", line 21, in <module>
    from main_window import MainWindow
  File "/usr/share/easy-ebook-viewer/main_window.py", line 21, in <module>
    from components import header_bar, viewer, chapters_list
  File "/usr/share/easy-ebook-viewer/components/viewer.py", line 19, in <module>
    gi.require_version('WebKit', '3.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 129, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace WebKit not available

Index with chapters

It would be cool to be able to show the index of a book (list of chapters).

Library Feature

It would be nice to set a particular directory to be scanned and viewed as the library. This would enable the following features:

  • show books as a list
  • show books as previews/thumbnails
  • show books currently being read.
  • show favorite books.

I'll do my best to work on this feature and push it.

Can't change pages with two simultaneous windows open

How to reproduce:

  1. Open first .epub file (the file is stored in NTFS Windows 7 drive). So far navigation using arrow keys (left and right for previous/next page) works.
  2. Open different .epub file (again stored in NTFS drive in my case).
  3. Switch focus to the first window. Its navigation using keys no longer works, but in the second window it's working properly.

Ubuntu 16.04 x64.

Terminal output from the broken window:
Chapter count: 201
Loaded: /tmp/easy-ebook-viewer-cache-user/index_split_000_split_048.html
Loaded: /tmp/easy-ebook-viewer-cache-user/index_split_000_split_048.html
Loaded: /tmp/easy-ebook-viewer-cache-user/index_split_000_split_049.html
Loaded: /tmp/easy-ebook-viewer-cache-user/index_split_000_split_048.html
Could not read: /tmp/easy-ebook-viewer-cache-user/index_split_000_split_049.html
Could not read: /tmp/easy-ebook-viewer-cache-user/index_split_000_split_048.html
Could not read: /tmp/easy-ebook-viewer-cache-user/index_split_000_split_049.html
Could not read: /tmp/easy-ebook-viewer-cache-user/index_split_000_split_050.html
Could not read: /tmp/easy-ebook-viewer-cache-user/index_split_000_split_051.html

Debugging:

  • The reason why it can't read the files above is they don't exist, because the content of
    /tmp/easy-ebook-viewer-cache-user is overwritten by loading another book in separate window. Proposed solution: don't create temp files in root, but add separate directory for each book.
  • It seems to me the app deletes content of /tmp/easy-ebook-viewer-cache-user on startup. So it should delete it only if there isn't any process of this app currently running (eg. from terminal or directly launched from icon), as there might be another window open and we can't delete its /tmp/ cache.

Note:

  • I love this software especially in the dark theme. It's so lightweight and cool. Only feature I miss is search.

Application fails opening eBook

The application (version 1.0-g09995b1) fails opening this eBook:

user@box ~ $ easy-ebook-viewer VMware-por-vExperts-libro.epub 

(main.py:28993): GLib-GIO-CRITICAL **: g_application_set_application_id: assertion 'application_id == NULL || g_application_id_is_valid (application_id)' failed
Displaying blank page.
Traceback (most recent call last):
  File "/home/diego/Projects/Ebook-Viewer/src/main.py", line 54, in do_activate
    self.window = MainWindow(file_path=self.file_path)
  File "/home/diego/Projects/Ebook-Viewer/src/main_window.py", line 113, in __init__
    self.load_book_data(sys.argv[1])
  File "/home/diego/Projects/Ebook-Viewer/src/main_window.py", line 327, in load_book_data
    self.__continiue_book_loading(filename)
  File "/home/diego/Projects/Ebook-Viewer/src/main_window.py", line 275, in __continiue_book_loading
    if self.content_provider.prepare_book(filename):
  File "/home/diego/Projects/Ebook-Viewer/src/workers/content_provider.py", line 123, in prepare_book
    self.__load_titles_and_files()
  File "/home/diego/Projects/Ebook-Viewer/src/workers/content_provider.py", line 208, in __load_titles_and_files
    if os.access(ncx_file_path, os.R_OK):  # Checks if NCX is accessible
TypeError: access: can't specify None for path argument

Are there any keyboard shortcuts ?

I've just installed easy-ebook-viewer and I'm really happy with it. I had been looking for an epub viewer for a long time, and couldn't find one that just showed the text + index, quickly and well, the way that EEV does. I wonder if there are any keyboard shortcuts, particularly to toggle showing/hiding the index ?

EDIT 1: The only shortcut I've discovered is which jumps to the next page. I couldn't find how to scroll one line down or up, or just scroll a screenful.

Not working in Linux Mint 17.3

Hi, I have all the 3 dependencies and used the sudo make install but I couldn't get it to run. Opening as a default app in a epub file doesn't even show the program window and using it in terminal gave me this error below. Any known issues with Linux Mint or Ubuntu 14.04?

Traceback (most recent call last): File "/usr/share/easy-ebook-viewer/main.py", line 28, in <module> win = MainWindow() File "/usr/share/easy-ebook-viewer/main_window.py", line 59, in __init__ self.header_bar_component = header_bar.HeaderBarComponent(self) File "/usr/share/easy-ebook-viewer/components/header_bar.py", line 38, in __init__ self.__populate_headerbar() File "/usr/share/easy-ebook-viewer/components/header_bar.py", line 61, in __populate_headerbar self.current_page_entry.set_max_width_chars(3) AttributeError: 'Entry' object has no attribute 'set_max_width_chars'

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.