diff options
author | wustho <benawiadha@gmail.com> | 2020-04-18 06:13:35 +0700 |
---|---|---|
committer | wustho <benawiadha@gmail.com> | 2020-04-18 06:13:35 +0700 |
commit | 36ab2138ff45137a8fd0c2ce8ff0d8e67b4c2148 (patch) | |
tree | 80c153516ffab6cec626d527b334531c679cd144 /epy.py | |
parent | 3349f99ed28b5c9884308fba969e7ec554a60415 (diff) | |
download | epy-36ab2138ff45137a8fd0c2ce8ff0d8e67b4c2148.tar.gz |
Added drop_whitspace=False in textwrap.wrap() in text_win() adn add File Info from Metadata.
Diffstat (limited to 'epy.py')
-rwxr-xr-x | epy.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -407,7 +407,7 @@ def text_win(textfunc): texts = [] for i in raw_texts.splitlines(): - texts += textwrap.wrap(i, wi - 6) + texts += textwrap.wrap(i, wi - 6, drop_whitespace=False) textw.box() textw.keypad(True) @@ -660,7 +660,9 @@ def toc(src, index): @text_win def meta(ebook): - mdata = "" + mdata = "[File Info]\nPATH: {}\nSIZE: {}\n \n[Book Info]\n".format( + ebook.path, os.stat(ebook.path).st_size + ) for i in ebook.get_meta(): data = re.sub("<[^>]*>", "", i[1]) mdata += i[0].upper() + ": " + data + "\n" |