Hi,
I have a setup where I fetch news from a python script on my Linux server using cron. It works well apart from Lenta.ru for which the description string contains non-ascii characters. I get the "Failed to find builtin recipe: " error. I'm running Python 2.7.1. I copied the description string from the builtin_recipes.xml file. Script:
Code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os, subprocess, tempfile
os.environ['DISPLAY'] = ':1'
recipes = [u'Lenta.ru: Новости' 'Dagens Nyheter', \
'Svenska Dagbladet', 'BBC News', 'La Repubblica']
tmp_dir = tempfile.mkdtemp()
out_file = tmp_dir + "/news.epub"
for recipe in recipes:
subprocess.call(["ebook-convert", recipe + ".recipe", out_file])
subprocess.call(["calibredb", "add", out_file])
os.remove(out_file)
os.removedirs(tmp_dir)
Any clue how to make this work?