09-09-2012, 01:29 AM | #1 |
Junior Member
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 |
09-09-2012, 04:45 AM | #2 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
|
|
09-09-2012, 08:17 AM | #3 |
Enthusiast
Posts: 30
Karma: 752
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>[^)]+)\) 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. |
09-09-2012, 02:06 PM | #4 |
Junior Member
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.
|
09-09-2012, 02:10 PM | #5 |
Grand Sorcerer
Posts: 12,165
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
|
09-09-2012, 02:13 PM | #6 |
Junior Member
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.
|
09-09-2012, 02:19 PM | #7 | |
Well trained by Cats
Posts: 29,795
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:
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}) |
|
|
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 |