GithubHelp home page GithubHelp logo

basiomeuspuga / lector Goto Github PK

View Code? Open in Web Editor NEW
1.5K 1.5K 203.0 2.03 MB

Qt based ebook reader

License: GNU General Public License v3.0

Python 99.88% HTML 0.04% QMake 0.08%
comic-reader comics crossplatform djvu ebook ebook-reader epub mobi python qt reader

lector's People

Contributors

atmaxinger avatar audreytoskin avatar basiomeuspuga avatar chengchun-ni avatar dependabot[bot] avatar dmitrypetukhovakvelon avatar ducksoft avatar eclipseo avatar elisamalzoni avatar guoyunhe avatar gushka avatar j053fabi0 avatar jaccsr avatar psikoz avatar rachtsingh avatar solaraquarion avatar sorairolake avatar szymonpk avatar timgates42 avatar undu 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lector's Issues

crash: toFillPolygon() not enough arguments

trying to launch it I get a crash.

python 3.6.3
pyqt 5.7

I haven't used QPainterPath() so not an expert, but looking at the code on that line:
mask = QtGui.QRegion(self.path.toFillPolygon().toPolygon())

toFillPolygon indeed doesn't have any arguments passed to it?

here's the error:

Traceback (most recent call last):
File "lector/main.py", line 1206, in
main()
File "lector/main.py", line 1199, in main
form = MainUI()
File "lector/main.py", line 87, in init
self.metadataDialog = MetadataUI(self)
File "/home/basse/src/Lector/lector/metadatadialog.py", line 42, in init
mask = QtGui.QRegion(self.path.toFillPolygon().toPolygon())
TypeError: toFillPolygon(self, QTransform): not enough arguments

installation on trueOS

Hi i have this error when i launch the Lector.
I am using TrueOS 18.04 stable

Traceback (most recent call last):
File "/usr/local/bin/lector", line 11, in
load_entry_point('lector==0.3.3', 'gui_scripts', 'lector')()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 572, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2755, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2408, in load
return self.resolve()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2414, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/local/lib/python2.7/site-packages/lector/main.py", line 386
f'{ebooks_string} ({self.available_parsers})')
^
SyntaxError: invalid syntax

module os has no attribute uname

Hello!

Python 3.6.5 on Windows 8.1:

C:\Dev\pyenv\Scripts\python.exe lector\__main__.py
Traceback (most recent call last):
  File "lector\__main__.py", line 35, in <module>
    from lector import sorter
  File "C:\Dev\pyenv\lib\site-packages\lector\sorter.py", line 42, in <module>
    if os.uname().sysname == 'Windows':
AttributeError: module 'os' has no attribute 'uname'

According uname documentation, os.uname is only availiable on Unix systems.

Please fix this.

Best regards,
Andrey.

RecursionError: maximum recursion depth exceeded

Hi,

I am trying to build an RPM package. But when building the package, I got this message:

[    9s]   File "/home/abuild/rpmbuild/BUILD/Lector-0.3.1/lector/KindleUnpack/kindleunpack.py", line 183, in <module>
[    9s]     from .unpack_structure import fileNames
[    9s]   File "/home/abuild/rpmbuild/BUILD/Lector-0.3.1/lector/KindleUnpack/unpack_structure.py", line 23, in <module>
[    9s]     from .mobi_utils import mangle_fonts
[    9s]   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
[    9s]   File "<frozen importlib._bootstrap>", line 951, in _find_and_load_unlocked
[    9s]   File "<frozen importlib._bootstrap>", line 894, in _find_spec
[    9s]   File "<frozen importlib._bootstrap_external>", line 1157, in find_spec
[    9s]   File "<frozen importlib._bootstrap_external>", line 1129, in _get_spec
[    9s]   File "<frozen importlib._bootstrap_external>", line 1273, in find_spec
[    9s]   File "<frozen importlib._bootstrap_external>", line 1231, in _get_spec
[    9s]   File "<frozen importlib._bootstrap_external>", line 556, in spec_from_file_location
[    9s] RecursionError: maximum recursion depth exceeded
[   10s] error: Bad exit status from /var/tmp/rpm-tmp.hWB5yf (%check)

