Neutralplier alphabet
From Soyjak Wiki, the free ensoyclopedia
Jump to navigationJump to search
>Though maybe you were looking for Neutralplier, the 'jak in question?
The Neutralplier Alphabet is a collection of letterjaks, each stylized to appear like Neutralplier, ranging from A to Z.

History[edit | edit source]
'tters A-Z can be found both in isolation and in occasional threads devoted to their use. Legend says some punctuationpliers exist, but you should not investigate this.
They are exclusively capital letters. Like with punctuation, there are no rumors of lowercase letters, and you shouldn't spend your time thinking about things like that.
Neutralplier Text Generation[edit | edit source]
The Bash script below will help you create images from text with the Neutralplier alphabet.


#!/bin/bash # neutralbet.sh - Text to image using the Neutralplier alphabet # Example setup: ## 1. Select all & copy the text of script ## 2. Paste into / create a file named "neutralbet.sh" ## (Do this in the folder you want to run this script from) ## 3. Install imagemagick if it didn't come with your system ## The method for installing this varies, e.g.: ## * On Ubuntu, run `sudo apt install imagemagick` ## * On Windows, run Cygwin's setup.exe and search 'magick' ## * On Android (Termux), run `pkg install imagemagick` (or use apt directly) ## 5. Open a Bash terminal and cd to the directory you put this script in ## 6. Run `chmod +x neutralbet.sh` ## * Not necessary on Windows, at least with Cygwin ## * Note: On Android, scripts in /storage/emulated cannot be executed ## (Use Termux's internal directories, like /home/user) ## 7. Run `./neutralbet.sh text_here o algo` ## 8. The final output line will be the location of the generated image. # Usage notes: ## Change $lettersDir if you'd like. Letter images will be stored there. ## Run the script wherever you want the images created ## (or specify the output directory with --dir=somewhere) ## Separate lines with spaces (each argument is one line) ## Separate words on one line with underscores (they become horizontal spaces) ## (you can use quoted spaces too) ## e.g. ./neutralbet.sh --center fuck_you mom --dir=ywnbaw # Options: ## --wide-spaces ## --center (center each line) ## --right (right-align each line) ## --dir=OUT_DIRECTORY_HERE (the '=' can be any symbol except a space) # Dependencies (may have come with your system): # * imagemagick (sometimes just referred to as "magick") # If you need help just ask me ( https://soyjakwiki.org/User:Femsoy ) lettersDir="$HOME/neutralbet-images" # letter images dir soyjakWiki=https://soyjakwiki.org magCmd="convert" imVerInt="$( magick --version|& sed -zr 's|[\n\r]||g'| # idk why but -z fucks $ up sed -r 's|^[^0-9]*agick[ \t]*([0-9]+)[^0-9].*$|\1|gi' )" [ "$imVerInt" -ge 7 ]&&magCmd="magick" allLettersUrl="$soyjakWiki/images/1/10/Neutralplier-alphabet.png" userAgent='Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0' mainDir="$PWD" mkdir -p "$lettersDir" outDir="$mainDir" [[ "$@" == *'--dir'* ]]&&outDir="$( printf %s\\n $@| LC_ALL=C grep -aie '--dir'| LC_ALL=C sed -r ' s|--dir[^ ]|| s|/+$|| ' )" outImage="$outDir/$( echo -n " $@ "| head -c 200| LC_ALL=C sed -r ' s| -[^ ]+||g s|[ \r\n\t]|_|g s|^[ _]+|| s|[ _]+$|| ' )_${EPOCHREALTIME//\./-}.png" haveLetters=true letterWidth='' letterHeight='' for letter in {a..z}; do if ! [ -f "$lettersDir/$letter.png" ]; then haveLetters='' # false break fi done if ! [ "$haveLetters" ];then( cd "$lettersDir" [ -f "allLetters.png" ]||{ echo "Downloading letter images ↓">/dev/stderr curl -U"$userAgent" -H"referer:$soyjakWiki" "$allLettersUrl" -o"allLetters.png" } initVal="$(printf %d "'a")" letterWidth=594 # it just is ok? for letter in {a..z}; do offset=$(($(printf %d "'$letter")-initVal)) [ -f "$letter.png" ]&&continue maxHeight="$( identify allLetters.png| LC_ALL=C grep -aioE 'PNG [0-9]+x[0-9]+'| LC_ALL=C sed 's|^.*x||' )" echo "Creating $letter.png in '$PWD'">/dev/stderr "$magCmd" allLetters.png -crop "${letterWidth}x$maxHeight+$(( offset*letterWidth ))+0" "$letter.png" done );fi letterDims="$( identify "$lettersDir/a.png"| LC_ALL=C sed -r 's|^.*[ \t]([0-9]+x[0-9]+)[ \t].*$|\1|i' )" [ ! "$letterWidth" ]&&letterWidth="${letterDims/[Xx]*}" letterHeight="${letterDims/*[Xx]}" space=$( "$magCmd" -size "$letterDims" 'xc:#00000000' png:-| LC_ALL=C base64 ) narrowSpaceWidth=$((letterWidth/2)) narrowSpace=$( "$magCmd" -size "${narrowSpaceWidth}x${letterHeight}" 'xc:#00000000' png:-| LC_ALL=C base64 ) narrowSpaces=true [[ "$@" == *'--wide-spaces'* ]]&&{ narrowSpaces='' # [ '' ] is false; anything else is true } longestArgLen=0 longestArg_noSpaces='' longestArg_nSpaces='' maxLinePadding=50;linePadding=$(($#*4)) [ $linePadding -gt $maxLinePadding ]&& let linePadding=maxLinePadding if ! [ "$narrowSpaces" ]; then longestArgLen="$(awk '(length > maxlen) { maxlen = length; longest = $0; # The entire line } END { printf longest; }' <( printf %s\\n $@| LC_ALL=C grep -ave '^-' )|wc -c )" let longestArgLen*=2 else # Need to do math so loop for((iA=1;iA<=$#;iA++)){ tArg="$( # fuck this language eval "echo -n \"\${$iA}\"" # e.g. iA=14 → get argument #14 ("${14}") # (need brackets for multidigit positional args # i.e. "$9" is fine but "$10" prints $1 then a zero) )" [[ "$tArg" == '-'* ]]&&continue tArg="${tArg// /_}" tArg_noSpaces=${tArg//_} tArgLen=$((${#tArg}*2)) let tArgLen-=$((${#tArg}-${#tArg_noSpaces})) [ $tArgLen -gt $longestArgLen ]&&{ let longestArgLen=tArgLen longestArg="$tArg" longestArg_noSpaces="${longestArg//_}" let longestArg_nSpaces=$((${#longestArg}-${#longestArg_noSpaces})) } } fi right='' # false center='' # false if [[ "$@" == *'--right'* ]]; then right=true elif [[ "$@" == *'--center'* ]]; then center=true fi eval "$magCmd"$' -background \'#00000000\' '"$(first=true;for((ia=1;ia<=$#;ia++)){ arg="$(eval "echo -n \"\${$ia}\"")" [[ "${arg#-}" != "$arg" ]]&&continue # skip options first='' arg="${arg//_/ }" echo "Writing line: '$arg'">/dev/stderr [ "$first" ]||echo -n $' -size "x'"$linePadding"$'" xc:none ' echo -n $'\'(\' ' argLen=$((${#arg}*2)) arg_noSpaces=${arg// } nSpaces=$((${#arg}-${#arg_noSpaces})) if [ "$narrowSpaces" ]; then # Each letter & space are up to here worth 2 - ie # assumed to be "full-width" so now subtract 1 from each space # since the narrow spaces would be halfwidth. let argLen-=nSpaces fi thisLetterWidth="$letterWidth" if [ $longestArgLen -le $argLen ]; then echo -n '' # >you will NOT make a blank 'if' case elif [ "$narrowSpaces" ] && [ "$center" ]; then partie=$(((longestArgLen-argLen)/2)) addie=0 if [[ # Bash cannot do decimal math (it truncates to integers). # So e.g. lines w/ 0 and 0 spaces would be # fine, but 1 and 2 would differ by half a letter # in "reported" width for alignment. $((longestArg_nSpaces%2)) -ne $((nSpaces%2)) ]]; then let addie++ fi echo -n ' -size '"$(( (partie*(letterWidth/2))+ (addie*(narrowSpaceWidth/2)) ))"$' \'xc:#00000000\' ' elif [ "$center" ]; then echo -n ' -size '"$(( (((longestArgLen-argLen)/2)*letterWidth)/2 ))"$' \'xc:#00000000\' ' elif [ "$right" ]; then echo -n ' -size '"$(( ((longestArgLen-argLen)*letterWidth)/2 ))"$' \'xc:#00000000\' ' fi for((is=0;is<${#arg};is++)){ ss="$(echo "${arg:$is:1}"|sed -r 's|^.*$|\L\0|')" if [[ "$ss" != ' ' ]]; then echo -n "'$lettersDir/$ss.png' " elif ! [ "$narrowSpaces" ]; then echo -n "png:<(echo -n \"$space\"|LC_ALL=C base64 -d) " else echo -n "png:<(echo -n \"$narrowSpace\"|LC_ALL=C base64 -d) " fi } echo -n $'+append \')\'' }) -append \"$outImage\""&& echo $'\e[1;32mImage created:\n\e[3;33m'"$outImage"$'\e[0m'>/dev/stderr
Citations
- ↑ The white-on-red Spiral of Academia in the article was created with the call
./neutralbet.sh _________ab______ ______cd________ _____e______f____ _______g__h__ij__ kl_____m_______no __pq_r__s______ _____t______uv____ ___________wx______ ________yz________