05-31-2011, 09:59 AM | #1 |
Junior Member
Posts: 5
Karma: 10
Join Date: May 2011
Device: Kindle 3
|
ebook-convert: access current working directory inside recipe
Hi,
I am a python novice and I wasn't able to figure out a way to access the current working directory inside the recipe. I want to write some log files into the folder. self.output_dir and os.getcwd() are set to the temporary folder. How do I get the CWD of the folder where the recipe is and the output file is generated by ebook-convert a.recipe ebook.mobi? |
05-31-2011, 10:56 AM | #2 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You dont. The recipe is not aware of it. Just write it to os.getcwdu(). When you use the --debug-pipeline option the log file will be copied there.
|
06-03-2011, 03:49 AM | #3 | |
Junior Member
Posts: 5
Karma: 10
Join Date: May 2011
Device: Kindle 3
|
Quote:
Thanks for your quick answer, but why did the email with the reply notification take so long? I got the notification 2 hours ago. |
|
06-03-2011, 10:57 AM | #4 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
from calibre.utils.config import config_dir
Store your persistent data there. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre working directory | paulfiera | Calibre | 17 | 01-02-2011 02:28 AM |
How to access the bottom directory in K3? | lionfish | Kindle Developer's Corner | 2 | 12-07-2010 08:11 AM |
ebook-convert recipe "cannot connect to X server" | neinsuffolk | Calibre | 5 | 09-27-2010 11:49 AM |
Use builtin recipe with ebook-convert | daksjd | Calibre | 0 | 08-29-2009 03:33 PM |
2.11 Shell Access is Working Again | Adam B. | iRex | 18 | 10-01-2007 02:38 AM |