runefinder

package module
v0.0.0-...-a3fdd8b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2020 License: BSD-3-Clause Imports: 6 Imported by: 0

README

runefinder

A tool for finding Unicode characters by name. Command-line and Web interfaces.

Building

To compile the runes command, in the cmd/runes directory:

$ cd cmd/runes/
$ go build
$ ls -lh runes
-rwxrwxr-x 1 luciano luciano 2,6M Mar  7 00:11 runes

To use runes, provide one or more words to search:

$ ./runes party
U+1F389	🎉	PARTY POPPER
1 character found

$ ./runes cat eyes
U+1F638	😸	GRINNING CAT FACE WITH SMILING EYES
U+1F63B	😻	SMILING CAT FACE WITH HEART-SHAPED EYES
U+1F63D	😽	KISSING CAT FACE WITH CLOSED EYES
3 characters found

Optional Web interface

The runeweb command starts a local HTTP server on port 8000 offering a simple Web interface for searching. This is the best way to use runefinder on Windows until Microsoft improves the Unicode coverage of the fonts used in in cmd.exe or PowerShell.

Run the server:

$ cd cmd/runeweb/
$ go run runeweb.go
Serving on: localhost:8000

Open http://localhost:8000 on your browser and search:

Runefinder HTTP interface

Web interface on Google App Engine

The appengine/ directory has the main.go and configuration files for running Runefinder on the Google App Engine platform.

Link to running app: runefinder2018.appspot.com

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter(index Index, query string) (result runeset.Set)

Filter takes a runefinder.Index and a query; returns a matching set of runes.

func Home

func Home(w http.ResponseWriter, req *http.Request)

Home handles the form in the homepage

Types

type Index

type Index map[string]runeset.Set

Index is an inverted index: a mapping of words to Unicode characters with those words in their names

func BuildIndex

func BuildIndex() (index Index)

BuildIndex builds the inverted index for all runes

type Link struct {
	Location template.URL
	Text     string
}

Link represents an HTML link

type RuneRecord

type RuneRecord struct {
	Code string
	Char string
	Name string
}

RuneRecord holds data about one Unicode character

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL