package
A Tapestry for the Terminal
npm install termestryGitHub-flavored package documentation.
Across all versions, last 30 days.
16 in 30 days
Runtime metadata.
Tagged topics.
Estimated unpacked size across 1 packages.
109.5 kB
Includes dependencies.
A dependency free tapestry for the terminal
With Termestry, you can draw on terminal with ease.
Termestry is a Node.js module available through the npm registry. Installation is done using the npm install command:
$ npm install termestryYou can also just add it to your package.json file, and it will be installed the next time you run npm install:
{
"dependencies": {
"termestry": "^0.0.1"
}
}import { Canvas, Paint, Color, Size, Point } from "termestry";
const myPaint = new Paint(
Color.RED /* stroke color */,
Color.BLUE /* fill color */
);
const myCanvas = new Canvas(myPaint); /* create a canvas with the paint */
const size = new Size(10, 10);
myCanvas.rect(
Point.centerFor(size),
size
); /* draw a rectangle at the center of the screen */
myCanvas.draw(); // draw the canvasimport { Paint, Color, Size, Point, Canvas } from './src/index.js';
const myPaint = new Paint(
Color.Red, /* stroke color */
Color.None, /* fill color */
);
const myCanvas = new Canvas(myPaint); /* create a canvas with the paint */
// What is a stick figure?
// O <- A circle (head)
// --- <- A long line (arms)
// | <- A line (body)
// / \ <- Two lines (legs)
const head = new Size(6, 6);
const body = new Size(1, 5);
const arms =
For API usage, and more specific examples, refer to the API (⚠️ Link Broken ⚠️).
Termestry is currently in alpha. While the current API is stable, there may be breaking changes in the future, and more features will be added.
To help with the development of Termestry, you can contribute to the project by submitting issues, pull requests, or shooting me an email at RedYetiDev@gmail.com.
Termestry is licensed under the CC BY 4.0 license. This means that you can use Termestry in any way you want, as long as you give credit to me, the original author (RedYetiDev).
What is "as long as you give credit to me"?
Giving credit is showing that you used Termestry in your project. This can be done by linking to the GitHub repository, or by linking to the npm package.
Can I use Termestry in a commercial project?
Of course! You can use Termestry in any project, commercial or not, as long as you give credit to me.