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 11-19-2010, 06:07 AM   #1
siebert
Developer
siebert has a complete set of Star Wars action figures.siebert has a complete set of Star Wars action figures.siebert has a complete set of Star Wars action figures.
 
Posts: 136
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 3 WiFi / Nexus 4 (Android)
How to disable conversion date in title and source link in page?

Hi,

I'm using the python recipe for brand eins and there are two thinks I'd like to change in the generated epubs:

- The ebook title is set from the recipe, but calibre seems to append automatically the conversion date in brackets. Is it possible to prevent that from the recipe?

- At the end of each source page there is a note that it was converted via calibre and a link to the source url. Is it possible to disable this note and link from the recipe?

Ciao,
Steffen
siebert is offline   Reply With Quote
Old 11-19-2010, 05:52 PM   #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: 25,243
Karma: 4961457
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
no and no
kovidgoyal is offline   Reply With Quote
Old 11-20-2010, 03:06 AM   #3
siebert
Developer
siebert has a complete set of Star Wars action figures.siebert has a complete set of Star Wars action figures.siebert has a complete set of Star Wars action figures.
 
Posts: 136
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 3 WiFi / Nexus 4 (Android)
Hi,

I've seen from other recipes that adding the line
Code:
timefmt = ''
fixes my first issue (probably as a side effect, but it seems to work).

If the second one isn't possible now, could you implement a switch to disable it or a function to override in a future version of calibre?

Thanks,
Steffen
siebert is offline   Reply With Quote
Old 11-20-2010, 10:12 AM   #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: 25,243
Karma: 4961457
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I have no interest in doing that, but patches are welcome.
kovidgoyal is offline   Reply With Quote
Old 11-21-2010, 07:40 AM   #5
siebert
Developer
siebert has a complete set of Star Wars action figures.siebert has a complete set of Star Wars action figures.siebert has a complete set of Star Wars action figures.
 
Posts: 136
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 3 WiFi / Nexus 4 (Android)
Quote:
Originally Posted by kovidgoyal View Post
no and no
You lied, nothing is impossible in python

Proof is here:
http://www.mobileread.com/forums/sho....php?p=1227446

I admit that the solution is ugly as I have to replicate lots of code, so a switch within calibre would be very nice.

Ciao,
Steffen
siebert is offline   Reply With Quote
Old 11-21-2010, 08:26 AM   #6
Consti
Junior Member
Consti began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Sep 2010
Device: Kindle
@kovidgoyal: Please include the new version of the Recipe in the next version of Calibre.

The newest version can be found here:
https://github.com/consti/BrandEins-...andeins.recipe

It includes changes made by Steffen;

Thanks!
Consti is offline   Reply With Quote
Old 11-21-2010, 10:26 AM   #7
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: 25,243
Karma: 4961457
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
well sure you can do pretty much anything in principle. But I am not going to put those changes into the builtin recipe. You are of course free to continue using the custom recipe for yourself
kovidgoyal is offline   Reply With Quote
Old 11-21-2010, 12:53 PM   #8
siebert
Developer
siebert has a complete set of Star Wars action figures.siebert has a complete set of Star Wars action figures.siebert has a complete set of Star Wars action figures.
 
Posts: 136
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 3 WiFi / Nexus 4 (Android)
Quote:
Originally Posted by kovidgoyal View Post
well sure you can do pretty much anything in principle. But I am not going to put those changes into the builtin recipe.
Am I correct if I assume that you only don't like the feature described below to be included in the builtin recipe or is there anything else? I could submit a recipe without it but all the other improvements.

Quote:
NEW: Remove "This article was downloaded by calibre from..." section from bottom of each page.
Ciao,
Steffen
siebert is offline   Reply With Quote
Old 11-21-2010, 01:21 PM   #9
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: 25,243
Karma: 4961457
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I've already merged the other improvements.
kovidgoyal is offline   Reply With Quote
Old 11-21-2010, 01:22 PM   #10
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by siebert View Post
Am I correct if I assume that you only don't like the feature described below to be included in the builtin recipe or is there anything else? I could submit a recipe without it but all the other improvements.
Ciao,
Steffen
My philosophy is to try to build recipes that are consistent with other built-ins.
In this list:
Quote:
  1. NEW: The issue to download can be selected via the username field.
  2. NEW: Add cover image.
  3. NEW: Prevent that conversion date is appended to title.
  4. NEW: Remove "This article was downloaded by calibre from..." section from bottom of each page.
  5. FIXED: "brand eins" is written in lowercase.