Is here anything wrong with my configuration or I need to modify the code?

Trying to run, get the following.

Traceback (most recent call last): File "./__main__.py", line 24, in <module> import sorter File "/home/tim/zaapps/Lector-dev/sorter.py", line 49, in <module> from parsers.epub import ParseEPUB File "/home/tim/zaapps/Lector-dev/parsers/epub.py", line 22, in <module> from ePub.read_epub import EPUB File "/home/tim/zaapps/Lector-dev/ePub/read_epub.py", line 24, in <module> from bs4 import BeautifulSoup ModuleNotFoundError: No module named 'bs4'

Exception trhown at the end of scan library

I'm getting an exception thrown at the end of scan library. Here is the stacktrace:

Available parsers: *.pdf *.epub *.mobi *.azw *.azw3 *.azw4 *.prc *.cbz *.cbr
Database returned nothing
357 books found
No cover found for: /home/ryogi/drive/Books/Literature/Cassandra Clare/The Infernal Devices/Book 1 - Clockwork Angel by Cassandra Clare.epub
"Error: Non conformant codestream TPsot==TNsot.<0a>"
"Error: Non conformant codestream TPsot==TNsot.<0a>"
Corrupt JPEG data: 310222 extraneous bytes before marker 0xd9
Exception in thread Thread-10:
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "/usr/lib/python3.6/site-packages/lector/sorter.py", line 168, in read_book
    book_ref.read_book()
  File "/usr/lib/python3.6/site-packages/parsers/epub.py", line 36, in read_book
    contents_found = self.book_ref.read_epub()
  File "/usr/lib/python3.6/site-packages/ePub/read_epub.py", line 38, in read_epub
    None, True)
  File "/usr/lib/python3.6/site-packages/ePub/read_epub.py", line 79, in get_file_path
    return root_item.get('full-path')
AttributeError: 'NoneType' object has no attribute 'get'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.6/site-packages/lector/sorter.py", line 259, in pool_creator
    self.read_book, self.file_list)
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 266, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 644, in get
    raise self._value
AttributeError: 'NoneType' object has no attribute 'get'

Finished processing in 35.2248158454895

I'm not sure exactly what book caused the issue, Is there an option to increase the ammount of verbosity?

Regards.

SheBang in including scripts

When packaging RPM, I found some warnings related to SheBang:

[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/__init__.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/compatibility_utils.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/kindleunpack.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/mobi_cover.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/mobi_dict.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/mobi_header.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/mobi_html.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/mobi_index.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/mobi_k8proc.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/mobi_k8resc.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/mobi_nav.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/mobi_ncx.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/mobi_opf.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/mobi_pagemap.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/mobi_sectioner.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/mobi_split.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/mobi_uncompress.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/mobi_utils.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/mobiml2xhtml.py 644 /usr/bin/python 
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/unipath.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/KindleUnpack/unpack_structure.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/__main__.py 644 /usr/bin/env python3
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/database.py 644 /usr/bin/env python3
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/definitionsdialog.py 644 /usr/bin/env python3
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/delegates.py 644 /usr/bin/env python3
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/ePub/read_epub.py 644 /usr/bin/env python3
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/library.py 644 /usr/bin/env python3
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/metadatadialog.py 644 /usr/bin/env python3
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/models.py 644 /usr/bin/env python3
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/parsers/comicbooks.py 644 /usr/bin/env python3
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/parsers/epub.py 644 /usr/bin/env python3
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/parsers/mobi.py 644 /usr/bin/env python3
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/parsers/pdf.py 644 /usr/bin/env python3
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/rarfile/dumprar.py 644 /usr/bin/env python
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/settings.py 644 /usr/bin/env python3
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/settingsdialog.py 644 /usr/bin/env python3
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/sorter.py 644 /usr/bin/env python3
[    9s] lector.noarch: W: non-executable-script /usr/lib/python3.6/site-packages/lector/threaded.py 644 /usr/bin/env python3
[    9s] This text file contains a shebang or is located in a path dedicated for
[    9s] executables, but lacks the executable bits and cannot thus be executed.  If
[    9s] the file is meant to be an executable script, add the executable bits,
[    9s] otherwise remove the shebang or move the file elsewhere.

From this StackOverflow post https://stackoverflow.com/a/19305076/4699409

The shebang line in any script determines the script's ability to be executed like an standalone executable without typing python beforehand in the terminal or when double clicking it in a file manager (when configured properly).

So maybe it is not very necessary to add SheBang to files that won't be executed directly but only be included. If SheBang is needed, then it requires executable bits, too.

Add Epub Book Error

Database returned no paths for settings...
Available parsers: *.epub *.mobi *.azw *.azw3 *.azw4 *.prc *.cbz *.cbr
Database returned nothing
Exception in thread Thread-1:
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/user/Lector-dev/sorter.py", line 165, in read_book
book_ref.read_book()
File "/user/Lector-dev/parsers/epub.py", line 37, in read_book
contents_found = self.book_ref.read_epub()
File "/user/Lector-dev/ePub/read_epub.py", line 43, in read_epub
self.generate_book_metadata(contents_path)
File "/user/Lector-dev/ePub/read_epub.py", line 129, in generate_book_metadata
self.book['year'] = int(self.book['year'][:4])
ValueError: invalid literal for int() with base 10: '[c19'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/user/Lector-dev/sorter.py", line 253, in pool_creator
self.read_book, self.file_list)
File "/usr/lib/python3.6/multiprocessing/pool.py", line 266, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/usr/lib/python3.6/multiprocessing/pool.py", line 644, in get
raise self._value
ValueError: invalid literal for int() with base 10: '[c19'

Finished processing in 0.06375956535339355

Crash on application exit.

Upon closing Lector, the following appears on the cli, which indicates that the application crashed on exit.
=============command line output===============
Saving settings...
Exception in thread Thread-11:
Traceback (most recent call last):
File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib64/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3.6/site-packages/lector/sorter.py", line 250, in read_progress
processed_file = self.queue.get()
File "", line 2, in get
File "/usr/lib64/python3.6/multiprocessing/managers.py", line 757, in _callmethod
kind, result = conn.recv()
File "/usr/lib64/python3.6/multiprocessing/connection.py", line 250, in recv
buf = self._recv_bytes()
File "/usr/lib64/python3.6/multiprocessing/connection.py", line 407, in _recv_bytes
buf = self._recv(4)
File "/usr/lib64/python3.6/multiprocessing/connection.py", line 383, in _recv
raise EOFError
EOFError

Fatal Python error: could not acquire lock for <_io.BufferedWriter name=''> at interpreter shutdown, possibly due to daemon threads

Thread 0x00007fcb15bd6700 (most recent call first):
File "/usr/lib64/python3.6/threading.py", line 926 in _bootstrap_inner
File "/usr/lib64/python3.6/threading.py", line 884 in _bootstrap

Current thread 0x00007fcb615a5540 (most recent call first):
Aborted (core dumped)

Tab width is to large on books with long titles

Currently, each tab in the application view is as large as the title of that book. It will be nice to set a maximum tab width on the interface and append a ... to the title so that more books can be navigated easily.

Can't add books to library

When trying to add a book to my library, I get the following error:

Database returned no paths for settings...
Available parsers: *.pdf *.epub *.mobi *.azw *.azw3 *.azw4 *.prc *.cbz *.cbr
Database returned nothing
Finished processing in 0.17900586128234863
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/lector/models.py", line 91, in headerData
    return self.header_data[column]
IndexError: list index out of range
zsh: abort (core dumped)  lector

This seems to happen most of the time. There have been a couple of times that I managed to actually add books, but they didn't appear even though the library didn't throw an error. Happy to try and debug it.

