wustho / epy

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

What's the point of `textwidth`in the `reading_states` table? #46

Open mcepl opened 2 years ago

mcepl commented 2 years ago

I cannot imagine that anybody would want this state saved per-document. If anybody wants to change it, then she probably wants it same for all other documents in the same terminal, doesn’t she?

wustho commented 2 years ago

Hey there, yes actually I was contemplating on global textwidth that affect all documents intead of each. But the first time I made this, it's way easier to maintain this way (at least in state schema), will reconsider this in the future, thanks for input...

mcepl commented 2 years ago

Meanwhile, there is a table last_read which covers the global state, doesn’t it?

wustho commented 2 years ago

Yes, that's actually pretty recent schema. The first time I made it, it's also in reading state table, so there is like last_read: bool = True in reading state table and each time we need to find last read file, we need to loop through all the reading state until we found True in last_read lol.

Pardon my rash judgement, at the moment I made this I was focusing on how to render the text in center of screen, so never thought much about anything else but how overall works...

And for the moment, I'm thinking of making unit tests before other contributors do any essential changes, like making textwidth global. And also focusing on the tts engine, hoping to find some engine that on par with alexa voice... So it may take some time before going back to this issue...