Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-04-2012, 12:34 PM   #1
Steven630
Zealot
Steven630 began at the beginning.
 
Posts: 142
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
Wonder if anyone can produce a recipe for this

http://news.donga.com/PHP/Paper/index.php

At the bottom of the page (above link) are links to all the articles from the print edition of Donga Daily, a Korean newspaper. All the links are already divided according to the pages in the newspaper. (A1,A2...) Even the cover can be fetched using the image above the table of contents. It would be quite easy then, to work out a recipe that can download articles from the print edition on a daily basis.

But I know nothing about codes, which is why I would like to ask anyone kind enough to help me out.
Steven630 is offline   Reply With Quote
Old 05-05-2012, 01:56 AM   #2
Steven630
Zealot
Steven630 began at the beginning.
 
Posts: 142
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
More information here. We can use Printer-friendly pages to make it easier.

if the original link is:
http://news.donga.com/3/all/20120505/46014158/1

then printer friendly page would be:
http://news.donga.com/view.php?id=Pr...505|46014158|1

I think this recipe, if produced, would be much similar to that of The Economist, which combines table-of-contents page and printer-friendly pages.

A tweak of The Economist recipe should be enough.
Steven630 is offline   Reply With Quote
Old 05-11-2012, 09:49 AM   #3
scissors
Addict
scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.
 
Posts: 206
Karma: 1001369
Join Date: Sep 2010
Device: prs300, kindle keyboard 3g
what's wrong with the rss they provide ?

http://rss.donga.com/
scissors is offline   Reply With Quote
Old 05-11-2012, 10:54 AM   #4
Steven630
Zealot
Steven630 began at the beginning.
 
Posts: 142
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
Quote:
Originally Posted by scissors View Post
what's wrong with the rss they provide ?

http://rss.donga.com/
But I still prefer the print edition.
Steven630 is offline   Reply With Quote
Old 06-23-2012, 12:11 AM   #5
Steven630
Zealot
Steven630 began at the beginning.
 
Posts: 142
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
All right. So, can anyone tell me what's the closest recipe we've got in the built-in ones so that I can tweak it into something I want.
Steven630 is offline   Reply With Quote
Old 06-23-2012, 11:54 PM   #6
NotTaken
Connoisseur
NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.
 
Posts: 65
Karma: 4640
Join Date: Aug 2011
Device: kindle
One donga my friend.
Attached Files
File Type: zip donga.recipe.zip (1.3 KB, 43 views)
NotTaken is offline   Reply With Quote
Old 06-24-2012, 01:12 AM   #7
Steven630
Zealot
Steven630 began at the beginning.
 
Posts: 142
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
Wow! I really can't thank you enough for helping me, first with pullquote, then for this recipe. It works well. I noticed that some words are in bold and some not, within the same paragraph. Wonder if it's because of the Calibre book viewer or the file itself.
Steven630 is offline   Reply With Quote
Old 06-24-2012, 01:22 AM   #8
Steven630
Zealot
Steven630 began at the beginning.
 
Posts: 142
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
Another is that what should I do if sometime in the future, I would like to add names to the sections? (eg. A1:front page...). I've yet to figure out what each page is about, but would like to add the names.

Last edited by Steven630; 06-24-2012 at 05:44 AM.
Steven630 is offline   Reply With Quote
Old 06-24-2012, 08:54 AM   #9
NotTaken
Connoisseur
NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.
 
