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 🙏

© 2024 – Pkg Stats / Ryan Hefner

textpresentation

v1.4.5

Published

Text presention program on command line

Downloads

396

Readme

tpt

Text presention program on command line.

TYPESCRIPT NODE.JS Known Vulnerabilities

This program is inspired from tpp.

Contents

Installation

The program can be installed using npm/yarn.

yarn global add textpresentation # yarn
#    OR
npm install -g textpresentation # npm

OR

Compile from source

git clone [email protected]:HARDY8118/tpt.git
cd tpt
yarn install
yarn run build
yarn link

Usage

The program can be used to display presentations from using only command line. To open a presentation use the command line utility and provide with location of presentation

tpt presentation

Controls

Once presentation is started, use the following keys to navigate

| Key | Function | |--|--| | Down, Right, K, L | Go to next slide | | Up, Left, J, H | Go back to previous slide | | Esc | End presentation |

Slides

Presentations can be created using any text editor and are defined using JSON standard.

{
    "meta": {
        "author": "<author name/email/info>",
    },
    "config": {
        "min-width": 100,
    },
    "slides":[
        {
            "title": "<Slide title>",
            "content": [
                {"type":"text", "text": "content"},
                {"type":"line", "style": "-"},
            ],
            "timming": {
                "NextAfter": 4
            }
        }
    ]
}

Writing slides

Slides can be defined as an array of object, each object holds type and specific properties associated with it.

Following items can be used in slides.

Line

Draw line

{
    "type": "line",
    "width": 50,
    "style": "-"
}

| Property | Required | Type | Default value | Description | |--|--|--|--|--| | type | ✓ | String | "line" | Specifies type | | width | ✗ | Number | <terminal width> | Width of line in charactters | | style | ✗ | String | "-" | Line style using (length 1 or 3) | | | | | 1 Use same character throughtout | | | | | | 3 1st and 3rd characters on sides, 2nd in minddle |

List

Show bullet list

{
    "type": "list",
    "items" [ "item1", "item2", "item3" ]
    "style": "> ",
    "margin": 0,
    "heading": "Items"
}

| Property | Required | Type | Default value | Description | |--|--|--|--|--| | type | ✓ | String | "list" | Specifies type | | items | ✓ | String[] | | List items | | style | ✗ | String | "> " | Bullet style | | margin | ✗ | Number | 0 | Left margin for list | | heading | ✗ | String | "" | List heading |

Figlet

Figlet can be used to draw large font ascii text.

Internally this program uses figlet package to draw figlet.

Refer figlet documentation for figlet options.

{
    "type": "figlet",
    "text" "figlet"
    "options": {},
}

| Property | Required | Type | Default value | Description | |--|--|--|--|--| | type | ✓ | String | "figlet" | Specifies type | | text | ✓ | String | | Figlet text | | options | ✗ | Figlet Options | {} | Options for figlet text |

Text

Show plain text

{
    "type": "text",
    "text": "sample text",
    "align": "left",
    "style": {
        "textColor": "black",
        "backgroundColor": "bgWhite",
        "styles": ["bold", "underline"]
    }
}

| Property | Required | Type | Default value | Description | |--|--|--|--|--| | type | ✓ | String | "text" | Specifies type | | text | ✓ | String | | Text to display | | align | ✗ | String | "left" | Text alignment | | style | ✗ | Object | | Text style properties |

Text style properties

| Property | Description | Enum | |--|--|--| | textColor | Foreground text color | blackredgreenyellowbluemagentacyanwhitegraygrey | | backgroundColor | Background color of text | bgBlackbgRedbgGreenbgYellowbgBluebgMagentabgCyanbgWhite | | styles | List of formatting styles | bolddimitalicunderlineinversehiddenstrikethrough |

Hchart

Show horizontal bar chart

{
    "type": "hchart",
    "items": [
        ["item1", 1],
        ["item2", 2],
        ["item3", 3]
    ],
    "showValues": true,
    "style": "■"
}

| Property | Required | Type | Default value | Description | |--|--|--|--|--| | type | ✓ | String | "text" | Specifies type | | items | ✓ | [[String, Number]] | | Items and values | | showValues | ✗ | Boolean | true | Show absolute values | | style | ✗ | String | "■" | Chart style |

Code

Code segment with highlighting

{
    "type": "code",
    "lang": "",
    "code": [
        "console.log('Hello');"
    ]
}

| Property | Required | Type | Default value | Description | |--|--|--|--|--| | type | ✓ | String | "text" | Specifies type | | lang | ✗ | String | undefined | Language of code (can be empty) | | code | ✓ | String[] | true | Code to dispay, each line as array item |

Timming

Additionally a timming object can be provided with slide to control timming of slide. The supported properties are:

| Property | Type | Description | | -- | -- | -- | | NextAfter | Number | Scroll to next page after specified seconds |

Contributing

Refer to CONTRIBUTING.md for instructions on how to contribute.

Other Projects

A list of projects which can be useful for making text based presentations.

  • Boxart Svelte app to easily create Unicode box arts.
  • Diagon Interactive ASCII art diagram generators. 🌟
  • taag Interactive FIG driver