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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 07-12-2017, 06:38 AM   #1
Tweetygirl10111
Junior Member
Tweetygirl10111 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2017
Location: South Africa
Device: Tablet
Unhappy Calibre book adding: Regular expression request...

Hi There

I have been through all the posts regarding renaming my books and i am still at a loss

I have 100's of ebooks which i have been manually editing and it becomes a huge pain...

This is how i would love my books to be when i load them into Calibre..
Elizabeth Briggs - Chasing the Dream 01 - More Than Music

The original file looks like this
Elizabeth Briggs - [Chasing the Dream 01] - More Than Music

I like my books to have the Series name in the title... so like this below

Title = Chasing the Dream 01 - More Than Music
Authors = Elizabeth Briggs
Series = No Match
Series Index = No Match
ISBN = Title


Sorry to be a pain... And is this at all possible...



ever so much ....
Tweetygirl10111 is offline   Reply With Quote
Advert
Old 07-12-2017, 08:23 AM   #2
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 13,283
Karma: 21339656
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O, Glo HD, Aura ONE
Can I suggest that you don't do this? If you want to display the books in calibre like this, add an custom column that builds the "series title" from the other columns. You can then change the displayed columns to show this title, rather then the standard title.

The advantage of doing it this way is that the basic metadata is consistent with the metadata sources and you can use the metadata source plugins to maintain the data without any extra editing. And if you change your mind about how you want to show the title, you can. Also, it is common to want the title like this on ereaders. Most don't handle the series info, so a metadata plugboard is used to change the title in the copy sent to the device.

If you want to do what I suggest, then you can create a "Column built from other columns" with the template:

Code:
{series}{series_index:0>2s| - | - }{title}

As to regex to create when adding the book, I can't think of how to do it. I suspect the simplest way to it is to set the title and series from the file name and then run a search and replace across new books in a batch.
davidfor is offline   Reply With Quote
Old 07-12-2017, 09:11 AM   #3
Tweetygirl10111
Junior Member
Tweetygirl10111 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2017
Location: South Africa
Device: Tablet
Quote:
Originally Posted by davidfor View Post
Can I suggest that you don't do this? If you want to display the books in calibre like this, add an custom column that builds the "series title" from the other columns. You can then change the displayed columns to show this title, rather then the standard title.

The advantage of doing it this way is that the basic metadata is consistent with the metadata sources and you can use the metadata source plugins to maintain the data without any extra editing. And if you change your mind about how you want to show the title, you can. Also, it is common to want the title like this on ereaders. Most don't handle the series info, so a metadata plugboard is used to change the title in the copy sent to the device.

If you want to do what I suggest, then you can create a "Column built from other columns" with the template:

Code:
{series}{series_index:0>2s| - | - }{title}

As to regex to create when adding the book, I can't think of how to do it. I suspect the simplest way to it is to set the title and series from the file name and then run a search and replace across new books in a batch.
Wow ... what an awesome community... Thanks for getting back to me so quickly.. What i am going to do is .... make a cup of coffee and sit and go through all u have suggested .... if i can't come right.. i will wait for my son, he can read all this and help me do what u suggested ...


Last edited by Tweetygirl10111; 07-12-2017 at 09:12 AM. Reason: makes better sense
Tweetygirl10111 is offline   Reply With Quote
Old 07-13-2017, 08:37 AM   #4
Tweetygirl10111
Junior Member
Tweetygirl10111 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2017
Location: South Africa
Device: Tablet
Quote:
Originally Posted by davidfor View Post
Can I suggest that you don't do this? If you want to display the books in calibre like this, add an custom column that builds the "series title" from the other columns. You can then change the displayed columns to show this title, rather then the standard title.

The advantage of doing it this way is that the basic metadata is consistent with the metadata sources and you can use the metadata source plugins to maintain the data without any extra editing. And if you change your mind about how you want to show the title, you can. Also, it is common to want the title like this on ereaders. Most don't handle the series info, so a metadata plugboard is used to change the title in the copy sent to the device.

If you want to do what I suggest, then you can create a "Column built from other columns" with the template:

Code:
{series}{series_index:0>2s| - | - }{title}

As to regex to create when adding the book, I can't think of how to do it. I suspect the simplest way to it is to set the title and series from the file name and then run a search and replace across new books in a batch.
Thanks so much, that custom column works really nicely, but sorry to trouble, but is there a way use the new column as part of the file name in calibre documents... I tried using the save to disk option and editing the template using the lookup name I created which was just series_title but it didn't seem to work.
Tweetygirl10111 is offline   Reply With Quote
Old 07-13-2017, 10:19 AM   #5
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 13,283
Karma: 21339656
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O, Glo HD, Aura ONE
Quote:
Originally Posted by Tweetygirl10111 View Post
Thanks so much, that custom column works really nicely,
Glad it is working how you want.
Quote:
but sorry to trouble, but is there a way use the new column as part of the file name in calibre documents... I tried using the save to disk option and editing the template using the lookup name I created which was just series_title but it didn't seem to work.
My current save to disk template is:

