Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-04-2009, 11:41 PM   #1
kannjihyun
Junior Member
kannjihyun began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2009
Device: PRS-505
feeds2epub not working

Hi guys,

I'm pretty new with calibre and want to try to get the rss feeds from some of my favorite sites. I tried configuring them via GUI, but was not successful; so, I tested the feed via terminal windows, but it did not work as well. I run "feeds2epub" and Below is the error messages I got:

feed://iannnnn.com/feed

Code:
~/Desktop/tmp:feeds2epub feed://iannnnn.com/feed
Traceback (most recent call last):
  File "/Applications/calibre.app/Contents/Resources/loaders/feeds2epub.py", line 9, in <module>
    main()
  File "/Applications/calibre.app/Contents/Resources/lib/python2.6/site-packages.zip/calibre/ebooks/epub/from_feeds.py", line 66, in main
  File "/Applications/calibre.app/Contents/Resources/lib/python2.6/site-packages.zip/calibre/ebooks/epub/from_feeds.py", line 37, in convert
  File "/Applications/calibre.app/Contents/Resources/lib/python2.6/site-packages.zip/calibre/web/feeds/main.py", line 135, in run_recipe
  File "calibre/web/feeds/recipes/__init__.pyo", line 95, in compile_recipe
  File "/var/folders/38/38NnZ6VGExCUgbtwLEvVp++++TI/-Tmp-/calibre_0.4.142_d59At__recipes/recipe0.py", line 4
    feed://iannnnn.com/feed
        ^
SyntaxError: invalid syntax
Any suggestions? Thanks in advance!
kannjihyun is offline   Reply With Quote
Old 03-05-2009, 12:45 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: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
feeds2epub doesn't support that syntax. See the section in the User Manula on custom news sources to learn how to create recipes to download your own feeds
kovidgoyal is online now   Reply With Quote
Old 03-10-2009, 03:52 PM   #3
kannjihyun
Junior Member
kannjihyun began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2009
Device: PRS-505
Quote:
Originally Posted by kovidgoyal View Post
feeds2epub doesn't support that syntax. See the section in the User Manula on custom news sources to learn how to create recipes to download your own feeds
Hi Kovid,

Thanks for your fabulous program and your fast reply. I have read the instruction on the user manual and tried to add this custom feeds as a new recipe; however, it is still not working. Calibre still downloads blank page. The page has a lot of Thai characters. At first, I thought that it was because of the text encoding, so I add utf8 encoding, but it still does not work. It is just a RSS feeds, so the page should be simple and I guess that I should not have to modify the recipe that much, but I really don't know why it is not working. Below is my recipe. Do you have any advice?

Thanks,

Code:
class AdvancedUserRecipe1236714135(BasicNewsRecipe):
    title          = u'iannnnn2'
    oldest_article = 7
    max_articles_per_feed = 100
    encoding = 'utf8'    
    feeds          = [(u'iannnnn2', u'feed://iannnnn.com/feed')]
kannjihyun is offline   Reply With Quote
Old 03-10-2009, 04:14 PM   #4
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: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Change oldest_artice to 100

and feed:// to http://
kovidgoyal is online now   Reply With Quote
Old 03-11-2009, 12:27 AM   #5
kannjihyun
Junior Member
kannjihyun began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2009
Device: PRS-505
Thanks!

Now I have the feeds properly downloaded to the calibre already. It works perfectly when viewed on calibre. However, all Thai fonts are garbled when viewed from the PRS-505. Why is 'utf8' not working? Is there a way to embedded the Thai font into the fetch directly?

Code:
#!/usr/bin/env  python

import string, re
from calibre import strftime
from calibre.web.feeds.recipes import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import BeautifulSoup


class iannnnn(BasicNewsRecipe):
    title          = u'iannnnn.com'
    description = 'Blog from iannnnn.com'
    timefmt = ' [%a, %d %b, %Y]'
    oldest_article = 10
    max_articles_per_feed = 100
    no_stylesheets        = True
    use_embedded_content  = False
    remove_javascript     = True
    encoding = 'utf8'
    remove_tags = [dict(name='div', attrs={'id':['nav', 'rss', 'entry', 'searchbox']})]
    remove_tags_after = [dict(name='h3', attrs={'id':'comments'})]
    
    feeds          = [(u'iannnnn', u'http://iannnnn.com/feed')]
