09-13-2022, 05:13 AM | #571 | |
Grand Sorcerer
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
00:14:16 ==> 14 minutes + 16 seconds ==> 856 seconds You can use a column built from other columns to display the number of seconds however you wish. For example, this template displays the number of seconds (I used a constant instead of the correct column lookup name) as hh:mm:ssCode:
program: number_of_seconds = 856; hours = floor(number_of_seconds/3600); minutes = floor((number_of_seconds - (hours * 3600))/60); seconds = mod(number_of_seconds, 60); format_number(hours, '02d') & ':' & format_number(minutes, '02d') & ':' & format_number(seconds, '02d') |
|
09-13-2022, 07:17 AM | #572 |
null operator (he/him)
Posts: 20,567
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
FWIW: I have duration column in my Media library, which is a Date, viz:
My media items are short news video and audio clips. I key the data into the booklist - not sure if/how that could work with IL. BR |
09-13-2022, 07:32 AM | #573 | |
Grand Sorcerer
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
That said, I am glad it works for you. |
|
09-13-2022, 08:49 AM | #574 |
Wizard
Posts: 1,090
Karma: 1948136
Join Date: Aug 2015
Device: Kindle
|
if @jpkar does not need to use arithmetic for his duration column, he can proceed with the same format (hh:mm:ss) he currently has and it will work well for sorting. He just needs to change the target column datatype to text to avoid the validation error.
|
09-13-2022, 09:25 AM | #575 | |
null operator (he/him)
Posts: 20,567
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
But wait, I just did a sort on my duration column - perfect. And then I remembered the sort_dates_using_visible_fields tweak takes care of it. Perhaps there should be a companion tweak zero_non_visible_fields_in_dates. BR |
|
09-14-2022, 04:18 AM | #576 | |
Junior Member
Posts: 5
Karma: 10
Join Date: Jan 2021
Location: Deutschland
Device: PocketBook
|
Quote:
2 neue Spalten angelegt: 1. Spalte = aus anderen Spalten aufgebaute Spalte = #länge 2. Spalte = Ganzzahlen = #sekunden Wie gelingt mir der Verweis auf die selbst definierte Spalte:"#sekunden"? Vielen Dank |
|
09-14-2022, 04:29 AM | #577 |
Junior Member
Posts: 5
Karma: 10
Join Date: Jan 2021
Location: Deutschland
Device: PocketBook
|
Code:
program: number_of_seconds = 856; hours = floor(number_of_seconds/3600); minutes = floor((number_of_seconds - (hours * 3600))/60); seconds = mod(number_of_seconds, 60); format_number(hours, '02d') & ':' & format_number(minutes, '02d') & ':' & format_number(seconds, '02d') Wie gelingt mir ein Verweis auf die Spalte "#sekunden"? siehe Bilder |
09-14-2022, 05:44 AM | #578 | |
Grand Sorcerer
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
number_of_seconds = $#sekunden; # Alternate 1: number_of_seconds = field('#sekunden'); # Alternate 2: number_of_seconds = raw_field('#sekunden', ''); # Add this line if you want empty duration to display as empty instead of 00:00:00 if ! number_of_seconds then return '' fi; |
|
09-14-2022, 06:08 AM | #579 |
Junior Member
Posts: 5
Karma: 10
Join Date: Jan 2021
Location: Deutschland
Device: PocketBook
|
Das war die Lösung - Danke
[CODE] number_of_seconds = $#sekunden;
Vielen Dank, Das war die Lösung |
10-16-2022, 03:10 PM | #580 |
Calibre Plugins Developer
Posts: 4,636
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Import List v1.9.0 Released
Release Notes:
https://github.com/kiwidude68/calibr...rt_list-v1.9.0 |
05-30-2023, 12:00 PM | #581 |
Connoisseur
Posts: 55
Karma: 10
Join Date: Jul 2010
Device: Kindle Oasis 2, Moon+ Reader pro
|
I am not sure if it is a bug in the extension or if I am doing something wrong. I want to import a list of books via a .csv (utf-8). The book titles are structured as follows:
Book v1 book v2 Book v3 In "Books in list:" they are also displayed like this. However, in "Matches in library" it says: Book V1 Book V2 Book V3 The small v becomes a big V. These are then of course also imported in this way. |
07-14-2023, 07:50 PM | #582 |
Library Breeder (She/Her)
Posts: 1,156
Karma: 1900479
Join Date: Apr 2015
Location: Fullerton, California
Device: Kobo Aura HD (1) PW3 (4) PW3 2019 new edition (1)
|
Hi!
I am trying to import my GR library list, it has pages and number of ratings. The columns are {0:,d} intengers. I am getting the following error: calibre, version 6.19.1 ERROR: Failed: Traceback (most recent call last): File "calibre_plugins.import_list.page_persist", line 42, in to_int ValueError: could not convert string to float: '202,520' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "calibre_plugins.import_list.page_persist", line 150, in do_it File "calibre_plugins.import_list.page_persist", line 459, in pd_callback File "calibre_plugins.import_list.page_persist", line 316, in _apply_metadata_updates File "calibre_plugins.import_list.page_persist", line 369, in _update_mi_for_book File "calibre_plugins.import_list.page_persist", line 405, in _update_mi_custom_column File "calibre_plugins.import_list.page_persist", line 44, in to_int ValueError Can someone help? |
07-14-2023, 09:06 PM | #583 |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
First of all: update calibre. 6.23 is the latest and that fixed some issues
|
07-14-2023, 09:24 PM | #584 | |
Wizard
Posts: 1,090
Karma: 1948136
Join Date: Aug 2015
Device: Kindle
|
Quote:
|
|
07-22-2023, 09:16 PM | #585 | |
Library Breeder (She/Her)
Posts: 1,156
Karma: 1900479
Join Date: Apr 2015
Location: Fullerton, California
Device: Kobo Aura HD (1) PW3 (4) PW3 2019 new edition (1)
|
Quote:
|
|
Tags |
column types |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Reading List | kiwidude | Plugins | 1316 | Yesterday 12:52 PM |
[GUI Plugin] Manage Sony x50 Reader Book List | kpw | Plugins | 170 | 10-02-2014 08:23 PM |
Import List plugin idea thread | kiwidude | Development | 45 | 08-13-2012 06:05 AM |
[GUI Plugin] WebOS Kindle-Import | CranstD | Plugins | 0 | 01-24-2012 03:36 PM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |