Skip to content

Instantly share code, notes, and snippets.

Avatar

Benoit Pierre benoit-pierre

View GitHub Profile
View gist:c930b6d3b249306149d80dcfb68b1796
18/50/-S 1850s 91
19/30/-S 1930s 91
19/8/6 1986 100
2/6/0 260 100
40S 40s 100
50S 50s 100
AB/HOR abhor 100
AB/KUS abacus 91
ABL/ER abler 100
AB/RUPT abrupt 100
@benoit-pierre
benoit-pierre / guide.md
Last active May 4, 2016
Custom Plover Version Howto
View guide.md
@benoit-pierre
benoit-pierre / github_merge_draft_releases.py
Last active Aug 2, 2016
script to merge all the current draft releases of a GitHub project into one single draft release
View github_merge_draft_releases.py
#!/usr/bin/env python
import json
import sys
import requests
import uritemplate
with open('.github.repo', 'r') as fp:
View rtfparse.py
#!/usr/bin/env python
from collections import namedtuple
import sys
import re
from plover.dictionary.base import create_dictionary
RTF_TOKEN = re.compile(r'\\((?P<cchar>[-_~\\{}*])|(?P<cword>[A-Za-z]+)(?P<cparam>-?[0-9]+)? ?)|(?P<group>[{}])|(?P<text>[^\n\r\\{}]+)|(?P<nl>[\n\r]+)')
View gist:84b86eb5756aa9ab9d862bfe6da1830d
import struct
import binascii
import plover.machine.base
from plover import log
STENO_KEY_CHART = (
None, 'S-', 'T-', 'K-', 'P-', 'W-', 'H-', 'R-',
@benoit-pierre
benoit-pierre / autotest.sh
Created Feb 11, 2017
monitor tracked Python files, and run tests on change
View autotest.sh
#!/bin/sh
runtests()
{
./setup.py --quiet test -- "$@"
}
source_dirs()
{
git ls-files '*.py' | sed -ne '/\(^\|\/\)\([^\/]*\.py\)$/{s//\1/;s/^$/./;p}' | sort -u
@benoit-pierre
benoit-pierre / analyse_log.py
Created Mar 1, 2017
Analyse the output of `xinput test-xi2 --root` for key press/release events
View analyse_log.py
#!/usr/bin/env python3
import itertools
import re
import sys
try:
from plover.oslayer.xkeyboardcontrol import KEYCODE_TO_KEY
except ImportError:
print('error: could not import plover.oslayer.xkeyboardcontrol.KEYCODE_TO_KEY, '
View find_orthography_conflicts.py
#!/usr/bin/env python3
__requires__ = ['progressbar2']
import itertools
import multiprocessing
import re
import sys
View portuguese_keymaps.patch
plover_portuguese.py | 44 ++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git i/plover_portuguese.py w/plover_portuguese.py
index d7787a5..3daf258 100755
--- i/plover_portuguese.py
+++ w/plover_portuguese.py
@@ -66,23 +66,23 @@ KEYMAPS = {
'Keyboard': {
'#' : ('1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '='),
View gen_xlib.py
#!/usr/bin/env python
# pkg-config --variable=xcbincludedir xcb-proto
import re
import sys
from collections import namedtuple
def err(*args):
sys.stderr.write(' '.join(str(a) for a in args) + '\n')