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

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 09-09-2012, 01:29 AM   #1
Lazarus416
Junior Member
Lazarus416 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Sep 2012
Device: Kindle Keyboard
Need some help with "add book" regexp

Ok, I will apologize in advance as I have no doubt that someone out there has probably already posted these regexp out there, but I work 10-12 hours days, and then come home to several hours worth of college papers, a disabled wife and three kids. I love my life, but it does not leave me with enough time to learn how to do these expressions on my own or to search through hundreds of previous posts looking for the right one.

A couple of years ago I bought a Kindle to take with me on a year long deployment (best investment ever) and a friend gave me a 100+Gb database of books. Since then I have dabbled with Calibre, adding books when I can and hand correcting them. Then someone pointed out what I could do with expressions and I erroneously thought it would be easy. Now I am looking for expert help to come up with the expressions I need. I will copy and paste them into a Word doc so that I have them available in the future and not have to ask for the same ones over and over.

Currently I am working on adding the Star Wars books to my db. They come in 2 formats (with and without series info):

Star Wars - [Adventure Journal 01] - A Glimar of Hope (by Charlene Newcomb).pdf

and

Star Wars - A Forest Apart (by Troy Denning).pdf

I would like to use the "Star Wars" as a tag, but if there is no way to do this with an expression, then I am ok just dropping it and mass tagging later. (RegExp would be easiest though as all 269 of these files are currently in one folder). Thank you very much in advance for any help provided.

Laz

P.S. Something that just crossed my mind. Since the Kindle can't read the Metadata to tell me what series# a book is, I always preface my titles with the series and # prior to the actual title so that all of my books will show up in series order on my kindle list. Is there a way to do this with the expressions? It would save me SO many hours of copy/paste. Again, thank you in advance.

Last edited by Lazarus416; 09-09-2012 at 01:47 AM. Reason: An additional question
Lazarus416 is offline   Reply With Quote
Old 09-09-2012, 04:45 AM   #2
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,809
Karma: 12535517
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by Lazarus416 View Post
P.S. Something that just crossed my mind. Since the Kindle can't read the Metadata to tell me what series# a book is, I always preface my titles with the series and # prior to the actual title so that all of my books will show up in series order on my kindle list. Is there a way to do this with the expressions? It would save me SO many hours of copy/paste. Again, thank you in advance.
I can't help you on the regular expressions but can give you some advice about library management. I find it best to keep everything in the library in their proper fields then use the metadata plugboard to place the series info in front of the title on the fly while sending the books to the device. This way your titles in your library are correct and you also get preface the titles with the series info on your device.
DoctorOhh is offline   Reply With Quote
Old 09-09-2012, 08:17 AM   #3
JustForFun
Enthusiast
JustForFun began at the beginning.
 
Posts: 29
Karma: 10
Join Date: Nov 2010
Device: PB360
Try this:
Code:
Star Wars\s+-\s+(\[(?P<series>.+?)(\s+(?P<series_index>[0-9]+))?\]\s+-\s+)?(?P<title>[^(]+)\s+\(by\s+(?P<author>[^)]+)\)
There seems to be no way to set a tag so you will have to set the tag manually after importing your books.

EDIT:
You can set the tag by setting Preferences / Adding books / Tags to apply when adding a book to your desired tag(s) before importing your books. Don't forget to reset this after all books are imported.

Last edited by JustForFun; 09-09-2012 at 08:50 AM.
JustForFun is offline   Reply With Quote
Old 09-09-2012, 02:06 PM   #4
Lazarus416
Junior Member
Lazarus416 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Sep 2012
Device: Kindle Keyboard
Metadata Plugboard

How do you use the metadata plugboard? I have never used it before. If I can make the software plug in the series in front of the title when it sends to the Kindle, I would be happy to leave it off the library title. I didn't like doing it the way I did, cause it messes up the metadata/cover downloads, but I have not been able to figure out any other way to list it the way I need to in the Kindle.
Lazarus416 is offline   Reply With Quote
Old 09-09-2012, 02:10 PM   #5
PeterT
Taking a break; Fed up
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.
 
PeterT's Avatar
 
Posts: 6,687
Karma: 43902502
Join Date: Nov 2007
Location: Toronto
Device: Wife: Touch, Arc, Vox Me: Nexus 7, Glo
See Techniques to use plugboards, custom columns and templates
PeterT is online now   Reply With Quote
Old 09-09-2012, 02:13 PM   #6
Lazarus416
Junior Member
Lazarus416 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Sep 2012
Device: Kindle Keyboard
@ JustForFun

@ JustForFun: Thank you, that RegExp works perfectly for both of them. I will try it with some other books as well when I get a chance. The database my friend gave is a mismash of anything and everything that he had downloaded at the time. Lots of dupes and different formats. Hence the slow years long effort to consolidate and clean up.
Lazarus416 is offline   Reply With Quote
Old 09-09-2012, 02:19 PM   #7
theducks
Grand Sorcerer
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: 14,499
Karma: 5567061
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Lazarus416 View Post
How do you use the metadata plugboard? I have never used it before. If I can make the software plug in the series in front of the title when it sends to the Kindle, I would be happy to leave it off the library title. I didn't like doing it the way I did, cause it messes up the metadata/cover downloads, but I have not been able to figure out any other way to list it the way I need to in the Kindle.
Have you looked at the Form (Preferences: Metadata Plugboards if the Icon has been removed)?
It is pretty self guiding;
Create a new (name it) board , Set the device it is to be used with,
Use the Calibre Template format http://manual.calibre-ebook.com/template_lang.html, or the simplified version in Send to Device
Code:
{series} - {title} (by {authors})
theducks 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
"Add book" only convert english? read365 Library Management 1 05-22-2012 08:24 AM
Tags appearing when "Add Empty Book" fio_smiles Library Management 2 03-11-2011 03:43 AM
Add books to "Empty Book" SmiLynnLady Library Management 8 02-10-2011 09:32 AM
Calibres "Add merge book feature" in the new release SirBC Calibre 8 05-04-2010 12:11 AM
New "E-Book Devices" "Bookeen Opus" forum desired ericch Bookeen 3 08-06-2009 06:31 PM


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


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