Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-16-2012, 10:16 AM   #1
ippopom
Enthusiast
ippopom began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Mar 2010
Device: palm tungsten T5
Question how to subctract a part of filename ??

Hi to all

I'm trying to import some ebook in my library.
Using regular expression to exctract author and title from filename ((?P<author>[^_]+) - (?P<title>.+)) work fine but I need to subctract a string from filename that is not part of the title but it repeat in all filenames.

Under an example:

David Green - The great war (philiph collection)

importing this ebook the result is:

Author: David Green ....that is ok
Title: The great war (philip collection)

I need to avoid the string :"(philip collection)" from all imported ebook.

Is there a way to do that ?

really TnX in advance for help.

By Ippopom
ippopom is offline   Reply With Quote
Old 12-16-2012, 11:17 AM   #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,799
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by ippopom View Post
Hi to all

I'm trying to import some ebook in my library.
Using regular expression to exctract author and title from filename ((?P<author>[^_]+) - (?P<title>.+)) work fine but I need to subctract a string from filename that is not part of the title but it repeat in all filenames.

Under an example:

David Green - The great war (philiph collection)

importing this ebook the result is:

Author: David Green ....that is ok
Title: The great war (philip collection)

I need to avoid the string :"(philip collection)" from all imported ebook.

Is there a way to do that ?

really TnX in advance for help.

By Ippopom
The bulk metadata editor has a search and replace (on a tab).

do you know REGEX ?
\(.+\) should trap the paren and contents, you will need more patterns
theducks is offline   Reply With Quote
Advert
Old 12-16-2012, 12:08 PM   #3
ippopom
Enthusiast
ippopom began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Mar 2010
Device: palm tungsten T5
Sorry theducks but I don't understand your answer .... (my English level I suppose sorry again)
ippopom is offline   Reply With Quote
Old 12-16-2012, 12:31 PM   #4
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
theducks is suggesting you remove the offending text from the title after it is imported, by using the bulk metadata editor. Look in Edit metadata > Edit metadata in bulk -> Search and replace.

In your case replacing " (philip collection)" with nothing should be all you need.
wallcraft is offline   Reply With Quote
Old 12-16-2012, 12:35 PM   #5
ippopom
Enthusiast
ippopom began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Mar 2010
Device: palm tungsten T5
tnx both for answer. I found the option in bulk metadata and I'll try (after a backup .
ippopom is offline   Reply With Quote
Advert
Old 12-16-2012, 03:46 PM   #6
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,799
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by ippopom View Post
tnx both for answer. I found the option in bulk metadata and I'll try (after a backup .
Backups are good
specially when trying new stuff.

good luck The nice thing about the Bulk Search and replace tool, is you can see the results before you commit
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mini Part Broken Screen - Is it possible to just use working part? retsaw Kobo Developer's Corner 4 12-15-2012 10:45 PM
Filename length LGN Calibre 8 10-20-2010 11:48 PM
Filename for Display? camgee Ectaco jetBook 10 05-12-2010 05:06 PM
Need help with metadata by filename artbatista Calibre 17 12-19-2009 07:51 AM


All times are GMT -4. The time now is 03:08 AM.


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