npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

txt-svg

v0.0.1

Published

a simple utility CLI tool to convert ASCII file to a animated SVG

Downloads

5

Readme

txt-svg

A command-line tool for converting ASCII txt file into an animated SVG.

demo

Install

txt-svg should not be added as a dependency to your project, but run as a temporary executable or global CLI tool.

Global

With NPM

npm -g install txt-svg

With Yarn

yarn global add txt-svg

With PNPM

pnpm add -g txt-svg

Temporary

With NPM

npx txt-svg -c <.json> -i <.txt> -o <.svg>

With Yarn

yarn dlx txt-svg <.json> -i <.txt> -o <.svg>

With PNPM

pnpm dlx txt-svg <.json> -i <.txt> -o <.svg>

Usage

txt-svg will need three files to be defined as command-line options.

txt-svg -c <.json> -i <.txt> -o <.svg>

Config (.json)

the configuration file is where you define the tool parameters.

it must respect this form:

{
  "text": {
    "initX": 15,
    "initY": 30,
    "incY": 20,
    "customAttr": "opacity=\"0\""
  },
  "animation": {
    "enabled": true,
    "dur": 0.2,
    "begin": 0,
    "attributeName": "opacity",
    "values": "0;1",
    "fill": "freeze",
    "calcMode": "discrete"
  }
}

| property | description | | --------------- | --------------------------------------------------- | | text | | | initX | Set x value for initial position | | initY | Set y value for initial position | | incY | Set increment position y of each line | | customAttr | Define a custom attribute for each line of <text> | | animation | | | enabled | Activate or deactivate animation function | | dur | Set animation duration for each <text> lines | | begin | Define init time before starting animation | | attributeName | Define the attribute to be animated | | values | Define animated attribute values | | fill | "freeze" or not the final position of animation | | calcMode | Define interpolation mode for animation |

For more information, visit.

Input (.txt)

You can write any text you like this file.

user@user-linux {#key}~{#} figlet "main"

                         __
                        |  \
 ______ ____    ______   \$$ _______
|      \    \  |      \ |  \|       \
| $$$$$$\$$$$\  \$$$$$$\| $$| $$$$$$$\
| $$ | $$ | $$ /      $$| $$| $$  | $$
| $$ | $$ | $$|  $$$$$$$| $$| $$  | $$
| $$ | $$ | $$ \$$    $$| $$| $$  | $$
 \$$  \$$  \$$  \$$$$$$$ \$$ \$$   \$$

But you can use special tag {#<name>} to specify future style rules.

if you write {#}, it will use default style rules.

Output (.svg)

The output file should contain the basic <svg> tag and the special comment (CONTENT_START and CONTENT_END) to indicate where to add new content.

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="985" height="530" font-size="16px">
<!-- you can add custom style here -->
  <style>
    .key {
      fill: green;
    }
  text, tspan {white-space: pre;}
  </style>
<!--CONTENT_START-->
<!--CONTENT_END-->
</svg>