Giter VIP home page Giter VIP logo

typelet's Introduction

Photo by Luca Onnibonil on Unsplash. GIF image by Author.

Typelet

Overview

Create and add large words print it with a typewriter effect.

image

Requirement

Installation

Awesome package manager

awesome install shinokada/typelet

Homebrew/Linuxbrew

brew tap shinokada/typelet
brew install typelet

Debian/Ubuntu

curl https://api.github.com/repos/shinokada/typelet/releases/latest | grep "browser_download_url" | grep -Eo 'https://[^\"]*' | xargs wget
sudo apt install ./tera_XXXXXXXX.deb

Change XXXXXXX to the version downloaded.

Uninstallation

Awesome package manager

awesome rm typelet

Homebrew/Linuxbrew uninstallation

brew uninstall typelet

Debian/Ubuntu uninstallation

This method works for Debian/Ubuntu, Awesome package manager, and Homebrew/Linuxbrew.

curl -s https://raw.githubusercontent.com/shinokada/typelet/main/uninstall.sh > tmp1 && bash tmp1 && rm tmp1

Usage

Usage: typelet [command] [options...] [arguments...]

Options:
  -h, --help
      --version

Commands:
Use command -h for a command help.
  create    Creates a word/line.
  add       Adds a word/line.
  space     Adds spaces.
  read      Reads the Typelet file.
  empty     Add a empty line.
  print     Prints the Typelet file.
  open      Opens the Typelet file with an editor.
  gist      Creates a Gist.
  url       Saves a Gist to your Typelet file using a Gist URL.

Fonts

Install fonts from Figlet fonts or figlet-fonts.

Please use lowercase letters for a file name.

apt

If you installed Figlet with the sudo apt install figlet command, font files are in /usr/share/figlet/ or /usr/share/figlet/fonts/.

Homebrew

If you installed Figlet using brew on ARM64 Mac, installed files are in the /opt/homebrew/Cellar/figlet/<version>/share/figlet/fonts directory. For x86_64 Mac, installed files are in the /usr/local/Cellar/figlet/<version>/share/figlet/fonts directory.

Colors

When you print, use following number with the --color or -c option. Default: green

Colors
black
red
green
yellow
blue
magenta
cyan
white

Interval

When you print, interval determines the interval time. Use with -i or --interval. Default: medium

Speed Time
slow 0.01-0.09 sec
medium 0.001-0.009 sec
fast 0.0001-0.0009 sec

Space

Use the space command to add spaces in front of all lines. Default: 0

Empty line

You can add a empty line using the empty command.

Command help

Each command has a help menu.

typelet create -h
typelet add -h
typelet space -h
typelet read -h
typelet empty -h
typelet print -h
typelet open -h
typelet gist -h
typelet url -h

Examples

Create a new

Create a new Typelet file. The default font is standard.

typelet create Bash

Add a line

After creating a new Typelet file, you can add a new line using the add option. Change a font using the -f option with a font name.

typelet add Scripts -f banner 

Add a empty line

typelet empty

Spaces

Use the space option to add spaces in front of all lines. The space option takes a number.

typelet space 30

This will add 30 spaces in front of all lines.

If you want to add spaces in front of a word/line, use quotes:

typelet create "     Typelet" -f standard 

Read the Typelet file

The read subcommand prints what's in the Typelet file.

typelet read

Print

Print using the default settings.

typelet print

Print it with the fastest mode 3 and red color.

typelet print --color cyan -i fast
# or
typelet print -c red -i slow

Manually edit Typelet file

Sometimes you want to edit the Typelet file ma

Use open to open the Typelet file in a editor.

typelet open

This will open the terminal default editor. If it's not set, vim will open.

Use one from vi, emacs or vscode.

typelet open vi

Save it to Gist

You can save what you created to a Gist using gist.

typelet gist

Save to the local from a Gist

You can save a Gist to your Typelet file using url.

typelet url https://gist.github.com/shinokada/f7996e53914bc55854d2a800ec20ef82

Other functions

# print version
typelet -v

# print help
typelet -h

See figlet, for font examples.

Limitations

A long word splits to multiple lines.

You can check it using typelet read.

Reference

Author

Shinichi Okada

License

MIT License

Copyright (c) 2021 Shinichi Okada

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

typelet's People

Contributors

shinokada avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.