Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 05-18-2020, 08:44 PM   #1
eosrose
Enthusiast
eosrose began at the beginning.
 
Posts: 45
Karma: 14
Join Date: May 2010
Location: WI
Device: Kobo Forma
Rounding Word Counts in a Custom Column

I have the following custom column setup to collect word counts:
Lookup name: words
Column heading: Words
Column type: integers
Format for numbers: {:n}

I would like to create another custom column based on this column to include a word count rounded to the nearest 1,000 and with the decimal shifted over 3 spaces:
Words: 560 =becomes=> 1k
Words: 15,400 =becomes=> 15k

Is this even possible? I tried looking at the Python documentation for the format language and my eyes started to cross. I'm pretty comfortable with PHP and I'm starting to understand RegEX, but it appears Python is outside my grasp.
eosrose is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom column built from word count column Montana Harper Library Management 3 10-04-2018 09:57 PM
REQ: Template for custom column to calc # of Pgs based on traditional counts jecilop Library Management 15 09-13-2014 07:04 PM
Custom Column with word count index Tanjamuse Library Management 22 05-11-2014 08:18 PM
Rounding to nearest integer in Custom Column - Hijri Year oelgamal Calibre 2 03-28-2013 07:12 PM
Rounding to nearest integer in Custom Column - Hijri Year oelgamal Recipes 0 03-28-2013 02:58 AM


All times are GMT -4. The time now is 05:51 PM.


MobileRead.com is a privately owned, operated and funded community.