View Single Post
Old 04-13-2012, 12:31 AM   #6
idea00
Junior Member
idea00 will become famous soon enoughidea00 will become famous soon enoughidea00 will become famous soon enoughidea00 will become famous soon enoughidea00 will become famous soon enoughidea00 will become famous soon enough
 
Posts: 7
Karma: 684
Join Date: Apr 2012
Device: android
Ok I finished with all the open issues and sent you a merge proposal on lp.

Backward Compatibility
Fully backwards compatible any sr?_search / sr?_replace option saved in the conversion definitions are automatically converted to entries in the search_replace option and they can be used in ebook-convert as usual.


User Interface
Reverted Widget and implemented: get_value_handler, set_value_handler and connect_gui_obj_handler.
I still needed to change Widget to include setup_help_handler (as a counterpart to setup_help) in order not to have to use dummy widget for the original sr* options.

CLI

Quote:
Originally Posted by kovidgoyal View Post
You wont be able to find a serialization scheme that is both robust and easy to enter given the quoting restrictions of most shells. Instead, I suggest using the path to a file for the CLI.If specified, load the expressions from that file. To make it human usable have the file format be something simple like
Code:
single line regex1
replacement expression1

single line regex2
replacement expression2
This also allows for an easy analogue of the save load functionality from the CLI. You will also be able to use this option in the GUI, by writing your table into a temp file and passing it using this option.
I can't just use a temporary file for the option as the options are saved for each ebook and for bulk conversion when using the GUI so I'm using a dual approach: json or a file can be accepted.
The GUI will always return json so it can be saved along with the other options and used during conversion without requiring an external file.

I hope you have time soon to review my proposal and that it can make it to the trunk.
idea00 is offline   Reply With Quote