Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-09-2010, 08:54 PM   #1
megabadd
Enthusiast
megabadd began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Dec 2009
Device: Astak PP
Error with adding font to EPUB news recipe

I tried adding the following code to my Japanese news recipes, but I always get an error with the '@' line.

@font-face {
font-family: "Ryo Gothic";
font-weight: normal;
font-style: normal;
src: url(res:///abook/fonts/ryogothicplusnmedium.ttf);
}

For a better overview of my problem please read this thread:
https://www.mobileread.com/forums/showthread.php?t=67329

If anyone could help me out, I'd appreciate it.
megabadd is offline   Reply With Quote
Old 01-10-2010, 03:00 PM   #2
evanmaastrigt
Connoisseur
evanmaastrigt doesn't litterevanmaastrigt doesn't litter
 
Posts: 78
Karma: 192
Join Date: Nov 2009
Device: Sony PRS-600
Quote:
Originally Posted by megabadd View Post
I tried adding the following code to my Japanese news recipes, but I always get an error with the '@' line.

@font-face {
font-family: "Ryo Gothic";
font-weight: normal;
font-style: normal;
src: url(res:///abook/fonts/ryogothicplusnmedium.ttf);
}

For a better overview of my problem please read this thread:
https://www.mobileread.com/forums/showthread.php?t=67329

If anyone could help me out, I'd appreciate it.
If this is about that 'unindent' error please post the recipe that gives you the error.
evanmaastrigt is offline   Reply With Quote
Advert
Old 01-11-2010, 10:16 AM   #3
megabadd
Enthusiast
megabadd began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Dec 2009
Device: Astak PP
My second recipe here is in unindent problem.

This recipe downloads a file but with no changes on my ereader (viewable on my comp tho):

#!/usr/bin/env python

__license__ = 'GPL v3'
__copyright__ = '2008 - 2009, Darko Miletic <darko.miletic at gmail.com>'
'''
engadget.com
'''

from calibre.web.feeds.news import BasicNewsRecipe

class Engadget(BasicNewsRecipe):
title = u'Engadgetreelz'
__author__ = 'Darko Miletic'
description = 'Tech news'
language = 'ja'
oldest_article = 7
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = True
feeds = [ (u'Posts', u'http://japanese.engadget.com/rss.xml')]

extra_css = '\
@font-face {font-family: "Ryo Gothic PlusN M";src:url(res:///abook/fonts/ryogothicplusnmediumfont.ttf)}\n\
.article_description{font-family: Ryo Gothic PlusN M}\n\
p{font-family: Ryo Gothic PlusN M}\n\
h1 {font-weight: normal;}\n\
h2 {font-style: normal;}\n'

def postprocess_html(self, soup, f):
soup.find('html')['xml:lang'] = 'ja' ['lang'] = 'ja'
return soup



Calibre won't accept this recipe:

#!/usr/bin/env python

__license__ = 'GPL v3'
__copyright__ = '2008 - 2009, Darko Miletic <darko.miletic at gmail.com>'
'''
engadget.com
'''

from calibre.web.feeds.news import BasicNewsRecipe

class Engadget(BasicNewsRecipe):
title = u'EngadgetreelzFont'
__author__ = 'Darko Miletic'
description = 'Tech news'
oldest_article = 7
language = 'ja'
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = True
feeds = [ (u'Posts', u'http://japanese.engadget.com/rss.xml')]
@font-face {
font-family: "Ryo Gothic";
font-weight: normal;
font-style: normal;
src: url(res:///abook/fonts/ryogothicplusnmedium.ttf);
}
megabadd is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
xkcd recipe error sonyreaderuser Calibre 3 09-18-2010 05:00 PM
Error Adding Plugin modkindle Plugins 14 05-16-2010 12:14 PM
Help with news recipe Acey Calibre 2 03-12-2010 06:36 AM
Error adding books Gfinch Calibre 2 08-03-2008 08:36 PM
[calibre] recipe - smaller font? moneytoo Calibre 0 06-01-2008 08:00 AM


All times are GMT -4. The time now is 06:05 AM.


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