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.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
plover_stroke-1.0.1.tar.gz
(15.0 kB
view hashes)
Built Distributions
Close
Hashes for plover_stroke-1.0.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1adea7ff374032ca7e92bb8c8a8cd907e8ac174f1384d2989693348729b2879 |
|
MD5 | 17c68da5e79da109054cf07c74200fc5 |
|
BLAKE2b-256 | 29cd642337a83781e0dbe5204bc4d3522589ce6d0f78f0db2fae1c86efc679a3 |
Close
Hashes for plover_stroke-1.0.1-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7a554cf277c6b9f23d016308a04f397f3dc59f3a360add91bca8e40a02ac365 |
|
MD5 | 95ec9c4f84787b697b6afabac9d68b27 |
|
BLAKE2b-256 | 3336bcd25f31a8a5c7bea92ed964518fd5b0142854d408a5024475482b198f70 |
Close
Hashes for plover_stroke-1.0.1-cp310-cp310-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc47bac1591c63434da2a2910926996aeb708f198f5b952846cf82ddf3cf6544 |
|
MD5 | 3e823b38e768134b73adf3ce627c0cda |
|
BLAKE2b-256 | 93a2c7108af95aa9a0075a24d11db0145f838a1133163cb60048f4109a65a816 |
Close
Hashes for plover_stroke-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5694745cb5c5857f45d7a933a1964fffe33ffdc31ea6affe32e217a23fe9998e |
|
MD5 | 2631cf4365fc194eb780599d0b007ff9 |
|
BLAKE2b-256 | 06e5312411d4c39b1e3ff077ada7336bc001a0ec2e69e3ddcd076aad9c2ff4a4 |
Close
Hashes for plover_stroke-1.0.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e10c2de721526d7e45251de43c5f086dba581793244f2b19176b2c9a3a3f1b36 |
|
MD5 | afa3438eb5dd5535ba7aa6f3a7f12d80 |
|
BLAKE2b-256 | e0c73787500333847af82bed0bc46a6d76dddf97b0dee6d5ccc37bf85384f20b |
Close
Hashes for plover_stroke-1.0.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29511aabd27f413a4a5a4286bf0398231876a464d9ba5376a896e976e5a0f844 |
|
MD5 | 4fc8ee1066c65b85be1f15067566f40e |
|
BLAKE2b-256 | cc5330bfe0da8d4eef9cccba29b1032dfb96428e4ae5e4ff07c26cebed4ba70d |
Close
Hashes for plover_stroke-1.0.1-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6650313c5b7680439e267631750b136f83d15eaf9e9c6204262c1bee892cfd91 |
|
MD5 | 319712869399b5f5463b728c006759a2 |
|
BLAKE2b-256 | 0b0c49dc6cc0a5a29ac288a446b87b95c0a20977fe842b8885f7aaa6e92dca44 |
Close
Hashes for plover_stroke-1.0.1-cp39-cp39-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ce73d6bc2e05dc36d1c9f8e3da09a33ab8a578332257904c2c99e4a96d6a14b |
|
MD5 | f7fd52663888f60df7d51bafc9d4933a |
|
BLAKE2b-256 | 3642bd512877090232045df68947cfc57d028473b66c4a3114ce52b355060396 |
Close
Hashes for plover_stroke-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 410ee8a8ea2aef72f5320e3c59580d8806e2fef5186b46b402cfa0b055dd962d |
|
MD5 | 3b13aaadf785e7522457c5030d004e18 |
|
BLAKE2b-256 | 3170103ec1d7c1302cecafb7ca4bec8236be75f761c93ee15f2ec2c211fb34d1 |
Close
Hashes for plover_stroke-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | caca36f8a3ba1d56aa76d55b5094b28eb8023bdcb4e469417a7c5a5f06c4be27 |
|
MD5 | 1cb4c8cf516500834863a1f445b7c5f6 |
|
BLAKE2b-256 | 14bdb8f8a2399fc7480b7002cb38bfdd8e1f609ff81d7c9d233ac0b1a6d3cb9b |
Close
Hashes for plover_stroke-1.0.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20a1d165a8f0b12865e64ecb2417032ecc7bf9a9f195656e1cb4a32d9e98ccab |
|
MD5 | ce6f265ba515a3da9c032773cef9c261 |
|
BLAKE2b-256 | 8ff98035a06f688919002de2f7b79c16d2dff1f8676c127af174c41aef4e0599 |
Close
Hashes for plover_stroke-1.0.1-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e190744f4bd3ec9a323eba470994bc47c26d14f0450b46d22d02734d9e7c520 |
|
MD5 | f6f685ef75d03f0318863c12462dc133 |
|
BLAKE2b-256 | 9c7f9ad738b47438e0e360dc37fd2ea4ef59fdccc383516781038a1bf4087275 |
Close
Hashes for plover_stroke-1.0.1-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cfd95e74352fe497c58e27e3e934cc26dfbf218f501589ec5c1a4c5f30177a6 |
|
MD5 | e16c4492ca931d0655fef87aadb9cb39 |
|
BLAKE2b-256 | 0f19baa4b441f230d226c0bbb7a227ab28513421436466f08cca4f3707197105 |
Close
Hashes for plover_stroke-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ccdf3beda33adaa1537742616c119390492e922eba04ed05a56c42b2b020db3 |
|
MD5 | 0fbab5378cc772a1dee60b939c4c1714 |
|
BLAKE2b-256 | 68b189fdb50c1b0fe591586fb127394c1de98a24d67266f6c3b37c44e598a651 |
Close
Hashes for plover_stroke-1.0.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0702a8e0a11e60218bad47f4fa1a0367bd56c0b6b7b559514705cb10016f07e |
|
MD5 | 7e3b9ae9ae60fd600586a5f23fc09b91 |
|
BLAKE2b-256 | 9c253726783b71cd683c82e6c345ad86c0e1e941334627c17c59e43216eb6d3d |
Close
Hashes for plover_stroke-1.0.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8dc0b58c9e2857708a0f075f32d92b78860613b755aba20abbe53d806f5841f9 |
|
MD5 | 05c12596242e2845a391d1c7e899fe0c |
|
BLAKE2b-256 | b607d1f1a4975d8993801cfe0c33201f97560eec59b444df392637dfc15b0410 |
Close
Hashes for plover_stroke-1.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2401e7b8739000888be561f074f9696561be22a9e06ac1d5bdd845f0f1626751 |
|
MD5 | 6c8e4be0de97d29c8fd1d1378797f8fc |
|
BLAKE2b-256 | 7c33816de0df81e3be64cf3e9415a305333540eaf3866af0b6f3d788f29bfb14 |
Close
Hashes for plover_stroke-1.0.1-cp37-cp37m-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df8e4b8c1510cac3d8c4d6bec46476794e917b48670322a933f5d22ab195bec9 |
|
MD5 | a331484d35817dc5fee27b3a8ab9499d |
|
BLAKE2b-256 | 1604ae7ed97df1171f2c9df14de6a6ea68e7f24a7fce1e2de002515651cd2523 |
Close
Hashes for plover_stroke-1.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32339cd7b255318a3bbe739eee8adf31ace65e6dba389f1745518a4cdb0edbe5 |
|
MD5 | 3dc5304933459514833c2e2029411ad9 |
|
BLAKE2b-256 | 9dbace88d8c383a9e521b228ddc964d67372df827093f76935ad96dbc91756de |
Close
Hashes for plover_stroke-1.0.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1876677ab65290d5b30a84e00e92ed723beb0efb4237c4874f995ade502cd814 |
|
MD5 | 48c59263954639bbf429f5a47996fd82 |
|
BLAKE2b-256 | a60c8aea09a79d9639848b0711b65335b1ab2ef5f399c893090a30f30940adbf |
Close
Hashes for plover_stroke-1.0.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 755e3d55bcbfbb154861f2e5f95b0e3b575093e54544bc00a30b7e1950972b8e |
|
MD5 | 25dedbc0c3e1fb0b562a750bd5d55486 |
|
BLAKE2b-256 | df5d63c7d3318019d443fac14129a5fe62459d04c4229909e06ec672bc053d68 |
Close
Hashes for plover_stroke-1.0.1-cp36-cp36m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | facd2e2d50fa11e81ca0144cb667d99253d071db1534c64c1c9d44360d690890 |
|
MD5 | 03204c66146609b8932f6dec3c79bc85 |
|
BLAKE2b-256 | bb5e6bc4a127c98dd88327981abe114da0c7fdda1c970d60884e46f61b0d10cd |
Close
Hashes for plover_stroke-1.0.1-cp36-cp36m-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05f0d8264f6c865022fdb83696a72f2d61bba78e22dccf08a99c96e034635812 |
|
MD5 | 2b9e14e7c970e6c6a68c0a3b1617b89d |
|
BLAKE2b-256 | 8fec0de6d6ec012a3aed528088035d787deab6123b6d15e696fff4fd3dc82324 |
Close
Hashes for plover_stroke-1.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b266018f74c5d9e1eb928a08afaf18d598076453f3c357e06d598a354a1af21 |
|
MD5 | 2b36fb95abed5b64f8ec5aaed68aa959 |
|
BLAKE2b-256 | a466d7f89dedbeac66913f48dd19e834f1c85381beec0fad7bfc272c8a329eac |
Close
Hashes for plover_stroke-1.0.1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07a979c1407ed5c797431b8606c1be82f7089df44d10ec7bb4e717705bac0679 |
|
MD5 | 01a3b4fce831fd671e602032c2b46db6 |
|
BLAKE2b-256 | e8cf71a335b415f067ff78f48bc11d63080bc98084a960378cec091be2a428f7 |