kannjihyun is offline   Reply With Quote
Old 03-11-2009, 12:37 AM   #6
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: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
the reader's builtin fonts dont support thai text. look around the forums for how to use custom fonts on yout reader.
kovidgoyal is online now   Reply With Quote
Old 03-11-2009, 01:10 AM   #7
kannjihyun
Junior Member
kannjihyun began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2009
Device: PRS-505
It seems that one way to fix this is to install the customized version of firmware into the device. Somehow, I don't really feel that I want to do this way. Is there another option such as embedding the font directly into the recipe?
kannjihyun is offline   Reply With Quote
Old 03-11-2009, 02:44 AM   #8
kannjihyun
Junior Member
kannjihyun began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2009
Device: PRS-505
Quote:
Originally Posted by kannjihyun View Post
It seems that one way to fix this is to install the customized version of firmware into the device. Somehow, I don't really feel that I want to do this way. Is there another option such as embedding the font directly into the recipe?
Nevermind, Got it already. Thanks a bunch!

kannjihyun is offline   Reply With Quote
Old 03-12-2009, 10:19 AM   #9
kannjihyun
Junior Member
kannjihyun began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2009
Device: PRS-505
Now it seems that I have another problem. I flashed my PRS-505 with Thai fonts already. It can read thai fonts from the rtf files now, but It still could not read those feeds from calibre. I presume that function
Code:
encoding = 'utf8'
would tell PRS-505 that the feeds use unicode encoding, which definitely has Thai characters, but I still could not get it to read Thais. Any suggestion?
kannjihyun is offline   Reply With Quote
Old 03-12-2009, 12:17 PM   #10
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: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
the encoding setting is for the encoding of the source website/feed. what outpuT format are you using?
kovidgoyal is online now   Reply With Quote
Old 03-12-2009, 02:36 PM   #11
kannjihyun
Junior Member
kannjihyun began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2009
Device: PRS-505
I'm using epub format. All Thai fonts at "menu" and "table of contents" are readable. But when I clicked "begin" to read those feeds, thay are all "?????????????".
kannjihyun is offline   Reply With Quote
Old 03-13-2009, 11:11 AM   #12
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
Try LRF format. You may replaced only LRF fonts during your flashing procedure while epub fonts remained the same. That can be remedied but first let us make sure that that is the problem.
kiklop74 is offline   Reply With Quote
Old 03-13-2009, 03:53 PM   #13
kannjihyun
Junior Member
kannjihyun began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2009
Device: PRS-505
Yep, the LRF works! Hooooo yeah~~~

I wonder why EPUB did not work before. Is it possible that the EPUB format does not support special-encoding characters?
kannjihyun is offline   Reply With Quote
Old 03-13-2009, 05:13 PM   #14
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
On Sony reader e-books in epub format are rendered by adobe software that uses different set of fonts than what reader uses for LRF format. Flashing procedure replaces only LRF fonts. That is why LRF works and epub not.

For epub to work you need to add following CSS statement in your recipe:

Code:
    extra_css = '@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} body{font-family: serif1, serif} .article_description{font-family: serif1, serif} a.article{font-family: serif1, serif}'
kiklop74 is offline   Reply With Quote
Old 03-19-2009, 03:50 AM   #15
kannjihyun
Junior Member
kannjihyun began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2009
Device: PRS-505
Thanks, I will try to add those CSS mod and will let you know.
kannjihyun is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What I'm working on AlexBell ePub 3 08-12-2010 04:18 AM
6.31 and 2 not working smoothly DennisDoyle Calibre 12 03-16-2010 04:45 PM
Go to first new post - not always working Wetdogeared Feedback 171 01-29-2009 06:11 PM
SD/CF not working evilcat iRex 4 05-19-2008 01:05 PM
I'm Working On That mikeguru Reading Recommendations 0 07-19-2003 04:08 PM


All times are GMT -4. The time now is 08:46 PM.


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