04-07-2010, 05:21 PM | #16 |
Grand Sorcerer
Posts: 11,740
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
04-07-2010, 05:31 PM | #17 | |
Well trained by Cats
Posts: 29,799
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
I assumed this was the file used to create the original (empty) DB. Is there a altertable somewhere else? (I am NOT a SQL expert) |
|
Advert | |
|
04-07-2010, 07:49 PM | #18 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
|
|
04-07-2010, 08:29 PM | #19 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
|
04-07-2010, 08:48 PM | #20 |
Well trained by Cats
Posts: 29,799
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Thanks,
I was relying on what I thought was the current .sql create script. Something must have come along later and added additional fields. I will get sqllitespy |
Advert | |
|
04-08-2010, 03:04 AM | #21 | |
Grand Sorcerer
Posts: 11,740
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
It is worth noting that metadata is a view, so is never ALTERed. It is simply recreated as needed. |
|
04-08-2010, 09:29 AM | #22 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Congratulations, that was fast! I knew you were deep into that code.
BTW, are you aware that the back yard fence needs whitewashing? If you give me your apple core, you can have that one, too. There's a bug ticket enhancement request for remembering the regex expressions used in the Add/Save preferences when "get metadata only from filename is turned on". It would be nice for this to have a simple remembered history, like the old search history pulldown that you just rewrote. If you're up to speed on that, it might be another simple fix for you. It's ticket #4940. |
04-08-2010, 11:39 AM | #23 | |
Well trained by Cats
Posts: 29,799
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
|
|
04-10-2010, 02:54 AM | #24 |
Guru
Posts: 644
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
|
Before the date search programming goes too far... Just though I should question the validity of the date format. Internationally I know dates are frequently written as 10 Apr 2010 (or it's equivalent of 10-04-10). Would the search be able to account for something like this?
Last edited by Sabardeyn; 04-10-2010 at 02:57 AM. |
04-10-2010, 03:47 AM | #25 |
Grand Sorcerer
Posts: 11,740
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
There are many date formats. I personally use all of 'd/m/y', 'd-m-y', 'd-spelled_month-y', 'd spelled_month y', 'm/d/y', 'm-d-y', and 'spelled_month d, y', and 'y-m-d'. In addition, y is 2 or 4 digits, and the spelled month might be fully spelled or abbreviated in some way.
In the end, one must either pick a format that is predictable and understandable, or suffer from mysterious conversion errors. If someone types in 10-10-10, what date is it? Using y-m-d solves the problem, and is trivially explainable. |
04-10-2010, 05:14 AM | #26 |
creator of calibre
Posts: 43,853
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@chaley: IIRC, the implemetation uses parse_date. In which case it will parse a rather wide range of date specifications.
|
04-10-2010, 05:46 AM | #27 | |
Grand Sorcerer
Posts: 11,740
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Other than the above locale issue, the current implementation has two problems. The first is that to implement partial matching, the code must know what the date segment separator is. Currently it accepts only '-'. I will change this to accept '-' or '/' (any others?). The second is that using guessable formats will be far more likely to throw a value exception, and these currently are badly (i.e., not) handled. I will fix this as well. |
|
04-10-2010, 07:14 AM | #28 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
|
04-10-2010, 08:01 AM | #29 |
Grand Sorcerer
Posts: 11,740
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
04-10-2010, 11:03 PM | #30 |
Guru
Posts: 644
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
|
Chaley,
I just thought I would broach the idea before any assumptions made in the programming became a problem. But you've given more thought to this than was apparent in that first post. As to separators, I vaguely recall seeing periods used in dates, but cannot cite a specific example. I know they're used for phone numbers (for example, (123) 456-7890 == 123.456.7890). |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to remove dates from news feed | vega07 | Calibre | 11 | 07-26-2010 06:25 PM |
Article Dates with parse_index | EnergyLens | Calibre | 6 | 04-21-2010 10:13 PM |
Kindle 2 Shipping Dates | Cutestory | Amazon Kindle | 29 | 02-13-2009 11:30 AM |
Dates in Russian (?) | Roger Wilmut | Calibre | 10 | 11-24-2008 06:22 PM |
Google Book Search to search full-text books online | Bob Russell | Deals and Resources (No Self-Promotion or Affiliate Links) | 1 | 08-19-2006 12:13 PM |