some add book regexp bugs and suggestion

Bug #1332582 reported by asllearner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

1. The tooltip on the "title" field reads "Regular Expression (?P". I believe it should read " Regular Expression (?P<title>)"

2. Do the following:
add this regex, for example:
(?P<author>.+) - (?P<title>[^(]+)[\(](?P<publisher>[^)]+)[\)]
 (this extracts the author, then after a dash the title, then the publisher in parentheses)
and test with, for example...
Woolf, Virginia - Jacob's Room (Harcourt, 0000).epub
note the publisher field: Harcourt...

Now remove "[\(](?P<publisher>[^)]+)[\)]" leaving
(?P<author>.+) - (?P<title>[^(]+)
from the regex, and use a different example, say:
Twain, Mark - Huck Finn (Vintage, 1111).epub
as the test

Note that the publisher field does not change to " no match".
I believe it should, as this makes it appear that the publisher of Huck Finn is Harcourt..., when in fact, I would expect it to be blank...

3. Suggestion:
Add comment as a possible field match, i.e. "(?P<comment>)". This would allow, as one usage, for someone to add extraneous material after the matched fields to the comment field, in case it is relevant.
(?P<author>.+) - (?P<title>[^(]+)[\(](?P<publisher>[^)]+)[\)](?P<comment>)
on
Dumas, Alexandre - Robin Hood (Penguin, 2222)French edition.epub
could put "French Edition" in the Comment Field

4. Suggestion:
Allow for more tests to be saved in the dropdown...

using latest on calibre for mac os x

aside from that, .... great job as always. Editor coming along nicely...

Revision history for this message
asllearner (3-launchpad-99-kyoto) wrote :

Perhaps I should specify that I am in the add book "The Add Process" Preferences pane.

Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.