Skip to content

Commit

Permalink
Application icon and .desktop file
Browse files Browse the repository at this point in the history
Rearrange modules because of single-version-externally-managed
  • Loading branch information
BasioMeusPuga committed Mar 22, 2018
1 parent 42b6558 commit 7931f92
Show file tree
Hide file tree
Showing 139 changed files with 6,975 additions and 6,614 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 5 additions & 1 deletion lector/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,18 @@
from lector.metadatadialog import MetadataUI
from lector.definitionsdialog import DefinitionsUI

from resources import mainwindow, resources
from lector.resources import mainwindow, resources


class MainUI(QtWidgets.QMainWindow, mainwindow.Ui_MainWindow):
def __init__(self):
super(MainUI, self).__init__()
self.setupUi(self)

# Set window icon
self.setWindowIcon(
QtGui.QIcon(':/images/Lector.png'))

# Central Widget - Make borders disappear
self.centralWidget().layout().setContentsMargins(0, 0, 0, 0)
self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
Expand Down
3 changes: 1 addition & 2 deletions lector/definitionsdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@

import requests
from PyQt5 import QtWidgets, QtCore, QtGui, QtMultimedia

from resources import definitions
from lector.resources import definitions


class DefinitionsUI(QtWidgets.QDialog, definitions.Ui_Dialog):
Expand Down
2 changes: 1 addition & 1 deletion lector/delegates.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from PyQt5 import QtWidgets, QtGui, QtCore
from resources import pie_chart
from lector.resources import pie_chart


class LibraryDelegate(QtWidgets.QStyledItemDelegate):
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion lector/guifunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from PyQt5 import QtGui
from resources import resources
from lector.resources import resources


class QImageFactory:
Expand Down
1 change: 0 additions & 1 deletion lector/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import pickle
import pathlib
from PyQt5 import QtGui, QtCore

from lector import database
from lector.models import TableProxyModel, ItemProxyModel

Expand Down
3 changes: 1 addition & 2 deletions lector/metadatadialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@

from lector import database
from lector.widgets import PliantQGraphicsScene

from resources import metadata
from lector.resources import metadata


class MetadataUI(QtWidgets.QDialog, metadata.Ui_Dialog):
Expand Down
2 changes: 1 addition & 1 deletion lector/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import pathlib

from PyQt5 import QtCore, QtWidgets
from resources import pie_chart
from lector.resources import pie_chart


class BookmarkProxyModel(QtCore.QSortFilterProxyModel):
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion parsers/comicbooks.py → lector/parsers/comicbooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import os
import time
import zipfile
from rarfile import rarfile
from lector.rarfile import rarfile


class ParseCOMIC:
Expand Down
2 changes: 1 addition & 1 deletion parsers/epub.py → lector/parsers/epub.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import os
import zipfile

from ePub.read_epub import EPUB
from lector.ePub.read_epub import EPUB


class ParseEPUB:
Expand Down
4 changes: 2 additions & 2 deletions parsers/mobi.py → lector/parsers/mobi.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import shutil
import zipfile

from ePub.read_epub import EPUB
import KindleUnpack.kindleunpack as KindleUnpack
from lector.ePub.read_epub import EPUB
import lector.KindleUnpack.kindleunpack as KindleUnpack


class ParseMOBI:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added lector/resources/raw/Lector.png
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
10 changes: 10 additions & 0 deletions lector/resources/raw/lector.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Desktop Entry]
Categories=Qt;KDE;Graphics;Viewer;
Comment=A Qt based ebook reader
Exec=lector %U
GenericName=eBook Reader
Icon=Lector
MimeType=application/pdf;application/x-cbr;application/ereader;application/x-mobipocket-subscription;application/x-mobipocket-ebook;application/x-mobi8-ebook;application/epub+zip;application/x-cbz;
Name=Lector
Type=Application
X-KDE-StartupNotify=false
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<RCC>
<qresource prefix="images">
<file>Lector.png</file>
<file>DarkIcons/tableofcontents.svg</file>
<file>LightIcons/tableofcontents.svg</file>
<file>DarkIcons/filesaveas.svg</file>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
13,518 changes: 6,934 additions & 6,584 deletions resources/resources.py → lector/resources/resources.py

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions lector/settingsdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
from lector import database
from lector.models import MostExcellentFileSystemModel
from lector.threaded import BackGroundBookSearch, BackGroundBookAddition

from resources import settingswindow
from lector.resources import settingswindow


class SettingsUI(QtWidgets.QDialog, settingswindow.Ui_Dialog):
Expand All @@ -46,7 +45,7 @@ def __init__(self, parent=None):
self.aboutBox.setVisible(False)
install_dir = os.path.realpath(__file__)
install_dir = pathlib.Path(install_dir).parents[1]
aboutfile_path = os.path.join(install_dir, 'resources', 'about.html')
aboutfile_path = os.path.join(install_dir, 'lector', 'resources', 'about.html')
with open(aboutfile_path) as about_html:
self.aboutBox.setHtml(about_html.read())

Expand Down
8 changes: 4 additions & 4 deletions lector/sorter.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@

from lector import database

from parsers.pdf import ParsePDF
from parsers.epub import ParseEPUB
from parsers.mobi import ParseMOBI
from parsers.comicbooks import ParseCOMIC
from lector.parsers.pdf import ParsePDF
from lector.parsers.epub import ParseEPUB
from lector.parsers.mobi import ParseMOBI
from lector.parsers.comicbooks import ParseCOMIC

sorter = {
'pdf': ParsePDF,
Expand Down
1 change: 0 additions & 1 deletion lector/toolbars.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.


from PyQt5 import QtWidgets, QtCore


Expand Down
3 changes: 1 addition & 2 deletions lector/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
# Double page, Continuous etc
# Especially for comics


import os
import uuid
import zipfile
Expand All @@ -32,7 +31,7 @@
except ImportError:
pass

from rarfile import rarfile
from lector.rarfile import rarfile

from lector.models import BookmarkProxyModel
from lector.delegates import BookmarkDelegate
Expand Down
8 changes: 3 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[bdist_wheel]
# This flag says that the code is written to work on both Python 2 and Python
# 3. If at all possible, it is good practice to do this. If you cannot, you
# will need to generate wheels for each Python version that you support.
universal=1
[install]
single-version-externally-managed=1
record=install.txt
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
HERE = path.abspath(path.dirname(__file__))

MAJOR_VERSION = '0'
MINOR_VERSION = '2'
MICRO_VERSION = '1'
MINOR_VERSION = '3'
MICRO_VERSION = '0'
VERSION = "{}.{}.{}".format(MAJOR_VERSION, MINOR_VERSION, MICRO_VERSION)

# Get the long description from the README file
Expand Down Expand Up @@ -62,6 +62,10 @@
python_requires='>=3.6, <4.0',

package_data={'': ['about.html']},
data_files=[
('share/icons/hicolor/scalable/apps', ['lector/resources/raw/Lector.png']),
('share/applications', ['lector/resources/raw/lector.desktop'])
],
include_package_data=True,

# List additional groups of dependencies here (e.g. development
Expand Down

0 comments on commit 7931f92

Please sign in to comment.