All Projects → philpennock → character

philpennock / character

Licence: MIT license
tool for character manipulations

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
HTML
75241 projects

Projects that are alternatives of or similar to character

Unidump
hexdump(1) for Unicode data
Stars: ✭ 31 (+19.23%)
Mutual labels:  unicode, utility
NetUnicodeInfo
Unicode Character Inspector & Library providing a subset of the Unicode data for .NET clients.
Stars: ✭ 42 (+61.54%)
Mutual labels:  unicode, unicode-characters
Stringy
🉑 Stringy - A PHP string manipulation library with multibyte support, performance optimized
Stars: ✭ 135 (+419.23%)
Mutual labels:  unicode, unicode-characters
tableize
Turn lists into tables with ease
Stars: ✭ 12 (-53.85%)
Mutual labels:  utility, tables
wifiqr
Create a QR code with your Wi-Fi login details
Stars: ✭ 207 (+696.15%)
Mutual labels:  utility
xcursorlocate
cursor location indicator for x11
Stars: ✭ 16 (-38.46%)
Mutual labels:  utility
Octotab.crx
⚒ (I'm dead) A super tiny chrome extension making your Github news feed more organized.
Stars: ✭ 17 (-34.62%)
Mutual labels:  utility
ICU4N
International Components for Unicode for .NET
Stars: ✭ 18 (-30.77%)
Mutual labels:  unicode
PathCleaner
Cleanup tool for polluted PATH environment variable
Stars: ✭ 18 (-30.77%)
Mutual labels:  utility
rhq
Manages your local repositories
Stars: ✭ 48 (+84.62%)
Mutual labels:  utility
timestampy
🕒 Bunch of utilities useful when working with UNIX timestamps
Stars: ✭ 21 (-19.23%)
Mutual labels:  utility
DropPoint
Make drag-and-drop easier using DropPoint. Drag content without having to open side-by-side windows
Stars: ✭ 303 (+1065.38%)
Mutual labels:  utility
useful
🇨🇭 A collection of useful functions for working in Elixir
Stars: ✭ 21 (-19.23%)
Mutual labels:  utility
fsimilar
find/file similar
Stars: ✭ 13 (-50%)
Mutual labels:  utility
RaycastVisualization
This asset allows users to view raycasts as the user fires them.
Stars: ✭ 61 (+134.62%)
Mutual labels:  utility
cdetect
🔬 Detect which compiler and compiler version a Linux executable (in the ELF format) was compiled with
Stars: ✭ 23 (-11.54%)
Mutual labels:  utility
dotfiles
dotfiles symbolic links management CLI
Stars: ✭ 156 (+500%)
Mutual labels:  utility
thesis template
A comprehensive LaTeX template with examples for theses, books and more, employing the 'latest and greatest' (UTF8, glossaries, fonts, ...). The PDF artifact is built using CI/CD.
Stars: ✭ 121 (+365.38%)
Mutual labels:  unicode
drain-js
Makes smooth transitions between two numbers.
Stars: ✭ 45 (+73.08%)
Mutual labels:  utility
UnicodeBOMInputStream
Doing things right, in the name of Sun / Oracle
Stars: ✭ 36 (+38.46%)
Mutual labels:  unicode

character

Continuous Integration

This is a tool for various manipulations on characters, as characters rather than full strings, to show names, encodings and more.

The tool is structured as a top-level command, options, and sub-commands which can do different things. Many sub-commands will take a -v verbose option, which gives more detail in a pretty-printed table.

$ character help
[... lists all available sub-commands ...]
$ character version
[...]
$ character search check
[... table of results; search is convenience alias ...]
$ character name ✓
CHECK MARK
$ character named -h
[...]
$ character named 'CHECK MARK'

$ character named -j CHECK MARK

$ character named -v/ check
[... table of results of substring search ...]
$ character browse -b 'Alchemical Symbols'
[... table of results; browse is always a table ...]
$ character transform fraktur Hello world
ℌ𝔢𝔩𝔩𝔬 𝔴𝔬𝔯𝔩𝔡
$ character named -1c 'INFORMATION DESK PERSON' \
    'EMOJI MODIFIER FITZPATRICK TYPE-5'
💁🏾

In the last example, note that -c copies to clipboard; using -vc shows the results in a table but copies only the characters to the clipboard. Without --oneline (-1) each non-verbose character is shown on its own line. In this example we're using an emoji modifier which needs to immediately follow the modified character, so -1c should show you the same thing that is copied to the clipboard where -c on its own would show you the individual parts while copying the modified/combined whole to the clipboard.

character named -v/ smiling

character named -Jj SMILING CAT FACE WITH OPEN MOUTH

Licensed under a MIT-style license.
Accumulated licenses of all dependencies are available too.
Patches welcome.

Building

Run: go build

Assuming defaults, install into ~/go/bin/ with: go build

This software uses Go Modules and requires a sufficiently recent version of Go. Clone this repo anywhere, don't worry about $GOPATH or such things (assuming Go 1.12 or newer).

If you are on an older Go, look for the last release in the v0.3.x series.

WASM

Run: ./util/make_wasm.sh

A directory wasm will be created; the character binary will be compiled into there as main.wasm; a supporting HTML page will be copied in, as well as the Golang wasm_exec.js support page.

Run a web-server which serves up the content of the wasm/ directory and see how it works. We should perhaps have a way to default to verbose mode (for tables) to better support this use-case.

SECURITY NOTE: Note: to have tables work, I switched from innerText to innerHTML, but this early proof-of-concept is not escaping output to be proof against HTML injection attacks. In particular, an unknown command will be echo'd back in the error message, as is fairly common for Unix CLI tools. We could use a separate output area for errors and use innerText for that, but that doesn't solve, eg, the output of transform commands which deliberately make reversible changes to input and displays it.

So don't put this up somewhere public, at least not in a domain with access to any cookies or other credentials worth stealing. But it's a useful toy to explore with. Well, it was for me: "My First WASM".

Table packages

Rendering content to tables requires a table package. We default to my own package, go.pennock.tech/tabular. We originally used github.com/apcera/termtables and briefly tried github.com/olekukonko/tablewriter before switching to writing my own.

(Apcera's repositories have disappeared, the most widespread fork of termtables appears to be github.com/xlab/tablewriter).

You can use Go build tags to switch the table package used. I might remove support for this in the future.

Alternatives

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].