View Single Post
Old 02-15-2015, 12:17 PM   #897
dickloraine
Guru
dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.
 
Posts: 631
Karma: 7544528
Join Date: Apr 2013
Location: Berlin
Device: PRS 350, Kobo Aura
Hi,
I have made some small modifikations to the plugin, mainly to clean some stylings that interfere with the Kobo eReader.
I added three new options under "html&styles":
  1. Remove font-family settings: This removes the "font-family" styling from the epub. Should be used in conjunction with "remove embedded fonts". Added because the kobo reader does not allow changing of fonts, if font-family settings are in the css.
  2. Remove line-height settings: Removes the "line-height" styling. Same behaviour on the kobo as above.
  3. Remove alignment settings: Removes "text-align: left" and "text-align: justify". Center and right are untouched. See above for the reason.

Maybe this is useful for non Kobo users too. I only have basic programming knowledge and that is true for regex too. I think this is robust and should capture all cases, but I'm not 100% sure.

i don't know, if this addition are worthy to be included into the plugin, but since I made this already, I thought I could post it here. I posted an older version in some other post and a few people said I should post it here.

I only altered the "dialogs.py" file to show the options and "modify.py" to include the options there. So only at the beginning where all options are specified and added the new functions after "def _remove_font_family".
Attached Files
File Type: zip Modify ePub.zip (66.9 KB, 212 views)
dickloraine is offline   Reply With Quote