![]() |
#31 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
use the greedy version: Code:
([^,]*),\s(.*) Code:
\2 \1 |
|
![]() |
![]() |
![]() |
#32 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,860
Karma: 7036057
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
There is no trigger that will automatically update the title field when you change the series. In fact, the series information probably shouldn't be in the 'real' title field, but that is an argument that I don't want to get in to. What you should do is create a custom composite field (field made from other fields). Call it mytitle or some such. For the template, use Code:
{series}{series_index:0>2s| | - }{title} Create as many of these fields as you want. For example, create one for myauthor that puts the series there. Create one that is myeverything that includes series, title, author, isbn, and publication date. Lots of possibilities. ![]() |
|
![]() |
![]() |
Advert | |
|
![]() |
#33 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#34 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
I agree - there is no way to avoid this. You must do either: 1) S&R, or 2) import once with the swap option on for books that need it and once with it off for the rest.
|
![]() |
![]() |
![]() |
#35 |
Enthusiast
![]() Posts: 43
Karma: 10
Join Date: Jun 2010
Device: Kindle 3
|
ok, about the series being displayed in the title, i have lost the real reason of why it is not displayed in the title. so it can successfully download the metadata. i have spent so many hours doing it one by one copying and pasting that i missed that the series info is displayed in the series field. i literally spent all of yesterday inputing hundreds of books, using the regex you guys gave me i was able to input a few hundred already today with minimal effort and no copy and pasting. i am leaving the titles without the series info in them and my life has become so much easier. i am just going to make a new column as you suggested.
i am so happy right now, and everything is sailing smoothly. there is just one thing i have noticed but really i don't care because it is a kind of small issue: when i input a book that has a series name but no series number the series name appears in the {Title} field, for example: Foster, Alan Dean - Aliens Vs Predator - War turns into: Aliens Vs Predator - War {Title} Foster, Alan Dean {Author(s)} there are very few books with a series name without a number so i am not the least bit worried about this. you guys absolutely rock! thanks for the help! i am going to donate a dollar to calibre on each of your names ![]() p.s.s i must add that alan foster is not actually the author of the book war that i used as an example. Last edited by dkritso109; 10-04-2010 at 01:28 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#36 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
|
|
![]() |
![]() |
![]() |
#37 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
If you're using the regexp kacir posted earlier, try this modification:
Code:
(?P<author>[^-]+)( - \[?(?P<series>[^-]+)(\[| )*(?P<series_index>[0-9]+)?\]?)? - (?P<title>.+) And go read that tutorial I keep talking about! It's why it's there. |
![]() |
![]() |
![]() |
#38 |
Enthusiast
![]() Posts: 43
Karma: 10
Join Date: Jun 2010
Device: Kindle 3
|
nice work, that definately fixed the un-numbered series so it doesn't end up in the title, but there's a weird side effect. in the {Series} field when i input this for example:
Bunch, Chris - Legion 01 - The Last Legion this is what comes up in the {Series} field: Legion 01 [1] when i input this: Bunch, Chris - Legion 02 - Firemask this comes up in the {Series} field: Legion 02 [1] notice that the numbers are outside the brackets and the 1 appears in all of them in the brackets. this happens to all of them in the series. this is what it looks like with the prior regexp: Legion [1] Legion [2] other than that it's perfect. it is a little annoying, but it's purely cosmetic. whereas earlier when i input: Bunch, Chris - Legion - Firemask this is what pops up in the {Title} field: Legion - Firemask {Title} notice that i left the number out this time? this keeps the metadata from automaticaly downloading, and i have to get in there and delete "Legion - ". hence, not cosmetic ![]() your revised regexp makes that same filename pop up like this: Firemask {Title} Legion {Series} but again like i pointed out earlier, if there is a number in the series (which there usually is) then i get this "[1]" next to every series name and number. it's always "[1]". |
![]() |
![]() |
![]() |
#39 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
Yeah, that's because I misjudged the quantifiers greediness, I think. I might try to find a working regexp tomorrow, as it's currently really damn late here.
Until then, remember that tutorial I keep going on about? Go read it. Seriously. It's worth it. |
![]() |
![]() |
![]() |
#40 |
Enthusiast
![]() Posts: 43
Karma: 10
Join Date: Jun 2010
Device: Kindle 3
|
thanks for the help, you have a good night. i have been glancing at the tutorial all day, will give it a good study later. i'm kinda all calibre'd out myself. been working on this non-stop since yesterday, and still only like 50% done.
|
![]() |
![]() |
![]() |
#41 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Try this: Code:
^((?P<author>([^\_\-0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?((?P<series>[^0-9\-]+) ([-#] ?)?(?P<series_index>[0-9.]+)?\s*-\s*)?(?P<title>.+) Bunch, Chris - Legion - Firemask.pdf Bunch, Chris - Legion 01 - Firemask.pdf Bunch, Chris - Legion #02 - Firemask.pdf Bunch, Chris - Firemask.pdf |
|
![]() |
![]() |
![]() |
#42 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Just for interest - why do you want the Series field in the Calibre title field? I would have thought that it makes more sense to use the Calibre Series and series-index fields for their intended purpose.
Note that you can get the Series field added to the Filename during Send to Disk/Device operations using the filename mask, and added to the title metadata during these operations using the (recently added) Plugboard feature while still keeping the copy in the calibre library unchanged. |
![]() |
![]() |
![]() |
#43 |
Enthusiast
![]() Posts: 43
Karma: 10
Join Date: Jun 2010
Device: Kindle 3
|
i didn't know you could do that, and when i stopped keeping the series in the title my life became all that much easier. at first i assumed that the series title was lost in respect to the filename and i wanted to be able to keep track of the order of my series whe nthe books were on another device. i had no idea about the filename mask.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regular Expression Help | Azhad | Calibre | 86 | 09-27-2011 02:37 PM |
Regular Expression Help | smartmart | Calibre | 5 | 10-17-2010 05:19 AM |
Sigil 024 and regular expressions on "all HTML files" | WS64 | Sigil | 4 | 08-13-2010 07:33 PM |
Help with the regular expression | Dysonco | Calibre | 9 | 03-22-2010 10:45 PM |
Help: Is there a search expression for "books without Series"? | LARdT | Calibre | 3 | 01-20-2010 09:34 PM |