![]() |
#571 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
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') |
|
![]() |
![]() |
![]() |
#572 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,730
Karma: 29711016
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 |
![]() |
![]() |
Advert | |
|
![]() |
#573 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
That said, I am glad it works for you. |
|
![]() |
![]() |
![]() |
#574 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,196
Karma: 1995558
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.
|
![]() |
![]() |
![]() |
#575 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,730
Karma: 29711016
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 |
|
![]() |
![]() |
Advert | |
|
![]() |
#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 |
|
![]() |
![]() |
![]() |
#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 |
![]() |
![]() |
![]() |
#578 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
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; |
|
![]() |
![]() |
![]() |
#579 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Jan 2021
Location: Deutschland
Device: PocketBook
|
![]()
[CODE] number_of_seconds = $#sekunden;
Vielen Dank, Das war die Lösung |
![]() |
![]() |
![]() |
#580 |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,729
Karma: 2197770
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 |
![]() |
![]() |
![]() |
#581 |
Connoisseur
![]() Posts: 66
Karma: 10
Join Date: Jul 2010
Device: Pocketbook InkPad Color 3, 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. |
![]() |
![]() |
![]() |
#582 |
Library Breeder (She/Her)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,268
Karma: 1937891
Join Date: Apr 2015
Location: Fullerton, California
Device: Paperwhite 2015 (2), PW 2024 (12 GEN), PW 2023 (11 GEN), Scribe (1st)
|
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? |
![]() |
![]() |
![]() |
#583 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,062
Karma: 60358908
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
|
![]() |
![]() |
![]() |
#584 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,196
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
|
Quote:
|
|
![]() |
![]() |
![]() |
#585 | |
Library Breeder (She/Her)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,268
Karma: 1937891
Join Date: Apr 2015
Location: Fullerton, California
Device: Paperwhite 2015 (2), PW 2024 (12 GEN), PW 2023 (11 GEN), Scribe (1st)
|
Quote:
|
|
![]() |
![]() |
![]() |
Tags |
column types |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Reading List | kiwidude | Plugins | 1423 | 06-22-2025 01:03 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 |