Pyqt5 error

I installed the application from the aur into my desktop. When I launch it gives me this error:
pkg_resources.DistributionNotFound:The 'PyQt5>=5.10.1' distribution was not found and is required by lector
However, I have this package installed already:
sudo pacman -Ss pyqt5
extra/pyqt5-common 5.10.1-1 [installed]
Common PyQt files shared between python-pyqt5 and python2-pyqt5
extra/python-pyqt5 5.10.1-1 [installed]
A set of Python 3.x bindings for the Qt5 toolkit

Sort By "Last Read" only show read books

I don't know if this could be a bug, but if all the options in "sort by" drop down show all the books except the option "Last read", I don't know if this could confusing because only shows read books and not the unread.

Features request:
If I sort it by "Last read" would be nice to show the last read date.
Also in the "table" view doesn't show the "Last read" column for sorting.

[Feature Request] UI improvement.

I like the idea to use icons for functions that are less frequently used, which makes the UI simple and symmetric. So, I make minor modification to the UI with prototype tools. This link shows the dynamic interaction.

2_ copy

Not starting

$ python3.6 __main__.py 
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user'
Database returned no paths for settings...
Traceback (most recent call last):
  File "__main__.py", line 1197, in <module>
    main()
  File "__main__.py", line 1190, in main
    form = MainUI()
  File "__main__.py", line 76, in __init__
    self.metadataDialog = MetadataUI(self)
  File "/home/user/Lector/metadatadialog.py", line 41, in __init__
    mask = QtGui.QRegion(path.toFillPolygon().toPolygon())
TypeError: toFillPolygon(self, QTransform): not enough arguments

PyQt5 5.8.2

Support for PDF

are you adding more supoort for orther file types like pdf ?

Cannot build from git

When running a build from source with python3.6 setup.py build I am getting:

$ python3.6 setup.py build
running build
running build_py
running egg_info
writing lector.egg-info/PKG-INFO
writing dependency_links to lector.egg-info/dependency_links.txt
writing entry points to lector.egg-info/entry_points.txt
writing requirements to lector.egg-info/requires.txt
writing top-level names to lector.egg-info/top_level.txt
writing manifest file 'lector.egg-info/SOURCES.txt'
error: can't copy 'lector/KindleUnpack': doesn't exist or not a regular file

Strangely enough, it works fine for the source code for v0.4 downloaded from releases page and those differ only by 1 commit.

Internationalization

Iโ€™d love to share this application with my friends, but there appears to be no support for internationalization. Could this be added eventually?

SyntaxError: invalid syntax

python __main__.py

  File "__main__.py", line 387
    f'{ebooks_string} ({self.available_parsers})')
                                                ^
SyntaxError: invalid syntax

Thanks for creating this project!

In 2018, the choices for desktop app creation seem to be...Electron. Thanks for using Qt and thanks just for creating a cool free/open source software project. Wanted to get some thanks in before you're hit with a ferocious list of real issues ;)

TypeError: toFillPolygon(self, QTransform): not enough arguments with pyqt 5.7

On Xubuntu 17.10, I installed dependencies with

sudo apt install python3-pyqt5.qtmultimedia
(which deps on python3-pyqt5), and got:

$ lector/__main__.py 
python-poppler-qt5 is not installed. Pdf files will not work.
Locale: nn_NO (No translations found)
Database: No paths for settings...
Traceback (most recent call last):
  File "lector/__main__.py", line 986, in <module>
    main()
  File "lector/__main__.py", line 979, in main
    form = MainUI()
  File "lector/__main__.py", line 105, in __init__
    self.metadataDialog = MetadataUI(self)
  File "/home/kiwibird/src/Lector/lector/metadatadialog.py", line 39, in __init__
    mask = QtGui.QRegion(path.toFillPolygon().toPolygon())
TypeError: toFillPolygon(self, QTransform): not enough arguments

my versions:

