Loading config.ini +7 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,13 @@ ff0c = 2c20 d7 = 78 ; Ligature "fi" fb01 = 6669 ; "<=" f0fd = 3c3d ; "=>" f0e0 = 3e3d ; "<=>" f0df = 3c3d3e [media] Loading spec2md.py +17 −4 Original line number Diff line number Diff line Loading @@ -402,9 +402,22 @@ def processDocuments(documents:list[str], outDirectory:str, skipImageConversion: pass # ignore a soft hyphen character which has no meaning in Markdown and zero-width case 'sym': _symError = f'unknown font+symbol: {element.attrib["{"+wns+"}font"]} - "{element.attrib["{"+wns+"}char"]}"' def _symError(ch:str) -> str: nonlocal _result _symError = f'unknown font+symbol: {element.attrib["{"+wns+"}font"]} - "{element.attrib["{"+wns+"}char"]} ({ch})"' _print(f'[yellow]{_symError}') _result += f'<mark>{_symError}</mark>' try: _ch = '????' _ch = int(element.attrib["{"+wns+"}char"], 16) if _ch in docConfig.characters: if (rch := docConfig.characters[_ch]) == chr(0): rch = '' _result += rch else: _symError(_ch) except ValueError as e: _symError(_ch) # ignore deleted test case 'del': Loading Loading @@ -791,7 +804,7 @@ def processDocuments(documents:list[str], outDirectory:str, skipImageConversion: for i in range(len(lines)): line = lines[i] if _captionMarker in line: _print(f'[yellow]Unresolved figure caption : \[{i}] "{line}"') _print(f'[yellow]Unresolved / unreferenced figure caption : \[{i}] "{line}"') # # Write produced Markdown file Loading Loading
config.ini +7 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,13 @@ ff0c = 2c20 d7 = 78 ; Ligature "fi" fb01 = 6669 ; "<=" f0fd = 3c3d ; "=>" f0e0 = 3e3d ; "<=>" f0df = 3c3d3e [media] Loading
spec2md.py +17 −4 Original line number Diff line number Diff line Loading @@ -402,9 +402,22 @@ def processDocuments(documents:list[str], outDirectory:str, skipImageConversion: pass # ignore a soft hyphen character which has no meaning in Markdown and zero-width case 'sym': _symError = f'unknown font+symbol: {element.attrib["{"+wns+"}font"]} - "{element.attrib["{"+wns+"}char"]}"' def _symError(ch:str) -> str: nonlocal _result _symError = f'unknown font+symbol: {element.attrib["{"+wns+"}font"]} - "{element.attrib["{"+wns+"}char"]} ({ch})"' _print(f'[yellow]{_symError}') _result += f'<mark>{_symError}</mark>' try: _ch = '????' _ch = int(element.attrib["{"+wns+"}char"], 16) if _ch in docConfig.characters: if (rch := docConfig.characters[_ch]) == chr(0): rch = '' _result += rch else: _symError(_ch) except ValueError as e: _symError(_ch) # ignore deleted test case 'del': Loading Loading @@ -791,7 +804,7 @@ def processDocuments(documents:list[str], outDirectory:str, skipImageConversion: for i in range(len(lines)): line = lines[i] if _captionMarker in line: _print(f'[yellow]Unresolved figure caption : \[{i}] "{line}"') _print(f'[yellow]Unresolved / unreferenced figure caption : \[{i}] "{line}"') # # Write produced Markdown file Loading