Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 09-13-2015, 06:12 AM   #1
Danfengxinlan
Junior Member
Danfengxinlan began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2012
Device: Ipad
How to specify languages in postprocess_html?

Hi, I was trying to create a recipe with feeds in multiple languages. I am not familiar with programming and I did not find much help in the calibre manual regarding this. Can anyone advice me on this? I am particularly puzzled as to how calibre handles the lang attributes in the original html. Are they simply ignored? The source code of the feeds includes the lang attribute such as 'ja' or 'fr' but they all disappeared in the created file.
Danfengxinlan is offline   Reply With Quote
Old 09-13-2015, 07:12 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,320
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre does not do anything with lang attributes in HTML.
kovidgoyal is offline   Reply With Quote
Advert
Old 09-13-2015, 07:50 AM   #3
Danfengxinlan
Junior Member
Danfengxinlan began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2012
Device: Ipad
Quote:
Originally Posted by kovidgoyal View Post
calibre does not do anything with lang attributes in HTML.
Then can you give me some pointers on how to pass the lang information to soup? When I check the individual HTMLs generated by the recipe, I see only
Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">
.
The lang attribute is not there. Thanks!
Danfengxinlan is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Article download fails if I use postprocess_html function oecherprinte Recipes 3 11-26-2013 04:17 PM
postprocess_html receives html string instead of soup Rackamouth Recipes 5 07-09-2013 01:43 PM
Get article URL in postprocess_html rmflight Recipes 5 11-29-2012 11:37 AM
Languages That Can Be Used Nathan Campos Kindle Developer's Corner 3 11-09-2010 04:51 PM
postprocess_html marbs Recipes 20 11-03-2010 10:11 PM


All times are GMT -4. The time now is 09:28 AM.


MobileRead.com is a privately owned, operated and funded community.