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 05-05-2013, 10:15 AM   #1
Victorious56
Junior Member
Victorious56 began at the beginning.
 
Victorious56's Avatar
 
Posts: 8
Karma: 10
Join Date: May 2013
Location: Berkshire, UK
Device: Marvin for iPad
Metadata Plugboard for Series Number Reformatting

Hello,
As a new Calibre user I have been struggling a little with formatting metadata when saving to disc, specifically the series number.
I would, if possible, like to reformat a series number of 1.00, 2.00 etc to be 1,2 etc with no decimal places shown if they are zero. A series number of 5.10 would convert to 5.1.

I have set up a Metadata Plugboard for the title of

{series:||, Book }{series_index:4.1f|| - }{title}

which gives me titles of

A Song of Ice and Fire, Book 5.1 - A Dance With Dragons, Part 1 - Dreams and Dust
A Song of Ice and Fire, Book 3.0 - A Storm of Swords

Ideally 'Book 3.0' would be changed to 'Book 3', but after much searching I haven't managed to find out if this is possible.
I'd be grateful if any more knowledgeable user could help me
Victorious56 is offline   Reply With Quote
Old 05-05-2013, 12:35 PM   #2
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: 5,907
Karma: 1217216
Join Date: Jan 2010
Location: France
Device: Many android devices
If none of your series numbers are larger than 5 digits (99999.), then use
Code:
{series_index:g}
where the 'g' stands for 'general'.

If you do have very large indices, then use
Code:
{series_index:re((\.\d)0,\1)}
to strip off any zero after a decimal point and a digit.
chaley is offline   Reply With Quote
Old 05-06-2013, 07:03 AM   #3
Victorious56
Junior Member
Victorious56 began at the beginning.
 
Victorious56's Avatar
 
Posts: 8
Karma: 10
Join Date: May 2013
Location: Berkshire, UK
Device: Marvin for iPad
Thank you chaley, using your first suggestion worked perfectly
Do you know of an online resource which has a list of these formatting options?
Thank you again!
Victorious56 is offline   Reply With Quote
Old 05-06-2013, 07:48 AM   #4
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,908
Karma: 12755553
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by Victorious56 View Post
Do you know of an online resource which has a list of these formatting options?
This section of the calibre manual outlines the template language and points you to the Python documentation for advanced formatting options.

Last edited by DoctorOhh; 05-06-2013 at 07:50 AM.
DoctorOhh is online now   Reply With Quote
Old 05-08-2013, 06:09 AM   #5
Victorious56
Junior Member
Victorious56 began at the beginning.
 
Victorious56's Avatar
 
Posts: 8
Karma: 10
Join Date: May 2013
Location: Berkshire, UK
Device: Marvin for iPad
^ Thanks for those. I did have a quick look previously, but I think I need to spend a bit more time on this. I used to be a Cobol programmer but Python is very different
Victorious56 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
Plugboard "Metadata: Show series [series index] - title as title (Kindle)" Deep Cover Library Management 6 11-30-2012 06:17 PM
Metadata - get number out of Author and in Series anvarit Library Management 9 10-12-2012 09:20 AM
Add book number in a series to metadata? EtrnLwanderer Sigil 6 03-10-2012 02:48 PM
Series sorting in plugboard ac4lt Devices 6 01-13-2012 01:53 PM
Metadata Plugboard - First Char of each word in Series MikeP1212 Calibre 2 10-14-2010 07:14 PM


All times are GMT -4. The time now is 12:19 AM.


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