Posts: 65
Karma: 4640
Join Date: Aug 2011
Device: kindle
new donga - if you update the section titles please repost the updated recipe (I'm not sure if the one I added was correct as my Korean is a little rusty).
Attached Files
File Type: zip donga.recipe.zip (1.5 KB, 40 views)
NotTaken is offline   Reply With Quote
Old 06-24-2012, 10:31 AM   #10
Steven630
Zealot
Steven630 began at the beginning.
 
Posts: 142
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
Thank you. You can speak Korean? That's incredible. front page would be 프론트 페이지 or 제1면. But I would prefer 종합 to indicate the contents. I had been reading Chosun Ilbo, the biggest daily in Korea, with my smartphone. I wanted to produce a copy of DongA only because it seems the easiest among the three biggest papers in Korea (I've checked out their websites to see which is the easiest to download and convert. The webpage that lists Chosun's articles, it turned out, varies with the date and seems more complex and contains no image reached from the TOC. http://srchdb1.chosun.com/pdf/i_serv...2012&M=06&D=23). After getting my Kindle, I stopping reading on the glaring smartphone. Although I have learned Korean for four years and have no problem reading newspapers or novels now, I still think reading something every day would be necessary to prevent it from going rusty.

And then, you helped me with it. How lucky I am! I will take a couple of days to get familiar with the contents within each section before updating the recipe.

By the way, is it possible to set the section name according to the day of week? (For example, on weekdays, A8 might be the political section, but on weekends it might be finance section instead). If I want to retain "A1" before the section name (like: A1:종합), does it mean I have to type "A1" after that?

Last edited by Steven630; 06-24-2012 at 10:44 AM.
Steven630 is offline   Reply With Quote
Old 06-24-2012, 11:32 AM   #11
NotTaken
Connoisseur
NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.
 
Posts: 65
Karma: 4640
Join Date: Aug 2011
Device: kindle
I don't really speak Korean - I used an online translation tool

If you want the prefix you could just use some like:

Code:
    real_sections = {
    '[A1]' : 'A1: 종합',
#   '[A2]' : 'remove the # to use',
    }
If you wanted a different section title for each day of the week you could use a 7 element tuple, but maybe no pattern will emerge.

Edit:
Actually probbaly easier to change:
Code:
            if section_title in self.real_sections:
                section_title = section_title + ': ' +  self.real_sections[section_title]

Last edited by NotTaken; 06-24-2012 at 11:36 AM.
NotTaken is offline   Reply With Quote
Old 06-24-2012, 09:17 PM   #12
Steven630
Zealot
Steven630 began at the beginning.
 
Posts: 142
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
Thanks! I guess there will be a pattern for at least some sections. Is it also possible for one to omit some sections like the recipe for New York Times?

And I know the last section is always the editorial section, how can I set "editorial" to the last section (the number of total sections varies every day).

How can I change the size of the main text in the extra CSS?

Last edited by Steven630; 06-25-2012 at 10:18 AM.
Steven630 is offline   Reply With Quote
Old 06-25-2012, 03:18 PM   #13
NotTaken
Connoisseur
NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.
 
Posts: 65
Karma: 4640
Join Date: Aug 2011
Device: kindle
for the css, try:
Code:
div.artical {     
    font-size: x-small;
}
For the rest.. just adapt the code from those recipes. I still don't reckon you'll be able to get page numbers to always match up to section titles though .. maybe I'm wrong though

Last edited by NotTaken; 06-25-2012 at 03:24 PM.
NotTaken is offline   Reply With Quote
Old 06-25-2012, 09:52 PM   #14
NotTaken
Connoisseur
NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.NotTaken is fluent in JavaScript as well as Klingon.
 
Posts: 65
Karma: 4640
Join Date: Aug 2011
Device: kindle
New donga just in.

This time it fetches the actual articles during parse index and gets the section titles from the actual content. It then caches the content to a temp file (so that the content isn't fetched twice).

It no longer uses the print versions as these didn't contain the article sections - hopefully ive cleaned these up enough though.
Attached Files
File Type: zip donga.recipe.zip (2.2 KB, 39 views)
NotTaken is offline   Reply With Quote
Old 06-26-2012, 01:13 AM   #15
Steven630
Zealot
Steven630 began at the beginning.
 
Posts: 142
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
Awesome! It must have taken you a lot of time for this recipe. The two recipes would suit people of different tastes. Many thanks.

The text size doesn't seem to work. It applied to only some of them. I was also trying to change the title size. But after adding the code, even the title size failed.

Code:
    extra_css =''' 
                  div.artical {     
                               font-size: x-small;
                                                  }
    '''

    '\n h2 { font-size: large;  }\n h1 { font-size: large;  }'
Steven630 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Sigil to produce ebooks John123 Sigil 9 02-03-2011 06:05 AM
How to produce epubs for Sony ereader drmaxx ePub 1 03-15-2010 11:10 PM
Anyone use Calibre to produce ebooks from HTML? AlexBell Workshop 10 07-03-2009 08:15 AM
Kindle costs $185 to produce akira28 Amazon Kindle 4 04-22-2009 05:43 PM
Can BookDesigner produce an ebook that looks exactly like those from Connect? Dr. Drib Sony Reader 4 03-30-2007 09:32 PM


All times are GMT -4. The time now is 07:34 PM.


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