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 10-24-2009, 03:16 PM   #1
stustaff
Wizard
stustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it is
 
Posts: 1,055
Karma: 2110
Join Date: Nov 2007
Location: Derbyshire UK
Device: sony reader PRS505 and 600
Help with adding books please

Ok I am trying to add my books which I have in my own file and folder system to calibre.

I can add them however I think I can do better!

eg at the moment the author and title are ALWAYS the wrong way round, and the series data gets messed up.

I can see why calibre does this but cant work out how to change it...

So here is how my books are named there are unfortunately a couple of variables..

Author - Series - Series2 - Booktitle

Series options are not always there so sometimes will just be Author - BookTitle and sometimes it will be Author - Series - Title

The reason a series2 text may be there is if say a book is part of a series within a series eg the death novels within the discworld would be Terry Pratchett - Discworld - Death 01 - Mort

here are a few examples
David Gemmell - Drenai 01 - Druss 01 - Legend
Dean R. koontz - Velocity
Eoin Coifer - Artemis Fowl 01 - Artemis fowl

I have tried within Calibre preferences to alter the 'regular expression' under add books but dont really understand it and pressing test does nothing?

Thanks for any suggestions.
stustaff is offline   Reply With Quote
Old 10-24-2009, 03:29 PM   #2
stustaff
Wizard
stustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it is
 
Posts: 1,055
Karma: 2110
Join Date: Nov 2007
Location: Derbyshire UK
Device: sony reader PRS505 and 600
Ok I had a look around and found this

(?P<author>[^_-]+) -?\s*(?P<series>[^_0-9-]*)(?P<series_index>[0-9]*)\s*-\s*(?P<title>[^_].+) ?

which does pretty much everything I want But the title is getting messed up

eg
Eoin Coifer - Artemis Fowl 01 - Artemis fowl

gives the book a title of 'artemis' everything else is spot on.

hmm puzzled?

and Eoin Coifer - Artemis Fowl 02 - The Artic Incident
gives me a title of 'The Artic'

Last edited by stustaff; 10-24-2009 at 03:33 PM.
stustaff is offline   Reply With Quote
Old 10-24-2009, 04:07 PM   #3
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: 43,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
replace the series bit with

(?P<series>[^_0-9 -]*)
kovidgoyal is offline   Reply With Quote
Old 10-24-2009, 04:43 PM   #4
stustaff
Wizard
stustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it is
 
Posts: 1,055
Karma: 2110
Join Date: Nov 2007
Location: Derbyshire UK
Device: sony reader PRS505 and 600
Thanks Kovid all sorted.
stustaff is offline   Reply With Quote
Old 10-24-2009, 05:03 PM   #5
stustaff
Wizard
stustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it is
 
Posts: 1,055
Karma: 2110
Join Date: Nov 2007
Location: Derbyshire UK
Device: sony reader PRS505 and 600
spoke too soon

these style are causing me problems

STAR TREK - TNG - 01 - Ghost Ship_624

which works ok but Id like to be able to remove the '_624'

also
STAR TREK - DS9 - 01 - Emissary_512

gives me a series entry of 'DS [9]' rather than series 'DS9 [1]

Im happy with 'Star Trek' as the author as I dont have the author in the filename

Also I have another series that looks like 'Star Wars - _New Jedi Order 01_ - Vector Prime (by R A Salvatore)_937'
gives me a title of
'_New Jedi Order 01_ - Vector Prime (by R A Salvatore)_937' and star wars as the author.

I'd like in this style 'star wars' as a tag and it to pull the author from between the (by **)
stustaff is offline   Reply With Quote
Old 10-26-2009, 03:00 PM   #6
stustaff
Wizard
stustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it is
 
Posts: 1,055
Karma: 2110
Join Date: Nov 2007
Location: Derbyshire UK
Device: sony reader PRS505 and 600
Is there an idiots guide to this stuff somewhere so i can read up to try and fix the above?

Thanks
stustaff is offline   Reply With Quote
Old 10-26-2009, 03:13 PM   #7
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: 43,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Not quite an idiots guide, I'm afraid. Basically, you have to learn to use regular expressions. Here's a guide to regular expressions

http://docs.python.org/library/re.html
kovidgoyal is offline   Reply With Quote
Old 10-27-2009, 08:39 AM   #8
stustaff
Wizard
stustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it is
 
Posts: 1,055
Karma: 2110
Join Date: Nov 2007
Location: Derbyshire UK
Device: sony reader PRS505 and 600
Quote:
Originally Posted by kovidgoyal View Post
Not quite an idiots guide, I'm afraid. Basically, you have to learn to use regular expressions. Here's a guide to regular expressions

http://docs.python.org/library/re.html
Ok complicated!?



I have had a go though but havent had chance to test.

what does anyone think of the chances that this would work for the following file name,types.

STAR TREK - DS9 - 01 - Emissary_512

STAR TREK - TNG - 01 - Ghost Ship_624

(?P<author>[^_-]+) -?\s*(?P<series>[^_-]*)\s*-\s*(?P<series_index>[0-9]*)\s*-\s*(?P<title>[^_]+) ?
stustaff is offline   Reply With Quote
Old 10-27-2009, 11:52 AM   #9
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: 43,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can test it using the calibre preferences dialog. Just enter the expression and the filename and click test
kovidgoyal is offline   Reply With Quote
Old 10-27-2009, 12:29 PM   #10
stustaff
Wizard
stustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it is
 
Posts: 1,055
Karma: 2110
Join Date: Nov 2007
Location: Derbyshire UK
Device: sony reader PRS505 and 600
Quote:
Originally Posted by kovidgoyal View Post
You can test it using the calibre preferences dialog. Just enter the expression and the filename and click test
Sorry Kovid but that doesnt work as i explained in first post

When I press test nothing happens?

I am using OSX on a mac mini core duo- latest version of calibre.
stustaff is offline   Reply With Quote
Old 10-27-2009, 12:33 PM   #11
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: 43,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Ah it's probably broken. Fix will be in next release.
kovidgoyal is offline   Reply With Quote
Old 10-27-2009, 12:34 PM   #12
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: 43,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Just tried it, it works. Note that you test filename must have an extension

So

test.epub will work

test

wont
kovidgoyal is offline   Reply With Quote
Old 10-27-2009, 02:30 PM   #13
stustaff
Wizard
stustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it isstustaff knows what time it is
 
Posts: 1,055
Karma: 2110
Join Date: Nov 2007
Location: Derbyshire UK
Device: sony reader PRS505 and 600
Quote:
Originally Posted by kovidgoyal View Post
Just tried it, it works. Note that you test filename must have an extension

So

test.epub will work

test

wont
That will be why!

Thanks so much
stustaff 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
Adding properties to books IzzyMad Workshop 3 10-15-2010 11:05 AM
Adding PDF books Sweetpea Calibre 15 09-21-2010 12:03 PM
Adding new books problem Flub Calibre 6 12-24-2009 11:39 AM
Problems adding books in 0.6.5 lalawe Calibre 8 08-11-2009 12:46 PM
Error adding books Gfinch Calibre 2 08-03-2008 08:36 PM


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


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