10-03-2011, 06:23 PM | #1 |
Member
Posts: 15
Karma: 10
Join Date: Oct 2011
Location: London England
Device: Kindle 4 non touch,paperwhite 10
|
Newbie question - Hardcode values on RegEx on import
Hi,
sorry if this is a real newbie question but I have had a look around and cant really locate anything suitable (though happy to be redirected if I've missed something..) I'm using Calibre 8.21 and have installed the Quick Preferences plugin as it has the ability to setup and maintain multiple import rules to rework the settings I'm after trying to set up a rule which would allow me to have hardcoded values passed in and then these added to the values inside Calibre so when I convert its setup as I'd like them.. So what I'm after is the ability to take file "a kindle book.mobi" but when its imported the title becomes AAxx - A Kindle Book and the Author becomes NewAuthor Be great if I could then add AA as the series and xx as the number (but just getting me started is appreciated!) so when I convert I end up with a file/metadata/calibre entry "AAxx - A Kindle Book - NewAuthor.mobi" (Serries AA, number xx) working example filename = 20000 Leagues under the sea.mobi my version = JV01 - 2000 Leagues Under The Sea - Jules Verne.mobi where I amend script to pass in JVxx and Jules Verne Still getting the hand of reg Expressions but assume its something similar to (?P<series>\JV\) - (?P<series_index>\01\)( - (?P<title>+)( - (?P<author>\Jules Verne\.+) (*but this is probably wrong!! but hopefully you'll get my drift...) I don't then mind occasionally amending/building new rules as and when I do a bulk import I've tried escaping the text using the \AAxx - \ codes but can't seem to get it to work so any advice/redirection elsewhere greatfully accepted.. Regards and Thanks PeterSm. |
10-04-2011, 10:55 AM | #2 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
I've occasionally wanted this, too. I usually just use Search and Replace to do it after import. |
|
Advert | |
|
Tags |
import to calibre, regexp |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regex: File Renaming Pre-Import & Importing | penguinaka | Library Management | 20 | 08-14-2012 06:11 PM |
Regex Question involving multiple . (periods) | hanbalfrek | Conversion | 11 | 08-29-2011 05:06 PM |
Regex question and maybe some help | crutledge | Sigil | 9 | 03-10-2011 04:37 PM |
Regex Question | Archon | Conversion | 11 | 02-05-2011 10:13 AM |
Import files, regex question | al35 | Calibre | 0 | 03-22-2010 12:33 PM |