View Single Post
Old 10-10-2022, 02:51 AM   #35
un_pogaz
Chalut o/
un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.
 
un_pogaz's Avatar
 
Posts: 443
Karma: 672378
Join Date: Dec 2017
Device: Kobo
And after a night's sleep, I just realized the inconsistency of using the arguments for python:.

*inhale, sigh*

In fact, I think I even misunderstood the purpose of python template (it's an alternative form to Stored, not a 3rd option totally inedite).

If you think that deleting them would improve the code, go ahead.


Also, I was going to say that syntax highlighting is possible, since "Action Chains" does it in its module editor... but it uses something different (TextEdit from calibre.gui2.tweak_book.editor.text), so no, crap.

At least, maybe highlight python: to identify what we are in.
... Maybe an idea, I'm looking at it.

EDIT: And, it works.
Spoiler:
Well, really small bug, the highlighting of the key words of the modes is made at the beginning of each new line whereas normally it should be exclusively at the beginning of the full text. Detail, really. I won't have to think about it here, I'll wait until it's pushed to your github or to the calibre github to take the time to make a clean commit (if possible).
Attached Files
File Type: zip template_dialog.py.zip (9.5 KB, 288 views)

Last edited by un_pogaz; 10-10-2022 at 06:55 AM.
un_pogaz is offline   Reply With Quote