Change justification sometimes does not work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I try out my recipe with
ebook-convert my_recipe.recipe output.mobi --password pass --username username --test 10 --output-profile kindle --change-
and the justification is changed to justify (even though the original is not justified).
When I load the recipe into gui via Fetch News>Add a custom news source and I set "Text Justitifaction" to "Justify text" in Preferences>
If I set no_stylesheets = True in my recipe, justification is changed. When I run conversion from mobi to mobi, the justification is changed to justify as well.
to me, it seems to be a bug unless --change-
This was also discussed here:
http://
(The recipe is here. It normally needs an account but this is visible even without one.)
#!/usr/bin/python
# -*- coding: utf-8 -*-
# License: GNU General Public License v3 - http://
# Copyright: <email address hidden>
__license__ = 'GNU General Public License v3 - http://
__copyright__ = '<email address hidden>'
import re
from calibre.
from calibre.
#This imports the version bundled with Calibre
import lxml
from lxml.builder import E
class respektRecipe(
__author__ = 'Tomáš Hnyk'
title = u'Respekt'
publisher = u'Respekt Publishing a. s.'
description = u'Articles from the printed edition without translations from The Economist that are not available online'
encoding = 'cp1250'
language = 'cs'
remove_
extra_css = 'ul {color:black} .image_caption {font-size:
remove_
remove_
remove_tags = [dict(name='ul', attrs={
dict(
dict(
dict(name='p', attrs={
dict(
dict(
# this makes authors left-aligned by not using the author class)
preprocess_
# remove empty tags
preprocess_
preprocess_
preprocess_
def get_cover_
soup = self.index_
cover = soup.findAll('div', attrs={
return cover
#needs_
"""
def get_browser(self):
br = BasicNewsRecipe
if self.username is not None and self.password is not None:
return br
"""
def parse_index(self):
raw = self.index_
root = lxml.html.
ans = []
for article in root.xpath(
date = article.
author = article.
title = article.
url = article.
link = {'title'
for section in ans:
if section[0] == section_title:
else:
return ans
def cleanup(self):
def preprocess_
raw = u''.join(unicode(a) for a in soup.contents)
root = lxml.html.
# Make image captions visible
body = root.xpath(
add = 0
for index, element in enumerate(body):
try:
if element.tag == 'img':
except:
# Add length in words after author
# Make perex (subheading) start on a new line
Eh, the line is this: justification justify -vv --debug-pipeline debug
ebook-convert my_recipe.recipe output.mobi --test 1 --output-profile kindle --change-
And this is on Calibre 1.10, Ubuntu 13.10.