Created
September 6, 2019 19:35
-
-
Save esoterik/e51995a9459ab05819e98157adfd0864 to your computer and use it in GitHub Desktop.
ruby script to encode characters in whitespace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def substitute(art, count) | |
split = art.split "" | |
spaces = split.each_index.select { |i| split[i] == " " } | |
to_alter = spaces.sample(count) | |
to_alter.each { |i| split[i] = "\u2800" } | |
split.join "" | |
end | |
ascii = [" | |
⣧ ⣿ | |
⢀⣿⣧ ⢰⡿⡇ | |
⢸⣿⡟⡆ ⣿⡇⢻ | |
⢸⣿ ⣿ ⢰⣿⡇⢸ | |
⢸⣿⡄⢸ ⢸⣿⡇⢸ | |
⠘⣿⡇⢸⡄⠸⣿⡇⣿ | |
⢿⣿⢸⡅ ⣿⢠⡏ | |
⠈⣿⣿⣥⣾⣿⣿ | |
⣿⣿⣿⣿⣿⣿⣿⣆ | |
⢸⣿⣿⣿⡿⡿⣿⣿⡿⡅ | |
⢸⠉ ⠉⡙⢔⠛⣟⢋⠦⢵ | |
⣾⣄ ⠁⣿⣯⡥⠃ ⢳ | |
⢀⣴⣿⡇ ⠐⠠⠊⢀ ⢸ | |
⢀⣴⣿⣿⣿⡿ ⠈⠁ ⠘⣿⣄ | |
⣠⣿⣿⣿⣿⣿⡟ ⠈⣿⣷⡀ | |
⣾⣿⣿⣿⣿⣿⠋ ⠈⣿⣿⣧ | |
⡜⣭⠤⢍⣿⡟ ⢸⢛⢭⣗ | |
⠁⠈ ⣀⠝ ⠄⠠ ⠰⡅ | |
⢀ ⡀⠡ ⠁⠔⠠⡕ | |
⣿⣷⣶⠒⠁ ⢰ | |
⠘⣿⣿⡇ ⠰ | |
⠈⢿⣿⣦ ⢠⠊⠉⢆ | |
⢀⠤ ⢤⣤⣽⣿⣿⣦⣀⢀⡠⢤⡤⠄ ⠒ ⠁ ⢘⠔ | |
⡐⠈⠁⠈⠛⣛⠿⠟⠑⠈ | |
⠉⠑⠒ ⠁ ", | |
" | |
_,.----------.,_ | |
,;~' '~;, | |
,; ;, | |
; ; | |
,' ', | |
,; ;, | |
; ; . . ; ; | |
| ; ______ ______ ; | | |
| `/~' ~' . '~ '~\\' | | |
| ~ ,-~~~^~, | ,~^~~~-, ~ | | |
| | }:{ | | | |
| l / | \\ ! | | |
.~ (__,.--' .^. '--.,__) ~. | |
| ---;' / | \\ `;--- | | |
\\__. \\/^\\/ .__/ | |
V| \\ / |V | |
| |T~\\___!___!___/~T| | | |
| |`IIII_I_I_I_IIII'| | | |
| \\,III I I I III,/ | | |
\\ `~~~~~~~~~~' / | |
\\ . . / -dcau (4/15/95) | |
\\. ^ ./ | |
^~~~^~~~^", | |
" | |
========================================================================= | |
________________ _______________ _______________ | |
/_______________/\\ /_______________\\ /\\______________\\ | |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ ||||||||||||||||| / //////////////// | |
\\\\\\\\\\________/\\ |||||________\\ / /////______\\ | |
\\\\\\\\\\\\\\\\\\\\\\\\\\/____ |||||||||||||| / ///////////// | |
\\\\\\\\\\___________/\\ ||||| / //// | |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ ||||| \\//// e c t o r | |
=========================================================================", | |
" | |
ROFL:ROFL:ROFL:ROFL | |
___^___ _ | |
L __/ [] \\ | |
LOL===__ \\ | |
L \\___ ___ ___] | |
I I | |
----------/", | |
" | |
.==,_ | |
.===,_`\\ | |
.====,_ ` \\ .====,__ | |
--- .==-,`~. \\ `:`.__, | |
--- `~~=-. \\ /^^^ ...always on the go! | |
--- `~~=. \\ / | |
`~. \\ / | |
~. \\____./ | |
jgs `.=====) | |
___.--~~~--.__ | |
___\\.--~~~ ~~~---.._|/ | |
~~~\" /", | |
" | |
___ | |
/ \\\\ | |
/\\\\ | . . \\\\ | |
////\\\\| || | |
//// \\\\ ___//\\ | |
/// \\\\ \\ | |
/// |\\\\ | | |
// | \\\\ \\ \\ | |
/ | \\\\ \\ \\ | |
| \\\\ / / | |
| \\/ / | |
| \\\\/| | |
| \\\\| | |
| \\\\ | |
| | | |
|_________\\ ", | |
" | |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ | |
||||||||||||||||||||||||||||| | |
| \"||,,,,. \"|\" .,,,,||\" ____ | |
| .d8888b. .d8888b. ( ) _____ | |
/|\\ o8' o '8o o8'o `8o | | ( ) | |
||| o8. .8o o8. .8o | | _______ | | | |
`Y8888P' `Y8888P' | |( )| | | |
,||''|| \\ / ||''||, | || || | | |
,|| ||, \\ / .|| ||, | || || | | |
|| || ` || || | || || | | |
,|| '|| ||' ||, | || || | _ | |
|| '|| ||' || | || || || \\ | |
|| |; ;| || | || || || ' | |
|| ,| |, || | || || || ' | |
||, ,|| ||, ,|| | || || || | | |
||, ,||| |||, ,|| | || || || | | |
'||,,||||,...,||||,,|| | || || ||___|_ | |
`|||...\"|||\"...|||' (____)(_______)(_____)|____| | |
|%%%%%%%%WWWW%%%%%%WWWW%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%| | |
`\"\"\"\"\"\"\"\"\"\"3$F\"\"\"\"#$F\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"' | |
@$.... '$B | |
d$$$$$$$$$$: | |
````````````", | |
" | |
! ! | |
! ! ! ! | |
! . ! ! . ! | |
^^^^^^^^^ ^ | |
^ ^ | |
^ (0) (0) ^ | |
^ \"\" ^ | |
^ *************** ^ | |
^ * * ^ | |
^ * /\\ /\\ /\\ * ^ | |
^ * * ^ | |
^ * /\\ /\\ /\\ /\\ * ^ | |
^ * * ^ | |
^ * * ^ | |
^ * * ^ | |
^ * * ^ | |
^* * ^ | |
^ * * ^ | |
^ * * ^ | |
^ * ) ( * ^ | |
^^^^^^^^ ^^^^^^^^^ | |
\"Totoro\" (from \"My Neighbor Totoro\") | |
--- Mabel Mak", | |
" | |
/^--^\\ /^--^\\ /^--^\\ | |
\\____/ \\____/ \\____/ | |
/ \\ / \\ / \\ | |
| | | | | | | |
\\__ __/ \\__ __/ \\__ __/ | |
|^|^|^|^|^|^|^|^|^|^|^|^\\ \\^|^|^|^/ /^|^|^|^|^\\ \\^|^|^|^|^|^|^|^|^|^|^|^| | |
| | | | | | | | | | | | |\\ \\| | |/ /| | | | | | \\ \\ | | | | | | | | | | | | |
########################/ /######\\ \\###########/ /####################### | |
| | | | | | | | | | | | \\/| | | | \\/| | | | | |\\/ | | | | | | | | | | | | | |
|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|", | |
" | |
.,,uod8B8bou,,. | |
..,uod8BBBBBBBBBBBBBBBBRPFT?l!i:. | |
,=m8BBBBBBBBBBBBBBBRPFT?!|||||||||||||| | |
!...:!TVBBBRPFT||||||||||!!^^\"\"' |||| | |
!.......:!?|||||!!^^\"\"' |||| | |
!.........|||| |||| | |
!.........|||| ## |||| | |
!.........|||| |||| | |
!.........|||| |||| | |
!.........|||| |||| | |
!.........|||| |||| | |
`.........|||| ,|||| | |
.;.......|||| _.-!!||||| | |
.,uodWBBBBb.....|||| _.-!!|||||||||!:' | |
!YBBBBBBBBBBBBBBb..!|||:..-!!|||||||!iof68BBBBBb.... | |
!..YBBBBBBBBBBBBBBb!!||||||||!iof68BBBBBBRPFT?!:: `. | |
!....YBBBBBBBBBBBBBBbaaitf68BBBBBBRPFT?!::::::::: `. | |
!......YBBBBBBBBBBBBBBBBBBBRPFT?!::::::;:!^\"`;::: `. | |
!........YBBBBBBBBBBRPFT?!::::::::::^''...::::::; iBBbo. | |
`..........YBRPFT?!::::::::::::::::::::::::;iof68bo. WBBBBbo. | |
`..........:::::::::::::::::::::::;iof688888888888b. `YBBBP^' | |
`........::::::::::::::::;iof688888888888888888888b. ` | |
`......:::::::::;iof688888888888888888888888888888b. | |
`....:::;iof688888888888888888888888888888888899fT! | |
`..::!8888888888888888888888888888888899fT|!^\"' | |
`' !!988888888888888888888888899fT|!^\"' | |
`!!8888888888888888899fT|!^\"' | |
`!988888888899fT|!^\"' | |
`!9899fT|!^\"' | |
`!^\"'" | |
] | |
encode = "cephalopod".codepoints | |
complete = [] | |
encode.zip(ascii).each do |c, a| | |
complete.push(substitute(a, c)) | |
end | |
complete.each_with_index do |x, i| | |
puts x | |
puts x.count("\u2800").chr | |
File.open("complete/#{i}.txt", 'w') do |f| | |
f.write(x) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment