|
|
#1 |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: May 2011
Device: Kindle 3
|
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? |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,616
Karma: 28549044
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.
|
|
|
|
| Advert | |
|
|
|
|
#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.
|
|
|
|
|
|
|
#4 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,616
Karma: 28549044
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 03:28 AM |
| How to access the bottom directory in K3? | lionfish | Kindle Developer's Corner | 2 | 12-07-2010 09:11 AM |
| ebook-convert recipe "cannot connect to X server" | neinsuffolk | Calibre | 5 | 09-27-2010 12:49 PM |
| Use builtin recipe with ebook-convert | daksjd | Calibre | 0 | 08-29-2009 04:33 PM |
| 2.11 Shell Access is Working Again | Adam B. | iRex | 18 | 10-01-2007 03:38 AM |