![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Aug 2011
Device: Kindle
|
Help with Regexp for importing Magazines
Hi,
I am trying to import magazines into calibre and I want to have the Year imported into Series and Month (in numerical form) into Series Index. The filenames are in the form of Analog Science Fiction and Fact, 2008-03, March 2008.mobi Analog Science Fiction and Fact, 2008-01, January-February 2008.mobi but I could rename them to the following form if that's easier Analog Science Fiction and Fact - 2008-03 - March 2008.mobi I was using the following regexp (?P<title>.+) ?\s*(?P<series>[0-9][^_-]+) -?\s*(?P<series_index>[0-9]*)\s*-\s* and test filename Analog Science Fiction and Fact - 2008-03 - March 2008.mobi But it includes the year as part of the title and puts the number of the month into the series instead of the series index. Can any kind soul offer me some help please |
![]() |
![]() |
![]() |
#2 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,897
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
I also created series hierarchy to sort in order Last edited by theducks; 07-31-2012 at 09:57 AM. Reason: updated Image |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Code:
(?P<title>.+), (?P<series>[0-9]+)-(?P<series_index>[0-9]+) Last edited by Starson17; 08-24-2011 at 10:54 AM. |
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Aug 2011
Device: Kindle
|
Starson,
Thank you for your help. That works just the way I want it to. You've saved me hours of manually entering the information myself. Last edited by donnelyn; 08-24-2011 at 10:56 AM. |
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Aug 2011
Device: Kindle
|
theducks,
Thank for pointing out the duplicate issue I will rename my files to get around that. e.g. Analog Science Fiction and Fact September 2010, 2010-09.mobi Last edited by donnelyn; 08-24-2011 at 10:36 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regexp help - I think... | paulfiera | Calibre | 4 | 07-20-2011 03:27 AM |
RegExp in search field | Format C: | Library Management | 4 | 06-13-2011 11:00 AM |
Is this as it supposed to be? (Regexp issue?) | Mixx | Calibre | 13 | 03-09-2011 03:30 AM |
Error in Regexp documentation | arifzaman | Calibre | 3 | 03-02-2011 06:03 AM |
Multiple line regexp | janvanmaar | Calibre | 19 | 11-02-2010 01:02 PM |