![]() |
#1 |
Member
![]() Posts: 19
Karma: 10
Join Date: Mar 2009
Device: Sony PRS-505
|
Wikipedia conversion
Hello all,
I would like to request info from anyone on their conversion of Wikipedia pages to read on their Sony reader (I'm using the 505). Right now I am using the book conversion utility and saving in open document format. Unfortunately I cannot find a way to remove all of the footnotes (which makes the numbers get highlighted automatically in the text). Does anyone have a good conversion method? I'd like the titles to be larger, extra lines between paragraphs and NO footnotes whatsoever. I can't find a way to remove footnotes in open office or in calibre. Cheers, |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,832
Karma: 11844413
Join Date: Jan 2007
Location: Tampa, FL USA
Device: Kindle Touch
|
I do plan to give it a whack using the Wikipedia DVD. I just haven't got to it yet.
BOb |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
Try this recipe. It is able to scrap any wiki page. You just need to setup manually list of articles for different topics. Like this:
Code:
... INDEX = 'http://en.wikipedia.org/' ... def parse_index(self): articles = [] articles.append({ 'title':'Tree', 'date':'', 'url':self.INDEX + 'wiki/Tree', 'description':'Tree' }) articles.append({ 'title':'Tiger', 'date':'', 'url':self.INDEX + 'wiki/Tiger', 'description':'Tiger' }) return [('Articles', articles)] This leaves space for improvement but it is something to start working on. |
![]() |
![]() |
![]() |
#4 |
Member
![]() Posts: 19
Karma: 10
Join Date: Mar 2009
Device: Sony PRS-505
|
I see. That's really great!
Is there a way to grab multiple articles and have each article become a chapter (i.e., an item in the table of contents) inside one book? That'd be nice. |
![]() |
![]() |
![]() |
#5 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
That is exactly how this recipe works
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Mar 2009
Device: PRS-505
|
Thanks, nice work.
|
![]() |
![]() |
![]() |
#7 |
Member
![]() Posts: 19
Karma: 10
Join Date: Mar 2009
Device: Sony PRS-505
|
http://pastebin.com/f3f43c6f9 (my attempt) gives:
--------------------------- ERROR: Invalid input --------------------------- <p>Could not create recipe. Error:<br>unexpected indent (recipe3.py, line 57) --------------------------- &OK --------------------------- Why is there an unexpected indent on line 57? |
![]() |
![]() |
![]() |
#8 |
Member
![]() Posts: 19
Karma: 10
Join Date: Mar 2009
Device: Sony PRS-505
|
It turns out calibre gives different line numbers from a command line run:
U:\...Scripts>python wikipedia_two.py File "wikipedia_two.py", line 53 def parse_index(self): ^ IndentationError: unexpected indent After seeing that we were able to fix the error. (my tripple quoted section above line 53 was not indented. Could the line number reporting be fixed? Cheers, |
![]() |
![]() |
![]() |
#9 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,317
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
the reason for that is that the GUI adds a few lines to the top of the recipe to make sure it runs, the command line doesn't
|
![]() |
![]() |
![]() |
#10 |
Member
![]() Posts: 19
Karma: 10
Join Date: Mar 2009
Device: Sony PRS-505
|
Is that a static four lines? (then I could subtract it off and find the real error)
|
![]() |
![]() |
![]() |
#11 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,317
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Yeah it is don't recall if it's exactly four or some other number but that is easy to test by deliberately introducing an error
|
![]() |
![]() |
![]() |
#12 |
Member
![]() Posts: 19
Karma: 10
Join Date: Mar 2009
Device: Sony PRS-505
|
Based on the difference observed above I believe that it is strictly four lines (57-53=4). Good info to know.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
wikipedia | bo-kai | Sony Reader | 4 | 09-23-2010 06:32 PM |
Conversion from odt from wikipedia book creator workaround | eksor | Calibre | 2 | 06-02-2010 04:47 AM |
Wikipedia | omro | Astak EZReader | 0 | 12-09-2009 10:42 AM |
Reference Wikipedia: SOS Children 2006 Wikipedia CD | hn_88 | BBeB/LRF Books | 0 | 01-29-2008 12:23 PM |
iLiad I want wikipedia... | narve | iRex Developer's Corner | 15 | 08-16-2007 07:38 AM |