Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-23-2013, 11:45 PM   #1
Q9Nine
Junior Member
Q9Nine began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2013
Device: Nexus 7
Question about exporting to custom directory with Calibre.

Hey all,

So I'm just starting to dig into Calibre and I love it. Wish I hadn't shelled out cash for the Alfa reading program. Calibre is much better.

One of the things I want to do with Calibre is edit all my ebook files to perfection, then export them automatically into a nice directory format. Calibre can do this, but I'm having an issue. The format I'd like to export to is:

Author name (Last, first) / [Publishing Year] Title / Author - Title.epub

So for example, it'd look like this in Windows:

Martin, George R.R. / [2005] A Feast for Crows (Book 4) / George R.R. Martin - A Feast for Crows (Book 4).epub

I'd also like to have series incorporated (which, in the case of this example, would be "A Song of Ice and Fire").

Here's what my export string looks like right now:

{author_sort}/[{pubdate}] {title}/{authors} - {title}

I think I can figure out the series bit, but I'm having a more annoying problem. When the save to disk export happens, it includes the Month and Year, not just the year. So it gets messed up in terms of sorting by year (see attached screenshot). Anyone have any idea how to make it so it just adds the year, not the month?

Cheers, much appreciated.
Attached Thumbnails
Click image for larger version

Name:	DateProblemCalibre.PNG
Views:	339
Size:	13.7 KB
ID:	117143  
Q9Nine is offline   Reply With Quote
Old 12-24-2013, 12:30 AM   #2
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,650
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
I think you should be able to use format_date function to 'extract' the year, see http://manual.calibre-ebook.com/template_lang.html

BR
BetterRed is offline   Reply With Quote
Advert
Old 12-24-2013, 01:29 AM   #3
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
relevant bits are:

Quote:
Originally Posted by @calibre manual
format_date(x, date_format) – format_date(val, format_string) – format the value, which must be a date field, using the format_string, returning a string. The formatting codes are:
yy : the year as two digit number (00 to 99).
yyyy : the year as four digit number.

So in advanced formatting mode that would be: {pubdate:format_date(yyyy)}
eschwartz is offline   Reply With Quote
Old 12-24-2013, 02:11 PM   #4
Q9Nine
Junior Member
Q9Nine began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2013
Device: Nexus 7
Excellent, that worked great. Thanks. One more question:

My titles, when exported, are coming out as Title Sort, not title. So instead of:

"A Game of Thrones" it is "Game of Thrones, A" in Windows Explorer.

Any idea how to change that behavior when saving to disk?

Thanks,
Q
Q9Nine is offline   Reply With Quote
Old 12-24-2013, 03:03 PM   #5
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by Q9Nine View Post
Excellent, that worked great. Thanks. One more question:

My titles, when exported, are coming out as Title Sort, not title. So instead of:

"A Game of Thrones" it is "Game of Thrones, A" in Windows Explorer.

Any idea how to change that behavior when saving to disk?

Thanks,
Q
If you use {title} you should get Title. There is a separate template for {title_sort}. Are you sure you aren't using {title_sort}?
eschwartz is offline   Reply With Quote
Advert
Old 12-24-2013, 10:09 PM   #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: 45,235
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
{title} gives you title sort by default (for legacy compatibility, when there was no title_sort). You can change that behavior via Preferences->Tweaks.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't Change Dropbox Custom Search Directory? hbtaylor Marvin 2 09-13-2013 11:00 PM
calibre update 0.8.1 to 0.8.2 custom install directory Dopedangel Calibre 5 05-21-2011 01:15 PM
Adding more books from an already added directory question vitalichka Library Management 15 02-07-2011 03:08 AM
newbie question regarding root directory e2c Amazon Kindle 10 05-02-2009 01:50 PM
Directory Tree Question (folders and subfolders) bobowvu Bookeen 26 10-24-2008 04:33 AM


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


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