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 04-28-2020, 07:11 PM   #1
ToBiku
Junior Member
ToBiku began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2020
Device: PocketBook
“Saving to disk” – How to save books with a shorter title length in filename?

Hello,

I intend to save my books from Caibre library to a disk and I’m using the function “Save to disk”. Sometimes the result is a very long EPUB filename, mainly due to the title length of some books, e.g.:

“The Language of Emotional Intelligence: The Five Essential Tools for Building Powerful and Effective Relationships”

I’m looking for a automatic way to save book title with a shorter length.

I looked in “Calibre User Manual” but the only thing I found was only how to limit the length by predefining a fix length, an this do not answer to my needs… I also search in this forum without success… (just in case I miss it, can you please inform me the post? Thanks !)



[Request]

Can someone can help me with the regular expressions I must use in field {title} to ignore punctuation mark ":" and after from title metadata:

From:
“The Language of Emotional Intelligence: The Five Essential Tools for Building Powerful and Effective Relationships”

To:
“The Language of Emotional Intelligence”

Thanks in advance,
ToBiKu
ToBiku is offline   Reply With Quote
Old 04-28-2020, 07:34 PM   #2
theducks
Well trained by Cats
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: 29,924
Karma: 55705602
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
I created a SubTitle field (Text: Shown in Tag Browser) and Cut and pasted (manual), leaving the Title
Not Automatic is not fool proof. There are titles WITH Colons
theducks is offline   Reply With Quote
Advert
Old 04-29-2020, 07:12 AM   #3
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: 20,650
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none


Lookup name: strapline
Column heading: Strapline
Column type: Long text, like comments, not shown in the Tag browser
Column heading: Show heading to the side of the text
Interpret this column as: Short text, like a title

BR
BetterRed is offline   Reply With Quote
Old 04-29-2020, 10:49 PM   #4
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: 24,906
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
@ToBiku: You could use the following to get just whatever is in the title before the colon:

Code:
{title:sublist(0,1,:)}
But, I tend to agree with the others. Looking at my library, anything with a colon in the title would be meaningless without what is after the colon. Or a duplicate title.

It also depends on why you are doing this. If your library has a lot of books like your example, where what is after the colon is more of a subtitle, then I would split it.

If the problem is that the file name length, you can look at the template function "shorten". With this you have a bit of control over how the title is shortened to fit. I think calibre is using this on the file names if the full path is going to exceed 254 characters (I think it's 254).
davidfor is offline   Reply With Quote
Old 04-30-2020, 04:14 AM   #5
ToBiku
Junior Member
ToBiku began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2020
Device: PocketBook


[SOLVED]


Thanks theducks, BetterRed and davidfor for your replies.

@davidfor, you saved my day! Your proposed code answer to my needs.
@theducks, @BetterRed, your proposals are good ones, but I want to avoid manual data entering.

I’m reading mainly non-fictional business books - a lot of them have a subtitle, and sometimes more than one author. Some examples:

The Brain That Changes Itself: Stories of Personal Triumph From the Frontiers of Brain Science
The Gamification Revolution: How Leaders Leverage Game Mechanics to Crush the Competition
The Start-Up of You: Adapt to the Future, Invest in Yourself, and Transform Your Career
The Advantage: Why Organizational Health Trumps Everything Else in Business

And so on…

When applying a Save to disk “{title} ({pubdate}, {publisher}) {authors}” get a little bit of a mess for my taste…

Maybe as a possible functionality, we may consider:
a) a standard subtitle field in “Basic metadata”
b) the “Title sort” will ignore the subtitle
… just some ideas

ToBiKu

Last edited by ToBiku; 04-30-2020 at 04:19 AM.
ToBiku is offline   Reply With Quote
Advert
Reply

Tags
save to disc options, title length


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Save to disk title sort order different for series vs standalone books? threebluestars Library Management 0 01-06-2020 11:36 PM
Saving to Disk - Problems with Title gescher Library Management 1 12-16-2018 12:21 PM
How to save books to disk by Author - Title? (Non Calibre folders) geza Library Management 2 08-04-2018 11:10 AM
Saving to disk ebook with filename that includes amazon or asin freemann Library Management 4 11-10-2014 02:36 PM
Save to disk generate wrong filename abuck Conversion 2 10-14-2013 01:00 AM


All times are GMT -4. The time now is 11:57 AM.


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