Stroke handling helper library for Plover
Project description
Plover Stroke
Helper class for working with steno strokes.
Usage:
# Setup:
from plover_stroke import BaseStroke
class Stroke(BaseStroke):
pass
Stroke.setup(
# System keys.
'''
#
S- T- K- P- W- H- R-
A- O-
*
-E -U
-F -R -P -B -L -G -T -S -D -Z
'''.split(),
# Implicit hyphen keys (optional, automatically
# deduced from system keys if not passed).
'A- O- * -E -U'.split(),
# Number bar key and numbers keys (optional).
'#', {
'S-': '1-',
'T-': '2-',
'P-': '3-',
'H-': '4-',
'A-': '5-',
'O-': '0-',
'-F': '-6',
'-P': '-7',
'-L': '-8',
'-T': '-9',
})
# Creating strokes:
Stroke(56)
# => KPW
Stroke(('-F', 'S-', '-S', 'A-', '*'))
# => SA*FS
Stroke('R-')
# => R
Stroke('L-')
# => invalid, raise a ValueError
# Methods:
s = Stroke('STK')
s.keys()
# => ('S-', 'T-', 'K-')
s.is_number()
# => False
int(s)
# => 14
s == 0b00000000000000000001110
# => True
# Strokes can be compared:
sorted(map(Stroke, 'AOE ST-PB *Z # R-R'.split()))
# => [#, ST-PB, R-R, AOE, *Z]
Release history
1.1.0
- add
feral_number_key
support: when set toTrue
, allow the number key letter anywhere when parsing steno (e.g.18#
,#18
, and1#8
are all valid and equivalent, as per the RTF/CRE spec).
1.0.1
- fix exception in case of invalid keys mask
1.0.0
- drop
Stroke.xrange
andStroke.xsuffixes
methods Stroke.keys()
now return a tuple- fix corner case when parsing steno (
RR
->R-R
) - fix RTFCRE when numbers are involved (align with Plover's behavior)
- fix implicit hyphen handling when numbers are involved
- renamed
Stroke.isnumber
toStroke.is_number
- speed up implementation through a C extension
0.4.0
- fix stroke comparison
0.3.3
- fix
python_requires
package metadata
0.3.2
- first public release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file plover_stroke-1.1.0.tar.gz
.
File metadata
- Download URL: plover_stroke-1.1.0.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | de03b23f4aee66b65f69f7d4ecc4233681b43541502d86bf14fde29eaa72d153 |
|
MD5 | 7cea9fc27cbe92f85ab372aee67fab86 |
|
BLAKE2b-256 | cc5392635d8bf00b883bfbc6ab9dd48b6df2ed01c241379fe99f063a41530cab |
File details
Details for the file plover_stroke-1.1.0-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 16.8 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ee249fdaa8694b6c28e5d4bd9c7b28512a932942a48a163aa06f897c02eeaef |
|
MD5 | 0a6161cd6f2d6107dc13587aa9aa17a4 |
|
BLAKE2b-256 | 3c80169bfae807b08f2524d7e43c33e0e03f653d932137bc7269f84dd8bc9c90 |
File details
Details for the file plover_stroke-1.1.0-cp310-cp310-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp310-cp310-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 18.5 kB
- Tags: CPython 3.10, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d80793a12ba056f855a6a67ccd930dfaf2ef81c7eb3919ddc1b82fa45328be4 |
|
MD5 | b123cd32fa057707b42a1be425d4181e |
|
BLAKE2b-256 | f05076aa87034505d20710a37ffc61aebd6c64d6e01f1741358de1be36f92378 |
File details
Details for the file plover_stroke-1.1.0-cp310-cp310-musllinux_1_1_i686.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp310-cp310-musllinux_1_1_i686.whl
- Upload date:
- Size: 20.9 kB
- Tags: CPython 3.10, musllinux: musl 1.1+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a151af905a8db96596f6234545467fb5c71d9609691b8bbd69afa6ac06e6e8af |
|
MD5 | 5c9b1fc65c209f90eaddb18f7c642322 |
|
BLAKE2b-256 | 7e4986d44c5bfafcc13e3d7158fc701c6068888d868d768256049e0d6aa662a2 |
File details
Details for the file plover_stroke-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 18.1 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b7f237ccb547dd3cf867b923b3d6bc3f44f9658f7cf6fce1409c31192a8c19a |
|
MD5 | 84db936ef2d539372a66735b4fd12383 |
|
BLAKE2b-256 | d354bc0be425b6280fce7335fe1c9a4d1d8c54e7bc5b667ea94dafe7ca5ca1c9 |
File details
Details for the file plover_stroke-1.1.0-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 15.1 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cff9ed7f48dd7747a9ddf9be7f444f8fd8b21e508668061e2888374c57f52c9 |
|
MD5 | 99de546544ca41ced8b0ec1df6ee1083 |
|
BLAKE2b-256 | 8cb1f7b9721c76ff8c213a6e4ac2cf3e7b2f52ade751274cdbd2e5450f8a5556 |
File details
Details for the file plover_stroke-1.1.0-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 16.9 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1591cea4f1f34726bce608dac3556038ebcd12d68d4756dd510d5fdad3a9f5ee |
|
MD5 | 7de093fb1949fe4e79fe2829b7d842dd |
|
BLAKE2b-256 | 58b0b83cdf3d6a71c7603db86c867ba69966f0495c77bf14c090c0e46744632a |
File details
Details for the file plover_stroke-1.1.0-cp39-cp39-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp39-cp39-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 18.5 kB
- Tags: CPython 3.9, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aefdf57cf6bf4e70886a6cc560b8fee69f9641c99700817cf6a5bfa9ccfe5ea9 |
|
MD5 | 36cf0b687ad49f2777d2d256c9ba8932 |
|
BLAKE2b-256 | 5f035b66a2efb414a52088c1e707c74f30f43c2b9f70c0f5627211d2435e7ec7 |
File details
Details for the file plover_stroke-1.1.0-cp39-cp39-musllinux_1_1_i686.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp39-cp39-musllinux_1_1_i686.whl
- Upload date:
- Size: 20.9 kB
- Tags: CPython 3.9, musllinux: musl 1.1+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a790ed97016ab5f5325d957c9a31038e08115768db05bfd713ca7cca548dec0c |
|
MD5 | 3d5496c75e44913eb6205cb32adf55f6 |
|
BLAKE2b-256 | 730a0f57b8dcfc5234af57754c1fc26665b92863d640d079488bada6e43e97e7 |
File details
Details for the file plover_stroke-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 18.1 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e42414333fa885b510dc8c8c44807f3f1d27702b8cba9ffecfab75762b71b34 |
|
MD5 | 064d07ebf0c159612274609e22654ebe |
|
BLAKE2b-256 | a099bdf9a5a361b45411611ec809b9f4b6d4ccdecc3d218ef960607ac8cd4fe6 |
File details
Details for the file plover_stroke-1.1.0-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 15.1 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b940fb8588650525df5900660cb18844e1c65004fb553abc3b06ba1852d11c3 |
|
MD5 | 685a709c14f55b225406f8fcf89dc578 |
|
BLAKE2b-256 | 60f3edf82001e5b1c46bf99ca89004f2c561d64b0a8beca769ee2bfd97055563 |
File details
Details for the file plover_stroke-1.1.0-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 17.1 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22ca2ff6886fccaeb815bd3aa0c80e9e87d52fbe76a4ccc63cacfbc7528ca036 |
|
MD5 | ac6a754a2a66b6ca39dd5a3a76276562 |
|
BLAKE2b-256 | bc81e9ca253e53023adaf6b8559c9be8f8c295a410b25be1a9267ef7ecabfb53 |
File details
Details for the file plover_stroke-1.1.0-cp38-cp38-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp38-cp38-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 18.6 kB
- Tags: CPython 3.8, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90eda24c91bc26ce4f8514d961849e06fa6901f75c17f6d442393c4bb3bdc9c4 |
|
MD5 | 3d52520a22068325a5931d3975244bba |
|
BLAKE2b-256 | bc8efa985b29f6b13b4f1b0805c09a238e2e27dba6a31a0ad42ee717bb76e2f0 |
File details
Details for the file plover_stroke-1.1.0-cp38-cp38-musllinux_1_1_i686.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp38-cp38-musllinux_1_1_i686.whl
- Upload date:
- Size: 21.1 kB
- Tags: CPython 3.8, musllinux: musl 1.1+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 343caa77e439f6d5ad3397f209fa1fd3a8487d31b3a9010089f81ef477dabc16 |
|
MD5 | c79c3f190b9648f75e7e35677b15744c |
|
BLAKE2b-256 | 26f11508cb6e44370b157fff624aa339dc4a145cb34ec8f104159251e1500582 |
File details
Details for the file plover_stroke-1.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 18.3 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 975d4848d70d59ad92310c16a1800b30fd6d8e63250be9a403a9abfc2c9f3e16 |
|
MD5 | 9c0e52f6e325fc50f48d7635518a436b |
|
BLAKE2b-256 | 7609945925efb76fa1e7c050d48aa2200c27952611c23fb87ec9c666e26dcc26 |
File details
Details for the file plover_stroke-1.1.0-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 17.0 kB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2409674262d49cbb72f8e3a59ee835ec3315e02076aee839a48b024215a59458 |
|
MD5 | 07ecb65b445f7e2217b30495b1f2fdb2 |
|
BLAKE2b-256 | fbb603e3728917a078cb11477ccde1146e5505abfc431b7eef7ab76600d2df81 |
File details
Details for the file plover_stroke-1.1.0-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 17.0 kB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c6386518d9314b3d3cffc1ed147d7d13fdde17253a5ed190bb26bc03e4423ed |
|
MD5 | a5798573df51dfd70324b26a1d85959d |
|
BLAKE2b-256 | bb7fc1385a4867c988346446364703878b19472aa9df24641e0923b5ada4d297 |
File details
Details for the file plover_stroke-1.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 18.8 kB
- Tags: CPython 3.7m, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 073859e46486665ba3874af1d8186de70ed1e57496d04008437da19d682ab005 |
|
MD5 | 3640a5fcbbf110c96642677c340b5e05 |
|
BLAKE2b-256 | 6d9308c7b838dfdb501b3c5ca697b3cd3297acd15f8b7f4663b2e6e217d1db67 |
File details
Details for the file plover_stroke-1.1.0-cp37-cp37m-musllinux_1_1_i686.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp37-cp37m-musllinux_1_1_i686.whl
- Upload date:
- Size: 21.2 kB
- Tags: CPython 3.7m, musllinux: musl 1.1+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f85ac5270ffffdb778feb0d7a9ac3342a57c1791eda7eb7b66ddc5765eaedfc |
|
MD5 | dcce7b144965cfdc610cf9319b0e76b7 |
|
BLAKE2b-256 | 58555bf10ff73a2629e76a310a409d0768fa3ab9632b691ec6601e2e249d7d73 |
File details
Details for the file plover_stroke-1.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 18.4 kB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65694c52e46d3442a796e43cb95c0af8974db168e585d127fee0c3cb0ad8b06e |
|
MD5 | 2b47245cf70a1029d3c218c199aa47a7 |
|
BLAKE2b-256 | ed357ce3bb3f10b31d9c7f2123b0eae80fa8e6302edd0f05d9b97fe0e28f50be |
File details
Details for the file plover_stroke-1.1.0-cp37-cp37m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp37-cp37m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 17.5 kB
- Tags: CPython 3.7m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2b403de1e48634f163dabc49b6d3ee73a4886d6b2cab7a76ee40f44722f2c23 |
|
MD5 | 68241b2201cf92e0a5c40decb2307c2b |
|
BLAKE2b-256 | adbd875ed9caf33ff95d240c538d1d746c83d1ac049594de42b490addd2a4826 |
File details
Details for the file plover_stroke-1.1.0-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 17.5 kB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 870ee497d11e4658478fe0db60eb7eefdc6d337a3c1c18b1daec862319237f88 |
|
MD5 | baac9a00b8dfa8ac6c3e7d351919e9ed |
|
BLAKE2b-256 | ba6b8cfbc5180cc8db03ae888ba16eb4997ecbf2146b6c5042a777f364e0406d |
File details
Details for the file plover_stroke-1.1.0-cp36-cp36m-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp36-cp36m-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 18.4 kB
- Tags: CPython 3.6m, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7dfe995388184970271e2ee0f905b7dc3155b429e7a49b134ee66f997c37c18 |
|
MD5 | 2b85451d30de60bade7ac1581f991e75 |
|
BLAKE2b-256 | bcb8b2e63d6f7bc2089c849ad1adace7d5c1d7018efd426f1c74f2c1a257c343 |
File details
Details for the file plover_stroke-1.1.0-cp36-cp36m-musllinux_1_1_i686.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp36-cp36m-musllinux_1_1_i686.whl
- Upload date:
- Size: 20.8 kB
- Tags: CPython 3.6m, musllinux: musl 1.1+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b021c25722c85e971410b7bdc8fc7875b0b52d3fbe01df42fcc43edae89d5f86 |
|
MD5 | ba254fd41ad4aaf9b1cd06ec7dea097b |
|
BLAKE2b-256 | 3eb7acab54577eb839b7f4d3bc78b71415b9d40e0eb0cfc6b94164c637df03a8 |
File details
Details for the file plover_stroke-1.1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 18.0 kB
- Tags: CPython 3.6m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4b928b5125c4d7524e4f2fab2012895506d94546d007105a063d33bb01f3cc5 |
|
MD5 | 8874d1843af2b69bca6ac61786d21769 |
|
BLAKE2b-256 | 9e9d168435808e266b1853c4fd102d1bc9576ebdc5e63af22fb7c555946b2801 |
File details
Details for the file plover_stroke-1.1.0-cp36-cp36m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: plover_stroke-1.1.0-cp36-cp36m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 17.4 kB
- Tags: CPython 3.6m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d8463d2b57907b47c4df4d712a8b16ce060a2e991fe56dba6bd1e0b5e3b9624 |
|
MD5 | 8c95b868afa20c322fdb67c51aabace3 |
|
BLAKE2b-256 | 01a0dbbe23eea2a3dcd21c4851adb4bcc7f0322b63d50a8eacb12e2b3a09cf87 |