09-17-2010, 10:06 AM | #16 | |
Enthusiast
Posts: 32
Karma: 44
Join Date: Jul 2010
Location: Seneca, SC
Device: Kindle, eReader
|
I should read _before_ typing. This works:
[[](?P<series>.+)[]] (?P<title>.+) - (?P<author>[^_]+) EDIT: Works perfectly in the test box but not in the actual Add Books process. Acts like the original title - author expression. Huh? Quote:
Last edited by pckopp; 09-17-2010 at 10:27 AM. |
|
09-17-2010, 10:24 AM | #17 | ||
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
If I was still struggling through my initial stages of data entry, I would have loved to have had a sticky thread with useful Python code fragments that could be executed with: Quote:
It would have a first post saying there's no bulk undo, use at your own risk, make a backup first, etc. Then some scripts like: Regex search and replace in title or author. Populate a field with the contents of other fields or data. etc. People could add scripts, as they do recipes, as they're written. I clearly remember my frustration when I couldn't easily directly modify the metadata.db SQL database to do regex searches and fix miscellaneous errors in title/author. I have to say that in view of the many recent improvements in Calibre, I want such scripts a lot less (plus I'm no longer actively adding my old ebook library). Still, I have no problem with providing some options (outside the Calibre installed environment) to help the most sophisticated Calibre users who are willing to run at the bleeding edge and take the consequences. Last edited by Starson17; 09-17-2010 at 10:28 AM. |
||
Advert | |
|
09-17-2010, 03:15 PM | #18 |
Junior Member
Posts: 8
Karma: 10
Join Date: Sep 2010
Device: irex iliad, htc hd2
|
And that chaley would really be perfect.
Throw a regexp in the mix, for the regexp people on this planet, and it would do the job. By the way, I recognize the regexp issues, not that many people know how to create them. With respect to python scripts. They could almost serve as a kind of small apps which the community can add to Calibre. When apps become popular, simply add them as feature to calibre. But a bit of basic plumbing and community attention is required, like - some small examples - a menu ability in Calibre - which adds for instance the ability to run it against a selection of books (not sure how to do that from the command line) - a place to post them - a means to add review comments, etc - moderation and management While the first and second items are relatively easy to achieve, the rest requires far more attention and work to pull it off. Not sure how this worked for the news sources, probably that is the best example. Last edited by gwk; 09-17-2010 at 03:32 PM. |
09-17-2010, 03:23 PM | #19 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
It will be in today's release, marked as experimental. Backup your library before hacking. |
|
09-17-2010, 03:41 PM | #20 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Last edited by Starson17; 09-17-2010 at 03:43 PM. |
|
Advert | |
|
09-17-2010, 03:48 PM | #21 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
In effect, you are asking for some kind of scripting language that supports some level of transform on fields, including copying from one to another. There be dragons here. Such languages never stop growing. It seems more reasonable to use python plugins for this. Thought is required. |
|
09-17-2010, 03:56 PM | #22 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
That's a very good post. I've already noticed a rise in threads about regexp matching for header/footer removal and such, asking just about the same questions all the time. (I actually thought about writing a tutorial, but seeing as I'm just beginning to understand them, I might not be the right guy for that. I haven't fully groked how to cope with linebreaks and somesuch...)
That being said, I really like your mockup. Provided it understands regular expressions as well as "normal" strings (wait, that would be a regular expression in itself... nevermind), it's a gorgeous and, I think, very powerful feature. |
09-17-2010, 04:02 PM | #23 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
No, although the ability to work on a copy of a field would be nice. It's merely that I occasionally have wanted to move field contents around.
Quote:
|
|
09-17-2010, 04:15 PM | #24 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
09-17-2010, 04:19 PM | #25 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
In any event, I think you are suggesting something like: 0. verify that source and dest have the same multiplicity. 1. get value from source 2. process it with regexp, taking into account multiplicity 3. store result in dest. |
|
09-17-2010, 04:23 PM | #26 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Good. Nice to know I don't need to beg Kovid to yank it from the release he is in process of making.
Quote:
|
|
09-17-2010, 04:34 PM | #27 |
creator of calibre
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Well even if it does a resort there's no reason it cant reselect the previously selected entries once its done.
|
09-17-2010, 04:34 PM | #28 | |||
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Quote:
Quote:
|
|||
09-17-2010, 04:36 PM | #29 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
If you are OK with this, I will look at doing it. One rule: I don't think we should select items that are no longer visible. |
|
09-17-2010, 04:41 PM | #30 |
creator of calibre
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Yeah, I'm fine with it. You'll need to add select_row function to BooksView analogous to the set_current_row.
|
Tags |
metadata, replace, search |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CALIBRE WILL NOT RECOGNISE TITLES OR AUTHORS | D.. | Calibre | 5 | 09-14-2010 09:33 PM |
Classic PDF titles and authors on nook? | slothrop | Barnes & Noble NOOK | 2 | 12-09-2009 09:23 PM |
Issues Editing Titles & Authors | kmvargo | Calibre | 0 | 07-05-2009 12:43 AM |
Authors/Titles different font sizes | bunjibear | Sony Reader | 6 | 03-15-2009 10:41 AM |
Changes in Titles/Authors Not Shown | Ralob | Bookeen | 20 | 04-07-2008 08:16 AM |