wustho / epy

CLI Ebook (epub2, epub3, fb2, mobi) Reader
GNU General Public License v3.0
971 stars 53 forks source link

applaud and chapter progress proposal #4

Closed ratnamhof closed 3 years ago

ratnamhof commented 4 years ago

Dear developer,

My apologies for posting an issue comment. I don't have an issue, but know of no another place to paste a general comment.

I have used epy.py for a while during Christmas last year and wanted to applaud you for this wonderful script. I am impressed! Very nice lightweight epub reader, indeed!

I agree with your comment that showing the progress in the book has added value. However, for me the progress within a chapter is also very useful, as chapter endings are natural places to pause reading. For myself I have therefore replaced this line of code:

PROGRESSTR = "{}%".format(int(PROGRESS*100))

with this one:

PROGRESSCHAPTER = sum(LOCALPCTG[:y+rows-1]) / float(sum(LOCALPCTG))
PROGRESSTR = "{}%/{}%".format(int(PROGRESSCHAPTER*100),int(PROGRESS*100))

I just wanted to post this comment here in case that the developers also may find the chapter progress a useful feature to have.

Thanks again for sharing your work.

With kind regards, Grateful user

wustho commented 4 years ago

Hello there, thanks for the toast, so glad you enjoy it... I think chapter progress is a little bit more redundant than it is more necessary, sorry. But you could always make your own fork and I'll be glad to mention it in this README...

ratnamhof commented 4 years ago

:D Hi wustho, don't worry about it, I will not distract attention away from the original creator with another fork. If you don't think that chapter progress is useful then we will just forget about the idea.

...I can anyway make this substitution with a simple sed command for my sad little self;) . In case anyone cares:

sed -i 's;PROGRESSTR = "{}%".format(int(PROGRESS\*100));PROGRESSCHAPTER = sum(LOCALPCTG[:y+rows-1]) / float(sum(LOCALPCTG))\n PROGRESSTR = "{}%/{}%".format(int(PROGRESSCHAPTER\*100),int(PROGRESS\*100));' path_to_script/epy.py

Cheers and keep up the good work!