$ dpkg -l '*pyqt5*'|grep ^ii
ii  python3-pyqt5              5.7+dfsg-6   amd64        Python 3 bindings for Qt5
ii  python3-pyqt5.qtmultimedia 5.7+dfsg-6   amd64        Python 3 bindings for Qt5's Multimedia module

on ebc3ef9

Lector ignores epub css styles

Lector does not render epub documents with the document's inbuilt stylesheets. This is somewhat problematic since it results poorly displayed epubs and in-turn reflects poorly on the application. It will be nice if the default rendering of epubs documents simply applies the styles that comes with the document, then custom css is applied on top for things like changing font size, background, etc.

Whereas this problem may also apply to other supported formats such as mobi. I can only confirm issued with epub files.

[Feature Request] Table of Contents Tree View

Currently, the internal table of contents in an epub document can be viewed in a drop down select-style-menu at the top of of the interface when viewing a document. It will be nice to have a Tree style table of contents appear on the side (similar to the bookmarks display pane and okular)

poppler-qt5 again

Hi, I tried a lot, but pdf-support doesn't work. All requirements are installed, I think...
bildschirmfoto_2018-03-18_19-24-03
Any hints for me? Thank you!

Would it be possible to integrate this as a channel/plugin to plex (plex.tv?)

Would it be possible to integrate this as a channel/plugin to plex (plex.tv?)

It would be the perfect thing for my plex server. It manages everything already tv shows/movies/music only ebook/comic support is missing.
Check this link aswell: https://forums.plex.tv/search?adv=&search=Ebook&title=&author=&cat=all&tags=&discussion_d=1&discussion_question=1&discussion_poll=1&comment_c=1&comment_answer=1&within=1+day&date=
Thousands of people would use it if it would be available as a plex plugin

Please let me know if it is possible and what would need to be done to add it to plex

Provide makefile for ubuntu

Please, provide a makefile or .sh script for automating dependency installation in Ubuntu. It's pretty tiring to do it manually

[Feature Request] "Previous" and "Next" buttons

It is nice to have the keyboard bindings for moving back and forward (chapter by chapter/ page by page) but it will help to have previous and next buttons/icons in the GUI perhaps under the book view-port in the middle of the status bar (the same bar where the distraction view toggle is located)

Some suggestions.

  1. Decrease the height of the status bar.
  2. How to manage books? like group, star, etc. I can't find a way to make a priority reading list.
  3. Smooth the mouse scrolling. It's too slow for epub.
  4. Support continual reading mode.
  5. Use filename as title insead of "Unknown".

Cant execute

(Lector-qOw1XMLY) ~/p/Lector> python __main__.py
  File "__main__.py", line 442
    f'eBooks ({self.available_parsers})')
                                       ^
SyntaxError: invalid syntax

Dupilcated keyboard binding behavior for arrow keys in reader view

Currently the key bindings for the arrow keys behave the same in the reader view; that is, "left" and "right" arrow keys behave the same as "up" and "down" arrow keys. It will probably work better if the if the "up" and "down" arrow keys are used for scrolling up and down, while the lef and right keys remain the same as they are now.

Keyboard shortcuts

It's possible to have ctrl + o shortcut to add books?
And up/down keys in the pdf parser?

Thanks for all your work.

TypeError: 'NoneType' object is not iterable

On arch I get the following errors after installing through AUR:

$ lector                                                                                                                                                   
Locale: en_DK (No translations found)
Database returned no paths for settings...
Available parsers: *.pdf *.epub *.mobi *.azw *.azw3 *.azw4 *.prc *.cbz *.cbr
Database returned nothing
Traceback (most recent call last):
  File "/usr/bin/lector", line 11, in <module>
    load_entry_point('lector==0.3.0', 'gui_scripts', 'lector')()
  File "/usr/lib/python3.6/site-packages/lector/__main__.py", line 1260, in main
    form = MainUI()
  File "/usr/lib/python3.6/site-packages/lector/__main__.py", line 226, in __init__
    self.lib_ref.generate_library_tags()
  File "/usr/lib/python3.6/site-packages/lector/library.py", line 259, in generate_library_tags
    i[0]: (None, None) for i in db_library_directories}
TypeError: 'NoneType' object is not iterable

Scanning folder for epubs fails with exceptions.

Summary: Opening Lector and scanning a directory of ebooks results in scanning pool.py and parser.py failure.

==Steps to reproduce:==

  1. Open Lector.
  2. Click on cog wheel icon (settings).
  3. Select path to scan in the "Library" window.
  4. Click "Scan Library"

==Expected Results:==
Books appear in the Library view of Lector

==Actual Results:==
Progress bar displays progress through 100% but nothing appears in library view (even after restart).

==Additional Info:==
The output on the command prompt, which seems to pin-point where the failure occurs is as follows:

Locale: en_US (No translations found)
Icon theme "ubuntu-mono-dark" not found.
Icon theme "gnome" not found.
Database returned no paths for settings...
Available parsers: *.pdf *.epub *.mobi *.azw *.azw3 *.azw4 *.prc *.cbz *.cbr
Database returned nothing
281 books found
libpng warning: iCCP: known incorrect sRGB profile
None not found in NightCircus_epub.v2.epub
QImage::scaled: Image is a null image
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
QImage::scaled: Image is a null image
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
None not found in William Strunk, Jr. The Elements of Style (Updated 2011 Edition) 2011.epub.zip
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Exception in thread Thread-10:
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib64/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/usr/lib64/python3.6/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/usr/lib/python3.6/site-packages/lector/sorter.py", line 202, in read_book
cover_image_raw = book_ref.get_cover_image()
File "/usr/lib/python3.6/site-packages/lector/parsers/pdf.py", line 74, in get_cover_image
cover_image = cover_page.renderToImage(300, 300)
AttributeError: 'NoneType' object has no attribute 'renderToImage'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib64/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3.6/site-packages/lector/sorter.py", line 270, in pool_creator
self.read_book, self.file_list)
File "/usr/lib64/python3.6/multiprocessing/pool.py", line 266, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/usr/lib64/python3.6/multiprocessing/pool.py", line 644, in get
raise self._value
AttributeError: 'NoneType' object has no attribute 'renderToImage'

Finished processing in 14.044128894805908

Error launching Lector on Arch

I have installed lector on arch via trizen -S lector-git
The install was successful, but after running lector in term, I get this error.
Any idea what's wrong?

Traceback (most recent call last):
  File "/usr/bin/lector", line 11, in <module>
    load_entry_point('lector==0.3.2', 'gui_scripts', 'lector')()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 480, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2693, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in load
    return self.resolve()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2330, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3.6/site-packages/lector/__main__.py", line 45, in <module>
    from lector.definitionsdialog import DefinitionsUI
  File "/usr/lib/python3.6/site-packages/lector/definitionsdialog.py", line 22, in <module>
    from PyQt5 import QtWidgets, QtCore, QtGui, QtMultimedia
ImportError: libQt5Multimedia.so.5: cannot open shared object file: No such file or directory

Can't add new epub file

Database returned no paths for settings...
Available parsers: *.epub *.mobi *.azw *.azw3 *.azw4 *.prc *.cbz *.cbr
Database returned nothing
Exception in thread Thread-1:
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "/home/delfino/python/Lector/sorter.py", line 165, in read_book
    book_ref.read_book()
  File "/home/delfino/python/Lector/parsers/epub.py", line 37, in read_book
    contents_found = self.book_ref.read_epub()
  File "/home/delfino/python/Lector/ePub/read_epub.py", line 38, in read_epub
    None, True)
  File "/home/delfino/python/Lector/ePub/read_epub.py", line 74, in get_file_path
    xml = self.parse_xml(container_location, 'xml')
  File "/home/delfino/python/Lector/ePub/read_epub.py", line 63, in parse_xml
    root = BeautifulSoup(this_xml, parser)
  File "/home/delfino/.local/share/virtualenvs/Lector-qOw1XMLY/lib/python3.6/site-packages/bs4/__init__.py", line 165, in __init__
    % ",".join(features))
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: xml. Do you need to install a parser library?
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/delfino/python/Lector/sorter.py", line 253, in pool_creator
    self.read_book, self.file_list)
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 266, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 644, in get
    raise self._value
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: xml. Do you need to install a parser library?

