A command-line tool inspired by cowsay, dedicated to pnut.io
Type pnutsays then add the message between double quotes.
pnutsays "Welcome to a world of moo, this is so awesome"
Add the -p option to generate the appropriate tag.
pnutsays -p "Hello world, I love you pnutprinter"
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
Words longer than the authorized limit will be wrapped to the next line.
pnutsays "Hello, I am someveeeeerylongwordohlala"
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
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.
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\")"
pnutsays is written in Swift 5. You must have Swift 5 installed on your system in order to compile and install pnutsays.
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
The content of this repository is licenced under the MIT licence.