Numbers 2 and 5 are consistent. Numbers 1, 3 and 4 I would make as optional via an edit by the user in a custom recipe, and explain them in the description. Of course, Kovid is the final arbiter.
Starson17 is offline   Reply With Quote
Old 11-21-2010, 01:29 PM   #11
siebert
Developer
siebert has a complete set of Star Wars action figures.siebert has a complete set of Star Wars action figures.siebert has a complete set of Star Wars action figures.
 
Posts: 136
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 3 WiFi / Nexus 4 (Android)
Quote:
Originally Posted by kovidgoyal View Post
I've already merged the other improvements.
Thats great.

Ciao,
Steffen
siebert is offline   Reply With Quote
Old 11-21-2010, 05:47 PM   #12
siebert
Developer
siebert has a complete set of Star Wars action figures.siebert has a complete set of Star Wars action figures.siebert has a complete set of Star Wars action figures.
 
Posts: 136
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 3 WiFi / Nexus 4 (Android)
Quote:
Originally Posted by kovidgoyal View Post
I've already merged the other improvements.
Hi,

I've noticed that you also removed the
Code:
timefmt = ''
line. Could you tell me the reason why you don't like that change?

This feature used by serveral other official recipes and as the brand eins recipe fetches complete issues from the web archive, the content should always be the same regardless of the conversion date, so I see no point in including it in the title.

Ciao,
Steffen
siebert is offline   Reply With Quote
Old 11-21-2010, 09:05 PM   #13
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: 25,243
Karma: 4961457
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I'm confused are you saying the downloaded content will be the same if I run the recipe today and a onth from now, the resulting ebook will be the same?

dates in titles are useful or people that use ereadres that don't allow sorting by dates/dont display dates in their UI
kovidgoyal is offline   Reply With Quote
Old 11-22-2010, 03:56 AM   #14
siebert
Developer
siebert has a complete set of Star Wars action figures.siebert has a complete set of Star Wars action figures.siebert has a complete set of Star Wars action figures.
 
Posts: 136
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 3 WiFi / Nexus 4 (Android)
Quote:
Originally Posted by kovidgoyal View Post
I'm confused are you saying the downloaded content will be the same if I run the recipe today and a onth from now, the resulting ebook will be the same?
Essentially, yes.

By default, the recipe fetches the last fully available issue (as for the latest issue, the one which is currently sold at the news stands, only a few selected articles are available online, so the recipe defaults to the issue before the current one to get a complete issue) from the archive, so if I run the recipe today and in a month, I'll probably get two different issues downloaded. But if I download the same issue (for example by modifing the issue selection in the recipe or now via the username setting) again in a month, the content will be the same as it is now.

brand eins is a monthly published print magazine, but they are kind enough to have all their back issues available for free on their online web archive. So I'd like to have the output of this calibre recipe as close as possible to an electronic version of their printed magazine, resembling an EPUB issue of brand eins they would probably publish themselves.

Quote:
dates in titles are useful or people that use ereadres that don't allow sorting by dates/dont display dates in their UI
As the brand eins EPUB title already includes the month and year of the magazine it contains (for example the title is "brand eins 10/2010" for the october issue of 2010), all information I need to identify and sort this ebook is already available in the title and the conversion date doesn't add any useful information to it, so I'd like to get rid of it.

I hope you can now understand my motivation of that change.

Ciao,
Steffen
siebert is offline   Reply With Quote
Old 11-22-2010, 11:58 AM   #15
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: 25,243
Karma: 4961457
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
In that case, the better approach is that rather than setting self.title, set self.timefmt.

See for example the Atlantic recipe.
kovidgoyal 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
All recipes have Unknown author and title- From source Sept 30 Starson17 Calibre 22 10-03-2010 11:38 AM
Suggestion: USA recepit have date in title DBDigital Calibre 1 06-12-2010 01:33 PM
Removing date from periodical title elmoglick Calibre 2 06-06-2010 02:18 PM
Rename output Title of (custom) news source ischeriad Calibre 4 02-16-2010 06:14 AM
Date in Title when Fetching News Nigel H Calibre 1 01-13-2010 11:57 AM


All times are GMT -4. The time now is 10:05 PM.


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