0.1.10 • Published 6 months ago

text-mapper v0.1.10

Weekly downloads
-
License
(AGPL-3.0-or-late...
Repository
-
Last release
6 months ago

npm

text-mapper.js

A port of Alex Schroeder's TextMapper Perl implementation to TypeScript.

Usage

For the syntax of TextMapper files, see the examples in this repository, those generated by the original TextMapper and the help pages.

The API is minimal. The following should get you going:

import { parseFile, renderFile } from "text-mapper";

const map = parseFile("examples/gnomeyland-example.txt", ["resources"]);
renderFile(map, "out.svg")

Example output

Gnomeyland

Traveller

Status of the port

This TypeScript implementation currently only supports hex maps (the original also supports maps with a square grid). Most, but not all the syntax is supported. In particular, all syntax used by the "gnomeyland" and "traveller" examples is supported and renders identically in the TypeScript port and the original Perl implementation.

License

Like the original implementation, the code of this port is licensed under the GNU Affero General Public License version 3, or any later version (AGPL-3-or-later).

Exceptions:

  • resources/gnomeyland.txt was created by Gregory B. MacKenzie and Alex Schroeder and is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license (CC-BY-SA-4.0).
  • resources/apocalypse.txt, resources/default.txt and resources/traveller.txt were created by Alex Schroeder and are licensed in the Public Domain, "No Rights Reserved" (CC0-1.0).
0.1.10

6 months ago

0.1.9

6 months ago

0.1.8

6 months ago

0.1.7

6 months ago

0.1.6

6 months ago

0.1.5

6 months ago

0.1.4

6 months ago

0.1.3

6 months ago

0.1.2

6 months ago

0.1.1

6 months ago

0.1.0

6 months ago