Skip to content

Commit

Permalink
it packages!
Browse files Browse the repository at this point in the history
  • Loading branch information
HakierGrzonzo committed Mar 17, 2020
1 parent 4e004a1 commit ac2d135
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name = "tinypub-HakierGrzonzo",
version = "1.9",
version = "1.9.1.2",
author = "Grzegorz Koperwas",
author_email = "[email protected]",
description = "A console based epub ebook reader.",
Expand All @@ -20,5 +20,10 @@
"Development Status :: 4 - Beta",
"Intended Audience :: End Users/Desktop"
],
entry_points={
'console_scripts': [
'tinypub=tinyPub.__main__:main'
]
},
python_requires='>=3.8.1'
)
11 changes: 8 additions & 3 deletions tinyPub/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
A python .epub ebook reader
Used to be based on prompt_toolkit, but since version 1.9 is based on py_cui.
"""
from htmlParser import Chapter
from tinyPub.htmlParser import Chapter
import py_cui as pycui
from ebooklib import epub
import json, os, ebooklib, argparse
from multiprocessing import Pool, cpu_count
from navParser import parse_navigation
from tinyPub.navParser import parse_navigation

__version__ = '1.9'
# Debug functions
Expand Down Expand Up @@ -361,7 +361,8 @@ def handle_adnotation_menu_enter(self):
self.addnotationsMenu.handle_adnotation()
self.master.move_focus(self.textDisplayer)

if __name__ == '__main__':
def main():
global config
# set default path for config
configPath = os.path.expanduser('~/.tinypub.json')
parser = argparse.ArgumentParser(description = 'A simple ebook reader with console interface by Grzegorz Koperwas', prog = 'tinyPub', epilog = 'Configuration and reading progress is stored in ~/.tinypub.json', allow_abbrev = True)
Expand Down Expand Up @@ -399,3 +400,7 @@ def handle_adnotation_menu_enter(self):
# After exit write to config file
with open(args.config, 'w+') as f:
f.write(json.dumps(config, indent = 4))

config = None
if __name__ == '__main__':
main()

0 comments on commit ac2d135

Please sign in to comment.