Quote:
Originally Posted by roger64
@DiapDealer
This was amazingly fast. I hurried to test it on three kinds of stylesheet, condensed, beautified and shorthand, and it worked beautifully for all. The code is very elegant and economical. It's a brand new and very effective solution. I could not dream a better one!
Congratulations to you and Kovid Goyal and many thanks for that.  
|
Great! Glad it's working for you.
Quote:
1. - For the second script.
Forgive me, I am very unfamiliar with it. I understand it gives to calibre-debug the path to the main script (cm2em_calibre.py). I tried to make it work using a right-click, or from the command-line and failed. I will need some additional and basic explanations.
If we use this additional script and if we do not look at the terminal window, could it be possible to get some kind of feedback to know when the epub has been processed? (a text file, a window message, whatever)
|
I assume you mean the included bash script (Linux) and or batch file (Windows)? Those aren't intended to get you away from the necessity of using the terminal. They're just intended to simplify what you have to type in the terminal (or from copying the python script and/or epub into the same directory--or including lengthy paths). I'll tell you how I use it, and maybe that will help
1) I put the script (cm2em.sh) in /usr/local/bin.
2) rename it to simply cm2em.
3) make it executable.
4) open it in an editor and change SCRIPT_DIR to wherever my cm2em_calibre.py script will be living from now on.
After that bit of setup, I can open a terminal and cd to whatever directory the epub I want to work on resides in and simply type "cm2em file.epub" (without the quotes).
Quote:
2. - An innocent question:
Suppose we have a folder with some epubs. Could it be possible to batch treat them using *.epub? I tried it but it only processed the first one and stopped.
|
If you have the bash script setup similarly to how I described, you could cd into the folder (terminal) and type something like:
Code:
for i in *.epub; do cm2em "$i"; done