Tool for hexadecimal text data mapping.
GitHub: https://github.com/YujiSODE/txtMap
Wiki: https://github.com/YujiSODE/txtMap/wiki
Copyright (c) 2018 Yuji SODE <yuji.sode@gmail.com>
This software is released under the MIT License.
See LICENSE or http://opensource.org/licenses/mit-license.php
::txtMap::outputMap hexTxt W fileName;
it outputs mapping result.::txtMap::outputHexMap cMap fileName;
it outputs hexadecimal map converted from unicode character map.
Parameters
$hexTxt: utf-8 encoded string that is composed of hexadecimal characters (0-1anda-f)
and newline character (UnicodeU+00000A)$cMap: unicode character map output by::txtMap::outputMapor::txtMap::hexToMap$W: the maximum integer length for output string$fileName: name of output file
::txtMap::outputHTML hexTxt W title ?comment?;
it outputs mapping result as HTML file using given hexadecimal string and width.
Parameters
$hexTxt: utf-8 encoded string that is composed of hexadecimal characters (0-1 and a-f) and newline character (Unicode U+00000A)$W: the maximum integer length for output string$title: title of output HTML file$comment: an optional comment
scale ?L1 ?R1 ?L2 ?R2????;
it returns hexadecimal scale.
Parameters
$L1and$L2: optional left characters$R1and$R2: optional right characters
::txtMap::to4bitHex list ?Min ?Max??;
it converts nummerical list into a 4-bit hexadecimal string.
to4bitHexis modified version ofto4bit.tcl(Yuji SODE,2018).
Parameters
$list: a numerical list$Minand$Max: minimum and maximum integers
0 and 15 are default values
::txtMap::hexToMap hexTxt W;
it returns unicode character map using given hexadecimal string and width.::txtMap::mapToHex cMap;
it returns hexadecimal map converted from unicode character map output by::txtMap::hexToMap.
Parameters
$hexTxt: utf-8 encoded string that is composed of hexadecimal characters (0-1 and a-f) and newline character (Unicode U+00000A)$cMap: unicode character map output by::txtMap::hexToMap$W: the maximum integer length for output string
::txtMap::rule ?v1 v2?;
it sets a new rule and returns this new rule as a list.
it returns the current rules a list when arguments are not specified.
Parameters
$v1and$v2: optional values
It requires Tcl/Tk 8.6+.
txtMap.tcl
- to4bit/to4bit.tcl (Yuji SODE,2018): the MIT License; https://gist.github.com/YujiSODE/448704a261f872865f6bfa9344aaabd9