Giter Site home page Giter Site logo

yujisode / txtmap Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 30 KB

Tool for hexadecimal text data mapping.

Home Page: https://yujisode.github.io/txtMap/

License: MIT License

Tcl 100.00%
hexadecimal text mapping character hexadecimal-scale unicode-character-map data-mapping html html-output hexadecimal-string

txtmap's Introduction

txtMap

Tool for hexadecimal text data mapping.
GitHub: https://github.com/YujiSODE/txtMap
Wiki: https://github.com/YujiSODE/txtMap/wiki

Copyright (c) 2018 Yuji SODE <[email protected]>
This software is released under the MIT License.
See LICENSE or http://opensource.org/licenses/mit-license.php


1. Synopsis

Output

  • ::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-1 and a-f)
    and newline character (Unicode U+00000A)
  • $cMap: unicode character map output by ::txtMap::outputMap or ::txtMap::hexToMap
  • $W: the maximum integer length for output string
  • $fileName: name of output file

Output as HTML 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

Hexadecimal scale

  • scale ?L1 ?R1 ?L2 ?R2????;
    it returns hexadecimal scale.

Parameters

  • $L1 and $L2: optional left characters
  • $R1 and $R2: optional right characters

Others

Converting into 4-bit hexadecimal string

  • ::txtMap::to4bitHex list ?Min ?Max??;
    it converts nummerical list into a 4-bit hexadecimal string.
    to4bitHex is modified version of to4bit.tcl (Yuji SODE,2018).

Parameters

  • $list: a numerical list
  • $Min and $Max: minimum and maximum integers
    0 and 15 are default values

Character map and hexadecimal map

  • ::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

Converting rule

  • ::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

  • $v1 and $v2: optional values

2. Script

It requires Tcl/Tk 8.6+.

  • txtMap.tcl

3. Library list

txtmap's People

Contributors

yujisode avatar

Stargazers

 avatar

Watchers

 avatar  avatar

txtmap's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.