Skip to main content

Plover Number Format

Transforms a previous number in the specified manner. Currently, four actions are supported:

number_format_insert

Formats the previous number in a similar way that Case CATalyst does. Read their guidelines here:

https://www.stenograph.com/content/files/documents/casecatalyst4%20manual.pdf (page 397)

Example:

 "A*PL": "{:number_format_insert:nN:NN} a.m."
 "T*F": "{:number_format_insert:X (XXn) NNN-NNNN}"
 "S*F": "{:number_format_insert:NNN-NN-NNNN}"
 
 248/A*PL
 2:48 a.m.
 
 1259/A*PL
 12:59 a.m.
 
 1234567890/T*F
 (123) 456-7890
 
 3333333/T*F
 333-3333
 
 987654321/S*F
 987-65-4321

number_format_roman

Transforms the previous number into a Roman numeral. There are two arguments:

The first argument specifies the method of conversion. 0: standard; 1: additive.

The second argument specifies the letter case. 0: upper; 1: lower.

Example:

 "R*PB": "{:number_format_roman:0:0}"
 "R*PBS": "{:number_format_roman:1:0}"
 "SR*PB": "{:number_format_roman:0:1}"
 
 2021/R*PB
 MMXXI
 
 19/R*PB
 XIX
 
 19/R*PBS
 XVIIII
 
 19/SR*PB
 xix

number_word_conversion

Converts a previous number to various forms. Accepts cardinal (ex. 12) or ordinal (ex. 12th) numbers, with or without comma separators and/or decimal places, positive or negative. (Does not accept words like "twelve" yet, that's a work in progress.)

Contains two mandatory arguments followed by four optional ones (optional arguments can be arranged in any order):

I. 1: cardinal, 2: ordinal, 0: retain the original form. (ordinal numbers cannot have decimal places)

II. 1: number, 2: word.

III. c1: add comma separators; c2: remove comma separators; c0: retain the original form.

IV. s#: retain # number of significant figures.

V. d#: retain # number of decimal places.

VI. m1: use -(U+002D) as the minus sign; m2: use −(U+2212) as the minus sign; m0: retain the original minus sign

Example:

9223372036854775807 {:number_word_conversion:2:2}
nine quintillion two hundred twenty-three quadrillion three hundred seventy-two trillion thirty-six billion eight hundred fifty-four million seven hundred seventy-five thousand eight hundred seventh

-1,234.567 {:number_word_conversion:0:2}
negative one thousand two hundred thirty-four point five six seven

5th {:number_word_conversion:0:2}
fifth

101st {:number_word_conversion:1:1}
101

2345 {:number_word_conversion:2:1:c1}
2,345th

1234.5678 {:number_word_conversion:2:1:s3:c1}
1,230th

-765.4 {:number_word_conversion:1:1:d3:m2}
−765.400

retro_insert_currency

Inserts a currency symbol (or any symbol, really) in front of the previous number.

Unlike Plover's natively supported command, this command ignores any decimal points, comma separators and any letters or words following the number.

The first argument indicates the number of words to search for. For example, if it is 1, the command will only work if the last word is a number; if it is 10, then the command will affect the most recent number within the previous 10 words.

The second argument is the symbol you want to add in front of that number.

Example:

 "TKHR*": "{:retro_insert_currency:10:$}"
 "TKHR*BG": "{:retro_insert_currency:10:CAD }"
 "P*PBD": "{:retro_insert_currency:10:£}"
 
 1.9 million/TKHR*
 $1.9 million
 
 2,000,000.00/TKHR*BG
 CAD 2,000,000.00
 
 13B bill/P*PBD
 £13B bill

Release files for plover-number-format 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plover-number-format 1.2.0
File Size Uploaded
plover_number_format-1.2.0.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for plover-number-format 1.2.0
File Interpreter ABI Platform
plover_number_format-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.9 kB

Release files / plover_number_format-1.2.0.tar.gz

Download URL plover_number_format-1.2.0.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
200b079c5d34b41e5aff5d9de85a1fbb5529ffbd58c580c699efbbe2d25696ad
BLAKE2b-256 checksum
How to use checksums
b9f51f3a0192801bf82b5bdffdf716cd05d7c0ab0a7b2e88920a4189505fb07f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.6

Release files / plover_number_format-1.2.0-py3-none-any.whl

Download URL plover_number_format-1.2.0-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c7b044a14fd318097aaf10fefc2486a66eea2744b70342869f300d37bee2881
BLAKE2b-256 checksum
How to use checksums
06672664ae68ff37e11fcfd8f8e86d8068bc17fe7e77afd3cdd4ca89719ab4e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.6

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page