![]() |
#1 |
Chalut o/
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 439
Karma: 145424
Join Date: Dec 2017
Device: Kobo
|
Alternative booksize format (Ko)
Would it be possible to add an option to choose the format of the booksize between Mo, Ko , octet ?
I find the Mo much too big and given the size with it is not very precise. There is an alternative solution by creating a column "Column built by other columns" and using this code: program:format_number(divide(booksize(), 1000), '{0:.0f}') The problem of this solution is that you only get the number and if you want to display it cleanly in the side panel, you have to create a second collone : {#sizeko:|| Ko} It’s all Last edited by un_pogaz; 08-06-2018 at 11:42 AM. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can modify the program to output the suffix as well. Use general program mode, in which you can create arbitrarily powerful templates.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Chalut o/
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 439
Karma: 145424
Join Date: Dec 2017
Device: Kobo
|
Uh... How?
I copied/pasted the code from an old post. I don't fully understand it, so such a change is beyond my knowledge. Thank. Oh, and I saw that this kind of code in a custom collone could slow down the loading of a Library. I'm not worried, but curious, to what extent? |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,443
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Also try the human_readable template function. I am not near a computer so I can't test, but I think the following does what you want.
Code:
program: human_readable(booksize()) |
![]() |
![]() |
![]() |
#5 |
Chalut o/
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 439
Karma: 145424
Join Date: Dec 2017
Device: Kobo
|
Um, interesting but:
1) It gives me the size in Kb 2) It uses the suffix KB in the main display column "xxx KB". I'm looking for something that comes close to the default column (no suffix with main display, yes for side panel) But tahnks |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to choose which format is sent to reader? | soondai | Calibre | 3 | 09-12-2010 11:51 PM |
X to ePub....which format to choose? | Belfaborac | Calibre | 7 | 05-28-2010 04:05 AM |
Which format to choose | John1997 | Workshop | 2 | 01-24-2010 03:32 PM |
PRS-600 Which format to choose | Sjonnie | Sony Reader | 28 | 01-22-2010 06:35 AM |
For those that recieved shipping confirmation, which delivery option did you choose? | Dragoro | Amazon Kindle | 14 | 02-27-2009 12:29 PM |