Code:
{author_sort}/{title} - {authors}
To use your column, I would try:

Code:
{author_sort}/{#series_title} - {authors}
davidfor is offline   Reply With Quote
Old 07-13-2017, 11:23 AM   #6
kacir
Wizard
kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.
 
kacir's Avatar
 
Posts: 3,244
Karma: 5555555
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
Quote:
Originally Posted by Tweetygirl10111 View Post
I tried using the save to disk option and editing the template using the lookup name I created which was just series_title but it didn't seem to work.
Here is what I use. It creates directories for series and prefixes the name of the directory with the book with a series number
This is not what you asked for ;-) but shows an example of advanced syntax of template language.
Code:
{author_sort:.1}/{authors}/{series:|# |}/{series_index:0>3s|| - }{title} - {authors}/{series_index:0>3s|| - }{title} - {authors}
To create something like you want you might want to use
Code:
{authors} - {series:|| }{series_index:0>3s|| - }{title}
No custom columns needed.

Please notice this {series_index:0>3s|| - }
series_index - is series index
:0>3s - the number is three characters long, so instead of part 2 it will write 002 - so the series can be alphabetically sorted when there is more than 10 books in series. Otherwise it would be like this: 1,10,11,2,3,...,9
|| - - if you did not use this, but instead {authors} - {series} {series_index} - {title} then when there is no series you would have filename such as: 'Author Name - - Title'. the || denominate prefix and suffix that is given to the series or series index IF they exist.
For the angle brackets version it would be something like
Code:
{authors} - {series:|[| }{series_index:0>3s||] - }{title}
Do not hesitate to ask for more details. Calibre is extremely powerful tool that has even more advanced features

Last edited by kacir; 07-13-2017 at 11:27 AM.
kacir is offline   Reply With Quote
Old 07-13-2017, 06:38 PM   #7
niijii
Member
niijii began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Jul 2017
Location: Minnesota
Device: Kindle Voyage & Kindle Fire
Can anyone make a how to video for this?
Something incredibly simple?
niijii is offline   Reply With Quote
Old 07-13-2017, 06:44 PM   #8
BetterRed
null operator
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: 9,174
Karma: 7656413
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Tweetygirl10111 View Post
I tried using the save to disk option and editing the template using the lookup name I created which was just series_title but it didn't seem to work.
@Tweetygirl10111 - when you use custom columns in templates, the name must be prefixed with a '#' , so try #series_title

BR
BetterRed is offline   Reply With Quote
Old 07-13-2017, 06:58 PM   #9
niijii
Member
niijii began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Jul 2017
Location: Minnesota
Device: Kindle Voyage & Kindle Fire
Ok created column... now how do I run my whole library through it?

Last edited by niijii; 07-13-2017 at 10:42 PM. Reason: wish to delete excess post
niijii is offline   Reply With Quote
Old 07-13-2017, 07:06 PM   #10
niijii
Member
niijii began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Jul 2017
Location: Minnesota
Device: Kindle Voyage & Kindle Fire
How do I change the "- 01 -" part to a simple [1] bracket part?
niijii is offline   Reply With Quote
Old 07-13-2017, 07:08 PM   #11
niijii
Member
niijii began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Jul 2017
Location: Minnesota
Device: Kindle Voyage & Kindle Fire
and thank you! You saved me a ton of time... just want to change that part to brackets

Last edited by niijii; 07-13-2017 at 10:42 PM. Reason: wish to delete excess post
niijii is offline   Reply With Quote
Old 07-13-2017, 07:10 PM   #12
niijii
Member
niijii began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Jul 2017
Location: Minnesota
Device: Kindle Voyage & Kindle Fire
I really love you! I can't believe it! Thank you!

Last edited by niijii; 07-13-2017 at 10:15 PM. Reason: delete
niijii is offline   Reply With Quote
Old 07-13-2017, 08:48 PM   #13
BetterRed
null operator
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: 9,174
Karma: 7656413
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@niijii - suggest you read the calibre template language tutorial in the Calibre User Manual

BR
BetterRed is offline   Reply With Quote
Old 07-13-2017, 10:14 PM   #14
niijii
Member
niijii began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Jul 2017
Location: Minnesota
Device: Kindle Voyage & Kindle Fire
{series}{series_index:0>2s| [|] }{title} Guessed! And it worked! Thank you.

Last edited by niijii; 07-13-2017 at 11:03 PM. Reason: trying to find a light at the end of the tunnel
niijii 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
Calibre book adding: Regular expression request... Spiffy Calibre 34 01-19-2016 02:03 PM
regular expression to convert character when adding book comox Library Management 4 08-23-2014 02:15 PM
Regular Expression adding book published date jbcmars Calibre 2 01-08-2011 10:23 PM
Adding Books, regular expression smarties86 Calibre 4 12-19-2010 09:18 AM
Regular Expression on adding books. Lokro Calibre 4 11-06-2010 12:05 PM


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


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