Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-20-2012, 11:19 AM   #1
garylapointe
Book Geek
garylapointe began at the beginning.
 
garylapointe's Avatar
 
Posts: 8
Karma: 10
Join Date: Dec 2002
Location: Dearborn, Michnigan
Device: Kindle Keyboard 3G, iPad + iPhone with Kindle App
Smile Unique titles for new recipe output. Would like date appended for my Kindle files.

It's a problem distinguishing different "issues" of the same news source. All the output files for the same news source output with the same filename.

1) This is a problem when I have more than one of the same file in my Kindle.

2) Or I'm connecting to Amazon from a different device (say my iPhone) and all I see is a list of duplicate filenames and don't know which one to pick.

Trying to figure out what to add to the code to get unique names based on the dated and time the file was generated.

Preferred option would be - YY-MM-DD HH:MM with the empty digits with zeros (or spaces) and the hour in military time.

I'm sure I can figure out how to add my preferred date format if you can tell me how to get any portion of it into the output file by default.

If it did it do ALL my output news files (as some kind of post processing), that would be even better, then i wouldn't have to modify every recipe every time one gets updated.

I see that if "self.output_profile.periodical_date_in_title" is True, it will probably do what I want, but I'm not sure where how to do that...
I found the pyo file for calibre.web.feeds.news but that doesn't look like I should edit it directly(!).

Thank you,
Gary

(PS - I'm sure there is a reason to not do this, but my files from KindleFeeder.com have dates on them and it works very well for me; when KindleFeeder didn't have dates, I didn't like it).

Last edited by garylapointe; 01-20-2012 at 12:03 PM.
garylapointe is offline   Reply With Quote
Old 01-20-2012, 12:33 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: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
News files sent to Kindles with a USB connection have the date in YYYY-MM-DD format in their filenames.
kovidgoyal is online now   Reply With Quote
Old 01-20-2012, 01:08 PM   #3
garylapointe
Book Geek
garylapointe began at the beginning.
 
garylapointe's Avatar
 
Posts: 8
Karma: 10
Join Date: Dec 2002
Location: Dearborn, Michnigan
Device: Kindle Keyboard 3G, iPad + iPhone with Kindle App
Quote:
Originally Posted by kovidgoyal View Post
News files sent to Kindles with a USB connection have the date in YYYY-MM-DD format in their filenames.
Interesting, but
1) That's not the way I'm using it, I'm e-mailing them automatically. I guess I didn't say I was e-mailing them; but if I was using USB, I'd have the date and wouldn't be asking
2) It doesn't help when connecting from a different Kindle device to Amazon since the file won't actually be at Amazon.

Is there a reason it was done in the USB transfer but not the e-mail transfer?

I tried setting periodical_date_in_title = True, but it didn't seem to matter...
Is that "self.output_profile.periodical_date_in_title" variable only for USB export?



Gary

Last edited by garylapointe; 01-20-2012 at 01:16 PM.
garylapointe is offline   Reply With Quote
Old 01-20-2012, 09:44 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,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Files names are automatically changed by amazon when emailling, so there isn't much point in doing it anyway. What you want is to add the date to the title metadata, for which you can use the metadata plugboards.
kovidgoyal is online now   Reply With Quote
Old 01-21-2012, 03:24 AM   #5
garylapointe
Book Geek
garylapointe began at the beginning.
 
garylapointe's Avatar
 
Posts: 8
Karma: 10
Join Date: Dec 2002
Location: Dearborn, Michnigan
Device: Kindle Keyboard 3G, iPad + iPhone with Kindle App
I've got this
mobi:KINDLE2 = ([{title} {date}] -> title)
This is to add the date to news sources pulled down. BUT IT DOESN'T ACTUALLY WORK.

Which looking at other things, seems like it might work. But I don't really know if "date" is valid. There seems to be a date in the file (since calibre tells me the date) but this (the above) doesn't seem to be getting me anywhere...

I'd prefer the date the the file is generated, but I could use the date it's actually doing the mailing 99.9% of the time they'll be the same.

ANY THOUGHTS?
Gary

Last edited by garylapointe; 01-26-2012 at 12:11 PM. Reason: to clarify that what I tried isn't actually working.
garylapointe is offline   Reply With Quote
Old 06-14-2012, 05:32 PM   #6
Pessac
New addict
Pessac began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2011
Location: Nürnberg, Germany
Device: Kindle 3
Smile Solved using metadata plugboards

I was facing the same problem as the thread opener. The hint using metadata plugboards was helpful, but it took me some time to sort things out. So if someone else looks for a solution, (s)he might not spend as much time as I did.

Basically in my Kindle 3 setup downloaded news are shown in my home with their title and their date, but in archived items with their title and the author (i.e. "Calibre" in the standard settings). Since my wife downloads only now and then some news from the archived items, it's impossible for her to figure out which is the most current item (unfortunately the sort order is not correlated to the date).

So instead of changing the title, I decided to change only the author field. Now the archived items show also the date. This was achieved by using metadata plugboards.
  1. In Preferences go to Metadata plugboards.
  2. In the line "Add new plugboard", choose "mobi" as format and "any device" as device.
  3. Copy and paste {title:'format_date(today(), "yy-MM-dd dddd")'} to the field "Source template".
  4. Choose "authors" as "Destination field".
  5. Click on "Save plugboard".
  6. Leave the dialog by clicking on "Apply".

It worked for me, but it has at least these two caveats:
  • Instead of the publishing date, the current date is used. This is usually no problem, since at least for my downloads these are identical.
  • If you use more than one Mobi-compliant Ereader than you should probably more specific about the device setting.

I hope this will be helpful to someone out there.

Take care,
Pessac
Pessac is offline   Reply With Quote
Reply

Tags
date, filename, news, output, title


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML recipe output nickredding Conversion 4 11-06-2011 01:12 AM
Troubleshooting Images appended to end of book spiralpath Amazon Kindle 4 05-08-2011 04:01 AM
TOC location of Calibre recipe ebook output tylau0 Calibre 8 11-06-2010 09:48 AM
Is it possible to specify output format in recipe file madcow_x2 Calibre 3 01-07-2010 04:10 PM
Bug with the date in subscription titles copernicc Calibre 4 03-05-2009 01:22 PM


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


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