Skip to content

ericdke/PnutSays

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PnutSays

A command-line tool inspired by cowsay, dedicated to pnut.io

Usage

Classic

Type pnutsays then add the message between double quotes.

pnutsays "Welcome to a world of moo, this is so awesome"

usage

Pnut Printer

Add the -p option to generate the appropriate tag.

pnutsays -p "Hello world, I love you pnutprinter"

printer

Tips

Special characters

When typing in most terminals, special characters must be escaped: they have to be preceded by an antislash "\".

pnutsays "Welcome to a world of \"moo\", this is so awesome\!"

This is not always true, though. For example you don't have to escape exclamation marks in Linux Mint's terminal, but you do in macOS's one. YMMV

longword

Long words

Words longer than the authorized limit will be wrapped to the next line.

pnutsays "Hello, I am someveeeeerylongwordohlala"

longword

ASCII tag

Some pnut clients, like Apero, can display fixed-width fonts if you add the tag "#ascii" in the post. This may help display the cow properly. However, Apero automatically switches to fixed-width font for posts that include the pnutprinter tag. YMMV

Copy to clipboard

On a Mac, add " | pbcopy" at the end of the command to send the result to the clipboard.

pnutsays "Welcome to a world of moo, this is so awesome" | pbcopy

Some applications add a space character at the end of the text when pasted, please remember to remove it before posting for pnutprinter. The last character in the post has to be the asterisk, right after the pnutprinter tag, as generated by PnutSays.

Send to Apero

If Apero is running, send directly the pnutsays content to a new post with this command:

open "apero://post=$(pnutsays \"Hello from Apero and pnutsays\")"

Install

pnutsays is written in Swift 5. You must have Swift 5 installed on your system in order to compile and install pnutsays.

Download Installation

Once Swift is installed on your system, cd into the pnutsays directory (the root of this repository) and do:

swift build --configuration release

Then copy the executable to a path where the terminal can find it:

cp -f .build/release/pnutsays /usr/local/bin/pnutsays

Licence

The content of this repository is licenced under the MIT licence.

About

A command-line tool inspired by cowsay, written in Swift, dedicated to pnut.io

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages