diff --git a/.vscode/settings.json b/.vscode/settings.json index 30287b58b..02f1ec0e5 100755 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,18 +2,11 @@ "cSpell.words": [ "ABEFHILM", "ACHIRZ", - "CHNPQRZ", - "Coord", - "MATHML", - "ML's", - "Mult", - "Nemeth", - "PUNCT", - "Regow", "airity", "axisname", "backtrace", "badvalue", + "ℬℰℱℋℐℒℳ", "bigop", "bitand", "bitflags", @@ -22,17 +15,21 @@ "canonicalize", "canonicalizing", "chenyh", + "CHNPQRZ", "clear", "clippy", "codegen", "coef", "columnspacing", "concat", + "Coord", "cosech", "cotanh", "displaystyle", "downarrow", "downdiagonalstrike", + "EDGVHR", + "EDGVHU", "envlogger", "eval", "fullwidth", @@ -49,12 +46,14 @@ "longdiv", "madrub", "mathcat", + "MATHML", "mathsize", "mathvariant", "member", "mfenced", "mfrac", "mglyph", + "ML's", "mlabeledtr", "mlongdiv", "mmultiscripts", @@ -77,10 +76,12 @@ "msupsup", "mtable", "mtext", + "Mult", "munder", "munderover", "nbsp", "neils", + "Nemeth", "nodeset", "nodetest", "northeastarrow", @@ -96,10 +97,13 @@ "phasor", "phasorangle", "prefs", + "PUNCT", "pyfunction", "pymodule", "qname", "rchunks", + "ℛℯℊℴ", + "Regow", "repr", "rfind", "rightarrow", @@ -107,7 +111,11 @@ "rowspacing", "rustc", "sapi", + "SBTIR", + "SBTIREDGVHP", + "SBTIREDGVHPC", "scriptlevel", + "SEMIDIRECT", "set", "sheck", "sinch", @@ -135,9 +143,7 @@ "xlviii", "xpath's", "Ωαωϝ", - "Ωαωϰϕϱϖ", - "ℛℯℊℴ", - "ℬℰℱℋℐℒℳ" + "Ωαωϰϕϱϖ" ], "cSpell.ignoreWords": [ "eigh", diff --git a/PythonScripts/alphanumerics.py b/PythonScripts/alphanumerics.py index 4037fcfcf..752329bd7 100755 --- a/PythonScripts/alphanumerics.py +++ b/PythonScripts/alphanumerics.py @@ -2,9 +2,9 @@ from bs4 import BeautifulSoup def create_unicode_from_html(in_file: str, out_file): - with open(in_file, encoding='utf8') as _in_stream: + with open(in_file, encoding='utf8') as in_stream: with open(out_file, 'a', encoding='utf8') as out_stream: - file_contents = BeautifulSoup(_in_stream, features="html.parser") + file_contents = BeautifulSoup(in_stream, features="html.parser") for row in file_contents.find_all('tr'): cols = row.find_all('td') if len(cols) > 0: @@ -25,6 +25,80 @@ def generate_digits(out_file, prefix: str, hex: str, description: str): i += 1 + +# get the JSON versions -- the HTML versions seem wrong in many places (e.g., bold or numbers) +import json +def create_unicode_from_json(in_file: str, out_file): + with open(in_file, encoding='utf8') as in_stream: + with open(out_file, 'a', encoding='utf8') as out_stream: + file_contents = json.load(in_stream) + info = file_contents["information"].replace("tests", "chars") + out_stream.write('\n # --- {} ---\n'.format(info)) + for char, braille in file_contents['tests'].items(): + if braille["expected"] != "": + generate_char_line(out_stream, char, braille["expected"]) + +import re +MATCH_FACE_LANG_CHAR = re.compile( + ("(" + "(?P^)" + "(?P⠠⠨)?" + "(?P⠸(?=[^⠠⠔⠁⠃⠉⠙⠑⠋⠛⠓⠊⠚⠅⠇⠍⠝⠕⠏⠟⠗⠎⠞⠥⠧⠺⠭⠽⠵⠯⠫⠱⠹]))?" + "(?P