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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-22-2013, 09:07 PM   #1
dbareis
Member
dbareis began at the beginning.
 
dbareis's Avatar
 
Posts: 12
Karma: 10
Join Date: Jun 2013
Location: Australia
Device: Android
Save Template, {series} etc Always Empty

Hi,

What I'd like is to have a book that is not in a series named like the Calibre default: {author_sort}/{title}/{title} - {authors}

Ones in a series I'd like to preceed the title with "SeriesName #SeriesNumber - "

The "#" looks like it could be problematic, I'd looked at examples and know how most of it should work so tried: {author_sort}/{title}/{series}{series:|| #}{series_index:| - | - }{title} - {authors}

For example "Jack Reacher #3 - Tripwire - Lee Child.epub"

Anyway I've tried all sorts of variations and none worked so for debugging I finally simplified it to: {author_sort}/{title}/{series} {series_index} {title} - {authors}

Even the above fails, the series information is never expanded, thinking this could be a calibre bug I downloaded the latest version a few minutes ago and that also fails.

Am I missing something obvious? And in any case can someone please put me out of my misery and let me know what I should use to get what I want?

Thanks for any help,
Dennis
dbareis is offline   Reply With Quote
Old 06-23-2013, 01:12 AM   #2
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,311
Karma: 1113412
Join Date: Jul 2012
Device: Android, Nook Simple Touch, Nook Color, ..., Glo
This worked for me and did what I think you want:

{author_sort}/{title}/{series:|| #} {series_index:|| - }{title} - {authors}

This if you want the number with a leading 0:

{author_sort}/{title}/{series:|| #} {series_index:0>2s|| - }{title} - {authors}
gabby98 is offline   Reply With Quote
Old 06-23-2013, 03:17 AM   #3
dbareis
Member
dbareis began at the beginning.
 
dbareis's Avatar
 
Posts: 12
Karma: 10
Join Date: Jun 2013
Location: Australia
Device: Android
Quote:
Originally Posted by gabby98 View Post
This if you want the number with a leading 0:

{author_sort}/{title}/{series:|| #} {series_index:0>2s|| - }{title} - {authors}
OK, tried that, still doesn't work. I'm on Windows 7 64 bit, perhaps a Calibre bug on that?

Any prerequisite plugs required etc?
dbareis is offline   Reply With Quote
Old 06-23-2013, 04:58 AM   #4
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 4,926
Karma: 802238
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by dbareis View Post
OK, tried that, still doesn't work. I'm on Windows 7 64 bit, perhaps a Calibre bug on that?

Any prerequisite plugs required etc?
It also works for me, Win7/64. The template
Code:
{author_sort}/{title}/{series:|| #} {series_index:|| - }{title} - {authors}
gives the result shown in the screen capture.

No plugins are required for the template language.

The only way I can think of to get the behavior you describe is for the series column to be empty, implying you are putting the series info somewhere else. I admit that this hypothesis is far fetched.

The easiest way to debug templates is to create a custom column "built from other columns", which is what my screen capture shows. Once you have done that, click on a cell in that column then press F2 to open the template editor. From there you can quickly experiment and get immediate feedback. If you do this then you could also post a screen capture like mine so we can see the source data going into the template.
Attached Thumbnails
Click image for larger version

Name:	Clipboard01.png
Views:	56
Size:	30.2 KB
ID:	107243  
chaley is offline   Reply With Quote
Old 06-23-2013, 05:01 AM   #5
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 4,926
Karma: 802238
Join Date: Jan 2010
Location: France
Device: Many android devices
Another thought. Are you sure you are changing the right template? If you are doing send-to-device then there are two templates, the default template set in preferences -> send-to-device and the device-specific template set in the device plugin. To get the latter, connect the device, right-click on the device icon that appears, and select "Configure this device".
chaley is offline   Reply With Quote
Old 06-23-2013, 05:42 AM   #6
dbareis
Member
dbareis began at the beginning.
 
dbareis's Avatar
 
Posts: 12
Karma: 10
Join Date: Jun 2013
Location: Australia
Device: Android
If I add a custom column as suggested then that column does display what I want, however that is still not what is saved to disk (when I use that template).

Thanks for the column/F2 tip, thats great :-)


I've been configuring: Preferences->Import/Export->Sending Books to Disk->[Save Template]

I am not actually using Calibre to send anything to my device. I thought I'd tested the save template option by hardcoding text there and seeing the saved filename containing that text, but now trying it again it may not be using that template at all...

OK, as a sanity test what I want is for Calibre to save the eBooks I add or modify with the filename/structure I specify in the template.

I tried debug mode but that doesn't do much debugging, anyway it thinks I'm on 32 bit OS, that is incorrect, probably not related but strange:
Quote:
calibre Debug log
calibre 0.9.36 isfrozen: True is64bit: False
Windows-7-6.1.7601-SP1 Windows ('32bit', 'WindowsPE')
('Windows', '7', '6.1.7601')
Python 2.7.4
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Starting up...
dbareis is offline   Reply With Quote
Old 06-23-2013, 05:57 AM   #7
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,738
Karma: 12488297
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by dbareis View Post
OK, as a sanity test what I want is for Calibre to save the eBooks I add or modify with the filename/structure I specify in the template.
If you are talking about altering the file/directory format within the calibre library itself, you can't do it. The calibre library structure is not user configurable.
DoctorOhh is online now   Reply With Quote
Old 06-23-2013, 09:11 AM   #8
Sabardeyn
Guru
Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.
 
Sabardeyn's Avatar
 
Posts: 602
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
dbareis,
If you are trying to customize calibre's internal file structure, then absolutely nothing will (or should!) work for you. Calibre's file structure cannot be altered, otherwise data will be lost.

Nor should you be using or manipulating these files outside of calibre. Calibre's copies of you ebooks are just like a jet plane's black box - data goes in, nothing touches the data inside. This is done intentionally, as otherwise other program(s) can alter the files and corrupt calibre's data.

I think everyone reading your first post above assumed you were exporting ebooks from calibre to another device - a smartphone, laptop, ereader, etc. Some other physically separate device/system. Not the computer on which calibre is installed.
Sabardeyn is offline   Reply With Quote
Old 06-23-2013, 01:50 PM   #9
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,311
Karma: 1113412
Join Date: Jul 2012
Device: Android, Nook Simple Touch, Nook Color, ..., Glo
Quote:
Originally Posted by Sabardeyn View Post
dbareis,
....
I think everyone reading your first post above assumed you were exporting ebooks from calibre to another device - a smartphone, laptop, ereader, etc. Some other physically separate device/system. Not the computer on which calibre is installed.
I certainly did...

thanks
gabby98 is offline   Reply With Quote
Old 06-24-2013, 05:11 AM   #10
dbareis
Member
dbareis began at the beginning.
 
dbareis's Avatar
 
Posts: 12
Karma: 10
Join Date: Jun 2013
Location: Australia
Device: Android
Quote:
Originally Posted by Sabardeyn View Post
dbareis,
If you are trying to customize calibre's internal file structure, then absolutely nothing will (or should!) work for you.
I'm not trying to change the file structure, I'm simply trying to change the arbitary method chosen to name files with one that suits me better, from what I can see this would not impact Calibre at all to allow (since bracketed numbers on folders seem to be used to match up) but if it can't be done, it can't be done.

I will continue to name the books in Calibre to get the results I need to work around this limitation.

Thanks
dbareis is offline   Reply With Quote
Old 06-24-2013, 10:09 AM   #11
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,121
Karma: 5468860
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by dbareis View Post
I'm not trying to change the file structure, I'm simply trying to change the arbitary method chosen to name files with one that suits me better, from what I can see this would not impact Calibre at all to allow (since bracketed numbers on folders seem to be used to match up) but if it can't be done, it can't be done.

I will continue to name the books in Calibre to get the results I need to work around this limitation.

Thanks
There is nothing Arbitrary about the naming. There is a Plan and all the code written supports the Plan.

File structure does include the Naming of files an folders (including Case and Punctuation marking).
theducks is offline   Reply With Quote
Old 06-24-2013, 11:17 AM   #12
Sabardeyn
Guru
Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.
 
Sabardeyn's Avatar
 
Posts: 602
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
dbareis,
Calibre's source code requires: those files, in that location, specifically structured and named "as is".

The absolute only way you're going to successfully change the structure is to learn Python programming, fork calibre (and any extensions you might want to use), and produce a custom build of the program. But I would not expect too much assistance in any resulting difficulties.


BTW, I should mention that probably half of the new users in these forums go through a "change the file structure" phase. No one has succeeded yet. Because, other than mucking about in the files, there is no reason to have your preferred structure within calibre's library. You might want to see a specific structure when you export them. Or, when displaying them. But the actual file structure, name and location as used by the database? Nope.

Remember, calibre's library is meant to be a back-up that you don't directly touch. It is not meant to be your one and only copy of these ebook files.

Please take a look at the FAQ, particularly questions 2-4.

Last edited by Sabardeyn; 06-24-2013 at 11:25 AM.
Sabardeyn is offline   Reply With Quote
Old 07-01-2013, 01:41 PM   #13
miquele
Connoisseur
miquele ought to be getting tired of karma fortunes by now.miquele ought to be getting tired of karma fortunes by now.miquele ought to be getting tired of karma fortunes by now.miquele ought to be getting tired of karma fortunes by now.miquele ought to be getting tired of karma fortunes by now.miquele ought to be getting tired of karma fortunes by now.miquele ought to be getting tired of karma fortunes by now.miquele ought to be getting tired of karma fortunes by now.miquele ought to be getting tired of karma fortunes by now.miquele ought to be getting tired of karma fortunes by now.miquele ought to be getting tired of karma fortunes by now.
 
miquele's Avatar
 
Posts: 74
Karma: 498122
Join Date: May 2010
Location: Europe
Device: Bookeen Cybook Gen3, Kindle 3, Galaxy SIII, Kindle PW
Quote:
Remember, calibre's library is meant to be a back-up that you don't directly touch. It is not meant to be your one and only copy of these ebook files.
While I agree with everything said about the file structure being immutable for good reasons, I cannot agree with the last bit.

Calibre is *the* place for my eBooks, and I might take a back-up of my calibre library, but it itself is the primary location, and *not* a back-up at all.
miquele is offline   Reply With Quote
Old 07-01-2013, 07:27 PM   #14
Sabardeyn
Guru
Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.
 
Sabardeyn's Avatar
 
Posts: 602
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
Ok, I'll let you get away with that one.

For some users calibre is their main ebook repository, for others it is a back-up. Regardless, don't mess with calibre's copies of the files or face the possibility of permanent loss.
Besides, otherwise we might have to you.
Sabardeyn is offline   Reply With Quote
Reply

Tags
file name, save, series, template

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Troubleshooting a Save Template. Illyrie Library Management 5 02-08-2014 11:12 AM
Save template problem antoon Library Management 12 08-17-2012 12:47 PM
Need help on a Save to Disk template fidvo Library Management 2 08-12-2012 03:34 PM
A little help with a save template...? Belfaborac Library Management 2 02-04-2011 09:47 PM
save file template for series bucsie Calibre 2 11-08-2010 02:07 AM


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


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