09-26-2011, 03:37 PM | #16 | |
Dead account. Bye
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
|
Quote:
Don't worry about my #original_language. It's fully custom so I can use semicolons instead of commas at any time (and it's more clean and consistent). |
|
09-26-2011, 03:47 PM | #17 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
We are looking at this. Kovid is in agreement, at least in principle. There are, of course, complexities to deal with, such as commas in localized versions and matching a translated value against the base (english) value. Lets see where we end up.
|
Advert | |
|
09-27-2011, 12:45 PM | #18 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The language strings now contain semicolons instead of commas, and I have added a list_equals function. Both changes will be in the next release.
Documentation for list_equals: list_equals(list1, sep1, list2, sep2, yes_val, no_val) -- return `yes_val` if list1 and list2 contain the same items, otherwise return `no_val`. The items are determined by splitting each list using the appropriate separator character (`sep1` or `sep2`). The order of items in the lists is not relevant. The compare is case insensitive. |
09-27-2011, 04:30 PM | #19 |
Dead account. Bye
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
|
That is speed.
Next week I'm on holidays . But I'll test the new features ASAP. |
10-09-2011, 11:45 AM | #20 |
Dead account. Bye
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
|
Just tested, as expected it perfectly works and simplifies my comparison column. Now it looks:
Code:
{:'list_equals(field('#original_language'), ',', language_strings(field('languages'),0), ',', 'Yes', 'No')'} |
Advert | |
|
10-09-2011, 10:19 PM | #21 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
You might want to suggest specific changes to the manual. I'm sure having the specific input from someone using the feature would be appreciated.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can't clear "custom" date field? | joegearhart | Calibre | 5 | 12-20-2010 03:32 AM |
Bug? "Insert metadata as page at start of book" doesnt encode Comments field properly | rollercoaster | Calibre | 2 | 04-24-2010 10:40 PM |
Rebuild "author sort" field | enriquep | Calibre | 2 | 07-24-2009 11:21 AM |
Observations of Bugs which do not seem to be mentioned in "Gen3 Troubleshooting" | James Bryant | Bookeen | 24 | 04-16-2008 06:38 AM |