Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 12-12-2015, 05:11 AM   #1
r2d256
Junior Member
r2d256 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Sep 2014
Device: none
Extend work the regular expression to filename

Hello,
Is in new versions calibre is possible to extend operation of regular expression for filenames?

Oversize image added as attachment.
Attached Thumbnails
Click image for larger version

Name:	2m3frsk.jpg
Views:	219
Size:	93.3 KB
ID:	144574  

Last edited by issybird; 12-12-2015 at 08:40 PM.
r2d256 is offline   Reply With Quote
Old 12-12-2015, 08:26 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,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
No, you can't.

Is there any reason a simple rename with an incremented suffix, isn't enough?
eschwartz is offline   Reply With Quote
Advert
Old 12-13-2015, 07:25 AM   #3
MerlinMama
Evangelist
MerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beauty
 
MerlinMama's Avatar
 
Posts: 498
Karma: 32554
Join Date: May 2014
Location: Canada
Device: Kobo Sage
Bulk rename is the best you can do unless you want to go through one by one.
MerlinMama is offline   Reply With Quote
Old 12-13-2015, 12:31 PM   #4
r2d256
Junior Member
r2d256 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Sep 2014
Device: none
I often use renaming files. I'm probably in a minority, but probably will be a few more using this. But if they can not, it does not. Too bad that you do not see the benefits of this functionality.
r2d256 is offline   Reply With Quote
Old 12-13-2015, 12:36 PM   #5
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,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Well, so far bulk rename with an incrementing suffix has done everything I needed it to do -- mostly because I want a prefix and an incrementing suffix.


But you haven't actually explained a use case where renaming via regular expressions works better for you. So it is hard for anyone to see the benefits you see.

Now, if you would like to explain why you want it, perhaps you will convince @kovidgoyal of the need.
eschwartz is offline   Reply With Quote
Advert
Old 12-13-2015, 02:32 PM   #6
r2d256
Junior Member
r2d256 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Sep 2014
Device: none
Unfortunately, I do not have the gift of persuasion. Because how do you convince to things for me so obviously, and for other unnecessary.
Very sorry for my English. Sometimes go out nonsense.
Best regards, Jan
r2d256 is offline   Reply With Quote
Old 12-13-2015, 02:37 PM   #7
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,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Skip the persuasion and try explanation.
eschwartz is offline   Reply With Quote
Old 12-13-2015, 11:31 PM   #8
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,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by r2d256 View Post
Unfortunately, I do not have the gift of persuasion. Because how do you convince to things for me so obviously, and for other unnecessary.
OK, we can't use regex to rename the files. But, what is the regex you want to run on these? Looking at the file list, I can't think what it would be, so I'm curious. Knowing what the desired result is might explain why regex is a good idea. Or make us think of alternative ways of achieving this.

And don't forget an epub is a zip file. You can unpack it, do the renaming using other tools and then zip it up again.

Last edited by davidfor; 12-14-2015 at 12:09 AM. Reason: No, that isn't a good idea.
davidfor is offline   Reply With Quote
Old 12-14-2015, 12:01 AM   #9
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,507
Karma: 78910112
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Quote:
Originally Posted by davidfor View Post
And don't forget an epub is a zip file. You can unpack it, do the renaming using other tools and then zip it up again.
But surely if you do that you have all the references within the epub file to update as well..
PeterT is offline   Reply With Quote
Old 12-14-2015, 12:08 AM   #10
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,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by PeterT View Post
But surely if you do that you have all the references within the epub file to update as well..
I have no idea what I was thinking.
davidfor is offline   Reply With Quote
Old 12-14-2015, 02:36 AM   #11
r2d256
Junior Member
r2d256 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Sep 2014
Device: none
Calibre is a powerful combine harvester. It has so many things, even unnecessary. And all throwing themselves at me when I suggest something useful. What's with you people?
I suggest a "real chocolate" and you say that this "chocolate-like product" is awesome?
r2d256 is offline   Reply With Quote
Old 12-14-2015, 03:34 AM   #12
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,627
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
The problem is we do not catch why it is useful, so people is asking for an example where the current tool is not enough and this comes in handy.
Terisa de morgan is online now   Reply With Quote
Old 12-14-2015, 05:25 AM   #13
MerlinMama
Evangelist
MerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beauty
 
MerlinMama's Avatar
 
Posts: 498
Karma: 32554
Join Date: May 2014
Location: Canada
Device: Kobo Sage
Quote:
Originally Posted by r2d256 View Post
Calibre is a powerful combine harvester. It has so many things, even unnecessary. And all throwing themselves at me when I suggest something useful. What's with you people?
I suggest a "real chocolate" and you say that this "chocolate-like product" is awesome?
All we want is why your consider yours 'real' chocolate. How are we supposed to know or help if we can't see it? We've shown our suggestion: Bulk rename. It will do the following. Change:

-file0001
-file0002
-file0003

to :

-Your-choice1
-Your-choice2
-Your-choice3

all at once in one shot, whether you have 3 files or 50 files.

Do you want it to have incremental letters instead of numbers? Do you want each file to have a completely different name? (Although I can't see how a regex would help with that at all)

Just help us to understand your need
MerlinMama is offline   Reply With Quote
Old 12-14-2015, 09:26 AM   #14
Thom*
The Fumbler
Thom* began at the beginning.
 
Posts: 66
Karma: 10
Join Date: Jun 2015
Device: android 4.2/fbreader
Wouldn't it be neat if you could call the rename function, or the split function, or any other function from a regex-function. Then this would be flexible and easily accomplished.
Thom* is offline   Reply With Quote
Old 12-14-2015, 09:39 AM   #15
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Thom* View Post
Wouldn't it be neat if you could call the rename function, or the split function, or any other function from a regex-function. Then this would be flexible and easily accomplished.
And that way exists, it is called plugins. http://manual.calibre-ebook.com/crea...t-book-plugins

A regex function operates on matched text, in the context of a single file at a time, it does not make sense to do arbitrary processing from within it.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Regular Expression - Adding metadata from filename LMF Calibre 1 03-20-2012 06:46 PM
Regular Expression Help iKarampa Calibre 13 12-15-2010 07:17 AM
Regular expression help krendk Calibre 4 12-04-2010 04:32 PM
Regular Expression Help smartmart Calibre 5 10-17-2010 05:19 AM
What is the default regular expression for filename import? palex481 Calibre 2 03-22-2009 06:11 PM


All times are GMT -4. The time now is 09:22 AM.


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