Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 03-04-2014, 02:54 PM   #1
fidvo
Addict
fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.
 
Posts: 296
Karma: 1599870
Join Date: Jun 2012
Device: none
Multiple save to disk templates?

I'm thinking about consolidating my copies of Calibre Portable. I didn't realize until recently that the Portable version could handle multiple libraries, so I currently have it installed in 3 different locations for my 3 libraries.

I've outlined the pros and cons of merging, and realized there's one major issue. My 3 libraries all have different save to disk templates. I need to be able to maintain separate templates for each library, or barring that, have a way to choose between templates when I save books to disk.

Is there any way to keep multiple save to disk templates in Calibre?
fidvo is offline   Reply With Quote
Old 03-04-2014, 03:09 PM   #2
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,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Use multiple configuration directories, which you are already doing.

Or manually change the template each time you switch libraries.

Keep in mind that you can have a general template, as well as specific overriding templates per device type. Also, the MTP device interface can be set up separately per device.

I use a special template that chooses how I want to save each book depending on the data I have saved in custom columns. If a book has anything in the #origfilename custom column, it's an Amazon book and I use the contents of that column as the template, if that field is empty, I fall back on the generic "Author_Sort/Title - Author" template.

Code:
program:

ifempty(
	field('#file'),
	template('[[author_sort:sublist(0,1,&)]]/[[title]] - [[authors:sublist(0,1,&)]]'))
Perhaps there is something you can use to select which template to use based on data about the book? I'd be happy to help you work out the right template, we can discuss it on the dedicated thread so everyone can see/learn from it. See here: https://www.mobileread.com/forums/sho...d.php?t=100949

Last edited by eschwartz; 03-04-2014 at 03:13 PM.
eschwartz is offline   Reply With Quote
Old 03-04-2014, 05:11 PM   #3
fidvo
Addict
fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.
 
Posts: 296
Karma: 1599870
Join Date: Jun 2012
Device: none
eschwartz, you're a genius!

Having a single branching template is a reasonable workaround. It's not quite as convenient as storing separate templates, but once you gave me the idea, I did some research and experimentation, and it looks like the switch function and the current_library_name function can be used together to select different templates based upon which library is active.

It even works when certain custom fields used in one of these sub-templates don't even exist in a different library.

The nice thing about using the switch function is that if I ever need to add another library in the future, I just have to add another pattern/value pair to the script. It's not as convenient as multiple templates, but it's the next best thing.

As soon as I work out my final template, I'll post it over on that other thread that you mentioned so that others can make use of it if they wish.

This is the last piece I needed in order to consolidate my copies of Calibre Portable.

Thanks!
fidvo is offline   Reply With Quote
Old 03-04-2014, 06:28 PM   #4
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,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Awesome! Glad I could help!
eschwartz is offline   Reply With Quote
Old 03-05-2014, 02:42 PM   #5
fidvo
Addict
fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.
 
Posts: 296
Karma: 1599870
Join Date: Jun 2012
Device: none
I posted my final template in the other thread, but to make it easier to find with a forum search, I'm posting it here as well:

Code:
program:

switch(current_library_name(),
  'Calibre Library',
  template('{#division}/{#genre}/{#authorlookup}/{series:||/}{series_index:0>3s||_}{#subseries}{#subseries_index:0>3s||_}{title}'),
  'Library - Special',
  template('{#group}/{title}'),
  'Library - Working',
  template('{author_sort}/{series}/{series_index:0>3s}_{title}'),
  template('{author_sort}/{series}/{series_index:0>3s}_{title}'))
fidvo is offline   Reply With Quote
Old 03-10-2014, 05:38 PM   #6
gabby98
Wizard
gabby98 ought to be getting tired of karma fortunes by now.gabby98 ought to be getting tired of karma fortunes by now.gabby98 ought to be getting tired of karma fortunes by now.gabby98 ought to be getting tired of karma fortunes by now.gabby98 ought to be getting tired of karma fortunes by now.gabby98 ought to be getting tired of karma fortunes by now.gabby98 ought to be getting tired of karma fortunes by now.gabby98 ought to be getting tired of karma fortunes by now.gabby98 ought to be getting tired of karma fortunes by now.gabby98 ought to be getting tired of karma fortunes by now.gabby98 ought to be getting tired of karma fortunes by now.
 
gabby98's Avatar
 
Posts: 1,751
Karma: 2667650
Join Date: Jul 2012
Device: Android, Nook Simple Touch, Nook Color, ..., Glo
nice guys...you gave me another way to think about my save templates when I am dealing with family/friend devices

gabby98 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple 'save to disc' templates? redscarlett Library Management 12 09-09-2013 12:43 PM
plugin for favorite save to disk templates gabby98 Plugins 3 07-03-2013 01:35 PM
How to remove unwanted Save-to-disk templates alexmobile Calibre 5 02-22-2012 05:54 AM
Save on disk PhM Calibre 1 06-13-2011 12:43 PM
Save to Disk beckywc Library Management 3 06-06-2011 08:54 PM


All times are GMT -4. The time now is 04:33 AM.


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