I just opened Calibre and I don't have any format for TXT so i guess i did something wrong. In the command prompt I input
calibre-debug.exe C:\Users\Jenny\Documents\Calibre Library\
And the code in the py is (it is inside a box is that an issue)?
def init_cache(library_path):
from calibre.db.backend import DB
from calibre.db.cache import Cache
backend = DB(library_path)
cache = Cache(backend)
cache.init()
return cache
import tempfile
temporary_txt_file = tempfile.NamedTemporaryFile(suffix='txt', delete=False)
cache = init_cache(library_path = 'C:\\Users\\Jenny\\Documents\\Calibre Library\\')
for id in cache.all_book_ids():
cache.add_format(id, 'TXT', temporary_txt_file)
Last edited by Josieb1; 11-27-2014 at 05:15 AM.
|