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 [unreleased]
- 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
plover_stroke-1.1.0.dev0.tar.gz
(16.2 kB
view hashes)
Built Distributions
Close
Hashes for plover_stroke-1.1.0.dev0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7fb67186c0392bb0f459fe791bcb52bb61d879a490556a3fb0dea45ff9d7b25 |
|
MD5 | 58336fadf45a915bbd1b41d7c7e69a03 |
|
BLAKE2b-256 | 41a701853b86e25107384ff8515556d3820c37f7082feedb45b1556ab01e50d0 |
Close
Hashes for plover_stroke-1.1.0.dev0-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ab14a13adacde9717967138e2b609679854818eb8e925cb28688c361f2a4d6e |
|
MD5 | 2146040070897fa6da810808cbced451 |
|
BLAKE2b-256 | 51fec6b02cc5f7621da91c19a2ab970957dfd7c08b15971490f7447442c678ad |
Close
Hashes for plover_stroke-1.1.0.dev0-cp310-cp310-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d762e26a375ebd0b066ffa62f94bf38b5bc09b49193f84691c7b929ab07d74a |
|
MD5 | f54dae9746c5cbb85ea307f8064e60be |
|
BLAKE2b-256 | d5fac6a20a08cae3a671fb1f0aec0b01d456d1551feabf2df6413e5fa0bca996 |
Close
Hashes for plover_stroke-1.1.0.dev0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c1e88c6008c84514df2dc097ae84352e7020062a67b9920f720e3f2a5157fba |
|
MD5 | 0a287836e0d68016919f3e54e39e515e |
|
BLAKE2b-256 | 6fa19551d85a7b0581dc9be66762e627b7c8412d55ba513910301ca65cd3d342 |
Close
Hashes for plover_stroke-1.1.0.dev0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fbdd2092af2759ef250c1d3ff0781120f64eac228c0ffc93456c24976c3fe8d |
|
MD5 | 04747770d5017a007f8efb5921e1f10c |
|
BLAKE2b-256 | 02a9c74af998c855bb608fb566d1e13dfabae8100d6a93a73e9b22a0bdd9c04c |
Close
Hashes for plover_stroke-1.1.0.dev0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3af70600111267788784fe8924735f7bbcf3f5e27bfa9da0d1987b183fbf555b |
|
MD5 | 196d74dee738efa92d91fa7d907d25f1 |
|
BLAKE2b-256 | 9ef20bba19c0a488e3105a2dedd59649c55e118e71245df0df2ddba3dad83593 |
Close
Hashes for plover_stroke-1.1.0.dev0-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f346b2ad4cf2e2a0a83bb8b4a0b0c019514cf938321372e08d36de20ef2a9d24 |
|
MD5 | d4a1903c24a7979bdf815785a152d5c9 |
|
BLAKE2b-256 | ac41c68f6f78041f4390cc5728b4a335cad1bcd4c32999b6115af8168805c461 |
Close
Hashes for plover_stroke-1.1.0.dev0-cp39-cp39-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25fba706c0249c09c152081c28ea31e01faf32fda173adc94a55c8b4c0241c8f |
|
MD5 | 71aef764840b5e8a6a3b26850d88bb51 |
|
BLAKE2b-256 | 7fb687fe01667aa9729198e8180b54e0a7c01094a6fcf6386d7ff7eddc59eddc |
Close
Hashes for plover_stroke-1.1.0.dev0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c3023080cf770a906ad36c45f0366d37494da1f4ff15aaa80b121bcef4ce3f0 |
|
MD5 | 2a0adac164a0d60bfe4ad6fe6ce32ad9 |
|
BLAKE2b-256 | 1f49bdba5421416d71ae44b26535b645cd29960d02725c983e2e25ec08020c95 |
Close
Hashes for plover_stroke-1.1.0.dev0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d57090ae075286921f154e1f8b4c08f52fbb8dddd32e985b864560fb96d6932 |
|
MD5 | 9bef1df44fe3dcf568acdb7c859cf9a7 |
|
BLAKE2b-256 | 3d6b6259cb4b7f96839f83a686442069ce048a6a02f5f794926fa42f5c4b6356 |
Close
Hashes for plover_stroke-1.1.0.dev0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efa67f39e9a28619ffc79b34aa74393b9dabc914452524ce5413621d7db929ab |
|
MD5 | 717fe6d3eadae5b4251be346ee9aa675 |
|
BLAKE2b-256 | b885d849c013b84f83f95f09e56d10d4fee84c889f76f67c9575a851b0f4f3c9 |
Close
Hashes for plover_stroke-1.1.0.dev0-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 823a2f3e82200449ba5dd477971e8d8072da764982500193b046b0c6e55f4da2 |
|
MD5 | 516cf886a6061b3fe891610412688a56 |
|
BLAKE2b-256 | 1cb22baf27be5eb0dedf66d78c5196bc83774d0b7a39ad62f51826c2d3aae949 |
Close
Hashes for plover_stroke-1.1.0.dev0-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdb8bc568f6aaaf0a837da47b620965ca1f9e64cddda068f732ccb1d8019276a |
|
MD5 | 844431d01da3cd7e83d6587a96ae1564 |
|
BLAKE2b-256 | 583f56be24601350a93d2988b835cfb1d677ed4199e821425a2188fce802cba0 |
Close
Hashes for plover_stroke-1.1.0.dev0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce6af38e434ea56683fd89f771d413471fe247061e38c3d06584c6eb0e175adb |
|
MD5 | 1c4a26273e4175ce48294d0aaa190e0d |
|
BLAKE2b-256 | a4e78662506bfdc1f2b36ca68a069b2aa8f424e2e7a15bdfb3f3a599c7ebb172 |
Close
Hashes for plover_stroke-1.1.0.dev0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 364ec2e0ee9c61d2bec6c713925ee5d7b1dd91e72f3cb64d984a3a63be6d00a1 |
|
MD5 | 6399b5110629794f70aaed9379a9b8d7 |
|
BLAKE2b-256 | 3c05de355d994f2e9b6435a02a43e998ec5bd4f66e03152764294392e711baa5 |
Close
Hashes for plover_stroke-1.1.0.dev0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57dbf60ef9ae98b27af64a5f66136aa41320689e3b6831a70a09766a81cccd95 |
|
MD5 | 6b72531c764718797d6c4a16df4728f2 |
|
BLAKE2b-256 | 88cbdd422b5cbc14cf7fdf2491df19d72c85704f4e0b353a923c66fcca8fad90 |
Close
Hashes for plover_stroke-1.1.0.dev0-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95a9c4b0cea000ac23edf56b87b4e48a25289e4e1f79ea700025156ff1e413b8 |
|
MD5 | 186761cf3806d21707f0ca3cf7bb27cf |
|
BLAKE2b-256 | 398aef5e52e846c2313c6d0ca4b9c9a9b3953190952db1bb283f8b8e5bc5ceeb |
Close
Hashes for plover_stroke-1.1.0.dev0-cp37-cp37m-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22f0f6ddca105a69cd96ba88284b30ddba453b103c1afc60d5fa2f0a8c786dd1 |
|
MD5 | c35c17e962a6631a1b406976775e2ba1 |
|
BLAKE2b-256 | ff8c3f7e2a2f118c411a690fad2259ddb6327c8546ad846a92f846c7e97721ca |
Close
Hashes for plover_stroke-1.1.0.dev0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | afb8640d8b0879b9d157ffeae9b1047b6b098586716ec42a0c25e472a9aed65c |
|
MD5 | 1d7381f574180f6f2a884eb17336dda9 |
|
BLAKE2b-256 | 2f4bfd31da905bcb1e9bdde564c298dc78ac28d6e76f7459493a3535b8bcda78 |
Close
Hashes for plover_stroke-1.1.0.dev0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4476b9a20fb33add9374e765151bcdf85ff1d29781c0d94c08834cc1f5b46d9 |
|
MD5 | d04b1798d2840a36fead1703f2c68182 |
|
BLAKE2b-256 | 6708b6a4f254840cf211521ac8c39ef4b8125afb3b49b1090d1a98f736f7584c |
Close
Hashes for plover_stroke-1.1.0.dev0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47ee598aea6cdeb41f131bbf7437dd11beb0d0db3127dd3f3b980810b039ce40 |
|
MD5 | 62d2f9264db6949888574272d6411968 |
|
BLAKE2b-256 | 50d0f67b68c0e8beccbcb6b38e8bbe96a34fa8046b2d9e0e558e90fb2c7328b3 |
Close
Hashes for plover_stroke-1.1.0.dev0-cp36-cp36m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3da6833574bc0bce4222289ffd1df64d127e1a431a8fbce160c16c6edf2f0d22 |
|
MD5 | e11d841d1c445f97940a89f2c2f5fb41 |
|
BLAKE2b-256 | cf444f03b4cb342d36a6755f4a97ca46f773579b0a70ff4c63c3bdadc2661c56 |
Close
Hashes for plover_stroke-1.1.0.dev0-cp36-cp36m-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cceffac78622e8052646e94533b144019b8e938cbb738f106bd1ed477edbc07 |
|
MD5 | 83e1c89c2be06d1751117acf411db509 |
|
BLAKE2b-256 | f8d0330f37d1fad62bae61d6950e1cf06ba953e74fe878fa6b6c7d2ef132930d |
Close
Hashes for plover_stroke-1.1.0.dev0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93ea1dec9cb0493d88314091edcd1306373b5df8c63a4ddea04dc31960cae415 |
|
MD5 | e9ec819d59252473991eae6510367647 |
|
BLAKE2b-256 | d69ac36fce6e3515fc3fdf5a853c3da2d4ea29194f9750cf7c4b91f2d86849a1 |
Close
Hashes for plover_stroke-1.1.0.dev0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7da806513ec54c14f335179a4fa5996ce93542e6de62cfa7707df1fc9089135e |
|
MD5 | ff71c724739c9f24f232cf68af96999e |
|
BLAKE2b-256 | 6d662b39d87d34da41d23f69e97e520422e3733176422f40879458222a5764fc |