Finished processing in 0.01865553855895996
Saving settings...

Can't open book

There's a book that I've added to my library that lector is not able to open. It gives this error:

Traceback (most recent call last):
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "/usr/lib/python3.6/site-packages/lector/sorter.py", line 210, in read_book
    all_content = book_ref.get_contents()
  File "/usr/lib/python3.6/site-packages/parsers/epub.py", line 63, in get_contents
    self.book_ref.parse_chapters(temp_dir=self.extract_path)
  File "/usr/lib/python3.6/site-packages/ePub/read_epub.py", line 246, in parse_chapters
    chapter_data, self.book['split_chapters'][i])
  File "/usr/lib/python3.6/site-packages/ePub/read_epub.py", line 317, in get_split_content
    xml_string = this_split[1]
IndexError: list index out of range
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.6/site-packages/lector/sorter.py", line 268, in pool_creator
    self.read_book, self.file_list)
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 266, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 644, in get
    raise self._value
IndexError: list index out of range

Lector not able to locate PyQt5 dependencies

When I run main.py :

Traceback (most recent call last):
  File "__main__.py", line 32, in <module>
    from PyQt5 import QtWidgets, QtGui, QtCore
ModuleNotFoundError: No module named 'PyQt5'

When I again try to install PyQt5 -

sudo apt-get install python-pyqt5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-pyqt5 is already the newest version (5.5.1+dfsg-3ubuntu4).
The following packages were automatically installed and are no longer required:
  linux-headers-4.13.0-37 linux-headers-4.13.0-37-generic
  linux-headers-4.13.0-38 linux-headers-4.13.0-38-generic
  linux-headers-4.4.0-119 linux-headers-4.4.0-119-generic
  linux-headers-4.4.0-121 linux-headers-4.4.0-121-generic
  linux-headers-4.4.0-122 linux-headers-4.4.0-122-generic
  linux-image-4.13.0-37-generic linux-image-4.13.0-38-generic
  linux-image-extra-4.13.0-37-generic linux-image-extra-4.13.0-38-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

I'm having trouble installing lector. At the third step of README.md

TypeError: 'NoneType' object is not iterable

From either build and install or running main.py, getting this error. Pretty sure all dependencies are met. Do I need to set a path to my ebooks before opening the app?

Locale: en_US (No translations found)
Database returned no paths for settings...
Available parsers: *.pdf *.epub *.mobi *.azw *.azw3 *.azw4 *.prc *.cbz *.cbr
Database returned nothing
Traceback (most recent call last):
File "/usr/local/bin/lector", line 11, in
load_entry_point('lector==0.2.1', 'gui_scripts', 'lector')()
File "/usr/local/lib/python3.6/dist-packages/lector-0.2.1-py3.6.egg/lector/main.py", line 1256, in main
form = MainUI()
File "/usr/local/lib/python3.6/dist-packages/lector-0.2.1-py3.6.egg/lector/main.py", line 222, in init
self.lib_ref.generate_library_tags()
File "/usr/local/lib/python3.6/dist-packages/lector-0.2.1-py3.6.egg/lector/library.py", line 260, in generate_library_tags
i[0]: (None, None) for i in db_library_directories}
TypeError: 'NoneType' object is not iterable

Using the search bar doesn't seem to work

With the latest git version installed via the AUR package on Manjaro Linux, I have an issue that I can reproduce with the following steps:

  1. Open an epub book, such as A Byte of Python.
  2. Type the word "Python" into the search bar, hit Enter.
  3. Nothing happens, even when I'm on a page/chapter that contains the word "Python".

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.