
originally published: February 2013
#!/bin/bash ################################################################################ # Create a 'Frame-Averaged Pixel Array' of a given video. Works by reducing # each frame to a single pixel, and appending all frames into single image. # - Takes: $1=Filename [$2=width] # - Requires: ffmpeg + ffprobe # ver. 1.1 - 10th November, 2015 # source: https://oioiiooixiii.blogspot.com ############################################################################### width="${2:-640}" # If no width given, set as 640 duration="$(ffprobe "$1" 2>&1 \ | grep Duration \ | awk '{ print $2 }')" seconds="$(echo $duration \ | awk -F: '{ print ($1 * 3600) + ($2 * 60) + $3 }' \ | cut -d '.' -f 1)" fps="$(ffprobe "$1" 2>&1 \ | sed -n 's/.*, \(.*\) fps,.*/\1/p' \ | awk '{printf("%d\n",$1 + 0.5)}')" frames="$(( seconds*fps ))" height="$(( frames/width ))" filters="tile=${width}x${height}" clear printf "$(pwd)/$1 ___Duration: ${duration::-1} ____Seconds: $seconds ________FPS: $fps _____Frames: $frames _____Height: $height ____Filters: $filters\n" # First instance of FFmpeg traverses the frames, the second concatenates them. ffmpeg \ -y \ -i "$1" \ -vf "scale=1:1" \ -c:v png \ -f image2pipe pipe:1 \ -loglevel quiet \ -stats \ | ffmpeg \ -y \ -i pipe:0 \ -vf "$filters" \ -loglevel quiet \ "${1%.*}_$width".png ################################ NOTES ####################################### # Single line solution, but doesn't show progress # ffmpeg -i "$1" -frames 1 -vf "$filters" "${1%.*}".png -y # filters="scale=1:1,tile=${width}x${height}" # Used with single line version # View ingest progress using: pv "$1" | piped to ffmpegdownload: video2pixarray.sh
script -q /dev/null -c "tiv image.jpg" | ansi2html.sh > image.html # output 'pre' tags refined with 'line-height' and 'font-size' stylingN.B. Due to tag limits set for blog post content, this is only a screen capture representing the result. The actual html representation is demonstrated here: https://oioiiooixiii.blogspot.com/p/ansi2html.html
1 #!/bin/bash 2 # An example Bash script 3 # Version: 2018.08.19.19.33.05 4 5 function main() # An example function 6 { 7 local sentence="Hello, World!" 8 for (( i=0;i<"${1:-1}";i++ )) 9 { 10 echo "$sentence" 11 } 12 } 13 main "$@" 14 exit
bat -n --color always --theme "1337" example.sh \ | ansi2html.sh --bg=dark > example.html
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣿⣿⣿⣿⢿⣿⣻⣿⣿⣿⣷⣿⣯⣿⣽⣿⡿⣿⣏⣿⣾⡿⣻⣽⣻⣯⣯⡿⣾⣳⡿⣯⣾⢿⢾⣟⡽⣯⣯⣹⣏⣯⣽⢯⡽⡯⣏⣗⡿⣺⢽⣝⢯⢽⡽⣳⢽⣞⣚⣞⠯⣗⢯⣖⡯⢯⡶⣏⣹⠶⢯⣚⣝⡼⣹⠶⣓⡧⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⡿⢿⣝⣟⣟⠯⠻⠝⢑⠹⠋⠹⠺⠿⠿⡿⣿⣝⣿⣟⣾⣻⣯⣽⣿⣽⣻⣽⣻⣿⣾⢿⣟⣿⣾⣻⣷⢿⣷⡿⣟⡽⣾⣷⣯⣹⣽⣹⣏⣟⣺⡷⣗⣻⣗⡷⣺⢽⢷⢽⢽⣝⢶⢽⣺⣹⢭⡯⡽⡽⣓⣞⣗⣞⠶⣏⣹⠾⣞⢭⡼⢧⣓⡽⣞⣱⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⣿⡿⢯⢹⣩⣪⠪⢩⠍⠨⠰⠢⠐⠂⠀⠀⠀⠀⠐⠀⠁⠈⠊⠉⠟⡍⠞⠭⣻⡽⣿⣟⣷⣿⣽⣯⣟⣽⣟⣾⣻⣾⣳⣻⣽⢿⣾⣽⢷⣻⡷⣾⣷⣗⣻⣺⣗⣟⣺⣟⢾⢽⣺⡾⣺⣝⣞⣫⡯⡗⡷⡯⢽⣳⣺⢭⢷⣖⡽⢧⣏⣹⢳⡗⣏⢳⡞⣞⢭⡼⣚⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⣏⡞⣭⠕⢙⡨⠊⡁⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠆⠆⡈⠹⢻⢷⢾⡿⢾⢿⣷⢿⣾⣻⣽⣻⣿⢾⣯⣗⣾⣯⣫⣻⡾⣷⣏⣽⣏⣯⣏⣯⢾⡷⡿⣺⢽⣏⣗⢷⣝⣗⢽⣞⣗⣳⣲⡽⣞⠯⣓⣞⢷⣚⢷⣚⢯⣚⣫⢳⣱⢷⢞⢭⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠓⣉⡝⣵⣕⠵⢊⢆⣌⢖⢈⢀⡀⢀⠀⠂⠄⠀⡀⠀⠂⠤⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠅⡀⠀⢪⡍⠏⠩⠝⠼⡻⡾⣽⣻⣽⣻⣟⣯⢷⡿⣯⣟⣝⣽⢷⣽⡷⣽⢷⡷⡯⣽⣺⣹⡷⣳⣳⣝⣟⡾⣺⡯⡶⣝⡾⣏⣏⢽⣺⡽⢭⣞⡞⢭⢷⡭⣳⣓⡽⡶⣏⢧⣫⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⡡⢒⢡⡯⣿⠏⡫⢖⠳⠕⡐⡰⡐⣂⠰⢐⠠⡢⢄⢌⡄⡐⠲⠅⡉⡢⡡⡠⡠⢆⠀⢀⠀⠀⠀⠡⠀⠀⠀⠤⢀⠀⠀⠁⠨⠋⢽⣳⣟⡽⣟⣾⢷⣟⢷⣿⢷⣟⣾⢯⣟⣞⣗⣻⡽⣽⣝⣯⢾⢽⣗⡯⡾⣺⡯⡾⣫⡷⣳⣣⣝⡾⡯⣗⣹⣺⠯⣳⢧⣳⡭⣳⠮⣗⣹⠶⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣻⠫⠔⢊⡚⡔⢕⠋⠡⣐⠆⢃⢔⢲⢊⡡⡩⣔⢦⢕⣕⡼⡭⢖⣅⡪⢕⡵⣏⡺⣪⠶⡵⢕⡕⠸⢣⢖⠦⠈⠈⠠⠀⠀⠀⠀⠢⢠⠀⠀⠈⠫⢾⡿⣷⡿⣯⣳⣿⡾⣯⣫⡷⣟⣾⡷⣟⣺⡷⡷⣗⣯⢽⣹⡷⡾⢯⡯⢽⣝⢷⢯⡽⡝⣫⢯⣜⡾⢽⢳⡧⣏⢯⣚⣹⡼⣹⠶⣫⢳⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⡛⠙⠑⡈⡂⠴⠪⢈⡉⣁⡨⢌⡑⡬⢜⣃⡥⡶⢮⣲⣷⣷⣿⢿⢾⡿⣺⣹⣹⢵⢮⣖⡯⣹⣹⢳⣪⡪⣂⠜⢯⢗⠀⠀⠀⠀⠀⠀⠀⠀⠐⠀⠀⠀⠀⠐⢯⢾⡿⣞⣯⡾⣯⣗⣽⣽⡷⣾⡷⣯⢽⢾⡷⡯⣽⢾⣏⣫⣟⢷⢽⢽⣝⣗⢷⣏⡯⣺⣹⡽⡭⣏⣏⣞⠯⣞⡞⣓⡽⣚⡽⣓⡽⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠢⠐⠈⠑⠑⠐⢐⢐⠂⠒⡌⢑⢌⢞⢕⢕⢪⣾⣯⣿⣿⣿⣿⣿⣿⣿⣳⣿⣾⣺⣻⣞⡽⣽⣽⢺⣺⠽⢼⡣⣆⠱⢎⠜⢂⠤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢺⣷⢯⣻⢷⣟⣟⣹⢾⣟⣾⡷⣯⢽⣏⣯⢽⡷⡯⣽⢷⢾⢯⡯⣺⣫⡯⡾⣝⣗⣗⠯⡯⢽⣹⢼⢽⣺⡼⢽⡽⢭⡭⣳⢳⡞⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠱⣕⣱⠧⡔⢐⠁⠈⡀⢠⢙⠪⣎⡱⣑⣲⢯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣾⣿⣻⣟⣝⣗⣛⣗⡮⢞⡳⢞⠵⢮⡪⡔⠙⢆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⢽⣻⡾⣿⡷⣟⣞⢷⣯⢾⡷⢾⡯⣽⣺⣻⣹⡯⣗⣏⡯⡷⣽⢾⣝⣗⢷⣳⢽⣺⣫⢽⡭⡯⣗⡧⣗⣞⡝⣹⢼⢧⣳⠷⣫⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠯⢔⢱⠯⡉⠥⠱⠀⠈⡐⣊⡼⢽⡪⢎⢼⣽⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢾⣻⣫⡷⢷⡽⢭⣍⡗⡵⡩⡳⡪⢕⢃⠨⠈⡂⠐⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢽⡾⣽⢾⣿⡾⣟⢿⣞⣽⢯⡷⣽⣯⢽⣽⣹⣗⡯⢷⡾⢯⢽⡽⣝⢷⢽⣗⣳⡾⣺⣳⡯⣺⣹⠽⣳⣹⣺⢷⣓⢯⢳⡞⣝⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣑⠮⠈⠘⠂⠒⠐⠠⡈⣎⡭⣳⡞⡨⣏⣽⣿⣿⣿⣿⣿⣿⡿⣿⣿⣷⣿⣿⣯⣫⣏⢷⣝⡼⢮⡱⣎⢎⡪⡎⡪⢎⢁⠅⡀⠂⢈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠰⢽⢽⣽⢯⣏⣻⣻⡷⣻⢾⡷⣟⢾⢾⣺⡷⣗⣻⡷⡷⡷⣻⢽⡽⣫⡷⣝⣗⣺⣫⢷⢯⣺⣓⣝⡾⢷⣓⢫⣳⣫⢳⡞⣏⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⡿⣗⣡⠀⠀⠀⡀⠆⠰⣕⡽⠮⣏⡪⣲⣻⣿⡿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣯⢿⡷⡿⣺⡼⡞⣪⣃⢝⣊⡪⠎⡪⠕⡂⢈⢐⢃⡈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢐⠪⡼⣟⣾⢷⣟⣝⡷⣟⡷⣟⢾⢷⣻⣹⡷⣻⢾⣗⣽⣫⣞⣞⢽⣝⢷⢽⣝⣗⣗⢷⡾⣝⢭⡯⣗⣳⡽⢭⡯⣏⡗⣏⣓⡾⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣻⣿⣿⡇⠀⠀⣐⢖⣃⣞⡷⣟⢿⢪⢮⡽⣿⣾⣟⣾⣿⣟⣟⣟⣫⣻⣻⣽⢽⣹⡷⣞⠽⣎⢮⡰⣍⢮⡪⡚⣑⢃⢘⢈⠄⠆⢒⡈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠂⢈⢊⢭⣟⡷⣯⣗⣯⣳⣟⡽⣯⢿⡾⡽⣽⡷⡷⣻⣹⣽⣹⣹⡷⡯⡽⣫⡯⣺⣫⣺⣓⣏⡯⣹⣹⣺⢼⣞⠯⣜⡽⣓⡾⡾⢭⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠀⠀⢑⠨⢾⢾⡿⢽⢝⢼⣽⣻⣯⣿⣷⣿⣿⣟⣿⡿⣽⣳⢿⡷⢽⡽⣹⡼⣣⢝⠮⡼⣣⢕⠎⡰⡘⣂⠍⡂⠡⠔⠰⠰⠘⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⢎⢼⢽⢷⣟⡯⣻⣽⢾⣗⣽⣟⣺⢷⡷⡷⣯⢽⣺⣺⣹⣹⣗⣟⢾⣺⣫⢽⣝⢽⡭⢷⣫⣺⢼⣗⠯⢯⢯⢳⣳⡭⢷⣓⣞⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⠠⠌⠐⢞⣻⣟⡱⣏⣽⣟⣿⣟⣿⢿⣷⣟⣿⣻⣷⡿⣞⣽⣽⣽⣯⢷⣚⢮⣑⢎⡮⢎⢦⡵⡡⡱⠢⡈⢁⠄⢈⢁⠂⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⡪⡯⣿⡾⣟⣞⣽⢾⡯⣽⣯⢽⢾⡷⣯⢽⡽⡽⣻⣝⣫⡯⣗⢷⡽⣝⢷⢽⡯⡾⣗⢷⣏⡯⢽⣺⡽⡝⣗⣏⡗⣏⣞⢭⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⡐⢀⢈⡸⢽⣝⣜⡽⣿⣷⣿⣺⣿⡿⣿⡿⣿⣿⢿⣟⣹⢽⣷⡿⣝⡳⣩⠳⢱⡕⢱⡣⢗⡕⠕⡊⢡⢁⠐⡐⡀⠂⠁⡐⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠌⢈⢽⣝⣽⡽⣷⢿⡷⢿⣞⣯⣹⡯⣟⣺⣗⣳⣳⣽⣫⣞⣗⣗⢷⣽⣣⢷⢽⢽⣞⣚⣗⣗⡯⡗⡷⡯⢽⣺⡼⣹⣺⡼⢯⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡢⣇⢆⠢⡡⢞⣚⡾⣽⣻⣿⣽⣿⣟⣻⣞⣗⡷⣺⢳⢝⠰⢺⢳⡗⢕⢍⢊⡢⣱⢪⠕⠎⠔⡰⠨⠆⠅⣈⠂⡈⠀⠐⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠅⠀⡄⣪⣏⣽⣯⣺⢷⣯⢿⣞⡽⣯⢾⡷⣏⣟⣺⢽⣽⣝⣹⡷⣺⣳⡾⢾⣝⣞⡯⡾⢽⡭⡽⣗⢽⣹⡽⡭⢷⣓⢯⣣⢳⡞⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣗⢞⡪⡪⡪⢞⢭⣻⣽⣿⡷⡽⣯⢿⡯⣻⠾⠣⠣⡐⠂⢸⢖⡈⠀⠈⠡⢉⢢⠅⠊⠲⠮⡁⠀⠀⠐⠀⠐⠄⠂⠁⢀⠂⢀⠂⠄⠠⠀⠀⠀⠀⡀⠀⠀⠀⠀⡂⠰⢬⢾⢷⣯⡯⣻⢿⣞⢾⡿⢾⡷⣗⣟⡾⡷⣻⣝⣺⣹⣹⣗⢽⣝⡷⡾⣽⡝⣫⡯⣳⢽⣞⢯⡽⣳⣹⣹⣗⣞⢳⣺⡽⢧⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣽⡾⣯⢎⢮⠯⡯⢾⣻⣏⣯⣾⡷⡵⢞⠴⠀⠀⠀⠄⠀⠜⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠀⠁⠆⠄⢁⠀⠄⠀⠀⠀⠀⡀⠄⢁⠀⠀⠆⠆⢌⡯⣿⢯⣟⣝⣻⡿⢾⡿⣻⢾⣽⣹⡷⣻⢾⡯⣻⣝⢯⡯⡯⡽⣫⡯⡾⣺⢯⣞⡯⡽⣳⣣⣜⡾⢷⣓⣺⡼⢽⣲⢫⣳⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣷⡷⢵⡷⣏⡙⡹⠍⠗⠈⠀⠀⠀⠀⠀⠀⠀⠀⡀⣠⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢂⠂⠅⡀⠐⠈⠀⠈⠐⠀⠀⠀⠁⠀⢀⢄⢥⣲⡿⣽⢿⢾⣟⣾⣷⢷⣯⡷⣯⡷⣯⢽⡯⢾⡷⣝⣯⣝⣗⢽⡽⢷⢾⣫⡯⢽⣝⣗⣺⡽⡝⢫⢷⡾⡝⢷⣓⠯⣗⡗⣏⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⡾⢮⠔⠅⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠨⣿⣿⣗⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⢐⠀⠀⠌⠠⠄⠂⠀⠀⠁⠁⠂⢐⠀⠀⠀⠄⠀⠐⢆⡯⡯⣽⡽⣽⢽⡷⣾⢷⣽⢯⣳⣟⢾⡷⣻⢾⣝⣯⣗⣯⢯⢯⣯⢾⢽⣝⡯⡾⡯⡽⡽⣗⢯⣞⣳⡯⣹⣺⣗⣞⠯⣏⢧⣏⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡯⢷⣇⡐⡠⡐⢄⠄⠀⠀⠀⠀⠀⠀⢀⣲⣿⣿⣿⡟⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠂⠐⢀⢂⠨⡂⠰⡀⠁⠀⡀⠀⠀⠀⡁⠀⠀⠀⠀⠀⠄⡲⣻⣺⣳⣷⢽⣯⢾⣺⣹⡯⣽⣟⣺⡷⣟⣽⢾⣏⣟⣏⣗⣟⣺⢾⣏⡯⡾⢽⣝⢽⣝⣺⣣⣳⡽⣺⢽⣳⣓⣺⡼⢯⣲⣫⢳⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢺⣯⣿⣿⣭⢕⠣⠄⠂⠀⠀⢀⢠⣸⣷⣿⣿⣏⡇⢁⠈⢒⠀⠀⠀⠀⠀⠀⠀⢀⠀⠠⢐⠢⠌⡁⠀⠂⠀⠈⠀⠁⠀⡀⠀⢀⠈⠀⠀⠀⣕⢾⢾⡯⡾⣺⣫⣺⣣⣳⢷⣞⣗⡯⡽⣻⣹⣺⣞⢾⡯⣻⣝⣹⡷⡯⡽⣫⣟⢷⢽⡯⡶⣫⡯⣏⣗⡯⣖⣞⡝⣳⣚⢷⣚⢯⣚⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣟⣻⣿⣿⣷⣆⣂⡄⡀⣰⣳⣾⡿⣯⣿⣿⣓⢇⠄⡈⠡⠆⢃⢂⠆⡂⠄⠅⡈⠡⠰⠐⠂⠠⠁⠀⠀⠀⠀⠀⠈⠀⠀⠄⠄⠐⠀⠀⠠⢺⣳⡷⣫⡯⣫⢯⣳⢷⣺⣓⣗⡯⣹⣹⣳⣫⣞⣞⡯⣽⡷⡷⡷⣽⡯⣽⢷⢽⣝⣗⢽⣹⢷⢯⢾⢼⡧⡷⡯⢯⢫⣳⢭⣳⡽⢭⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡭⣎⢫⡽⣿⢿⣿⢿⣧⣽⣷⡯⢿⢿⢾⣿⢽⡳⢮⡃⡀⠈⠀⠀⠖⢎⢔⢆⠆⡂⠁⠄⠠⠄⠀⠈⠀⠄⠀⠀⠀⠀⠐⠅⠀⠁⠐⠀⠀⢠⠯⠾⣺⡯⡾⡾⣺⣹⣹⡾⣝⠽⣳⡗⡯⣞⣺⣚⣗⣝⣗⢽⣺⣞⣗⣗⢷⡾⣺⡯⡾⡯⡾⣫⢷⣏⣏⣺⣹⢭⢯⡯⣏⡧⣏⣹⢺⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣖⡵⣱⢯⡯⣗⣷⣿⡷⢯⠍⠐⣹⢿⣿⢷⣞⠵⡃⠀⠀⠀⠀⠀⠀⢊⡩⢆⡃⠜⡂⠆⠠⠁⠀⠂⠀⠆⠀⠀⠠⠀⠀⠀⠀⢀⢐⠰⢵⢽⣝⣗⢷⢽⢯⣞⣜⣗⠽⣗⣹⣺⣲⡽⢯⣲⢳⣺⢳⢷⣝⣗⡷⣽⢽⣝⡯⡾⣫⡯⣫⢯⢾⢺⡧⡷⣏⣏⣞⠯⡼⡽⣖⡯⢧⣏⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⣎⢳⡞⣗⣗⡯⡾⡎⠑⠁⠀⠠⢽⡹⣋⠽⠎⠕⠈⠀⠀⠀⠀⠀⠀⠀⠐⠁⠈⠁⠠⠈⡈⠀⠐⠠⢀⠀⠀⠀⠈⠀⠀⠁⡂⢱⢦⢵⢳⢷⣗⣺⣫⡯⣺⣹⢽⡭⡽⡾⣳⣓⣳⣚⢷⣓⠷⣏⡧⣏⡭⡯⡾⣺⡯⡽⣫⡯⡾⣺⢽⣝⡽⡾⢯⢽⣳⣚⢯⢯⡾⡭⣖⡽⣧⣯⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⡽⢎⡵⣏⢕⢎⠈⠀⠀⠀⠠⣌⠈⡈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠈⠂⠀⠀⠀⠀⠀⠀⢨⣪⠽⣺⣣⣳⡽⣞⢯⢯⢯⣺⡼⣺⢽⡭⢯⣞⢭⡭⢯⡽⢭⢯⢳⣹⡲⢯⣚⣏⣏⡯⡾⣺⣫⡾⣺⣺⣫⢫⡯⣗⣳⢭⡯⣗⣺⢽⢺⣹⠽⡼⡽⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢮⢪⢗⠢⡃⠐⠁⠀⠀⢀⢼⢾⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠌⠀⠀⠀⠀⠀⢜⢷⣫⢭⡯⡽⣗⡯⣖⣞⣺⢯⣣⡯⢧⣫⢳⡞⣏⣹⢼⢧⣫⢗⡾⣓⡯⢳⡞⣲⡽⢽⣞⣗⢷⣺⣓⣝⣞⣳⡽⡗⡯⣏⣗⡧⣗⡯⢧⡽⢯⢳⡞⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣝⠰⡂⢈⠀⠀⠀⠨⢵⡷⡷⣽⣑⠄⠀⠀⠀⠀⠄⡀⠰⠂⢀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡉⠓⣝⡾⡯⣏⣞⠯⢷⣣⡽⡭⣞⡝⢯⣓⢯⢳⣞⠽⡼⢧⢳⡞⣞⢭⢯⣚⣝⢼⣺⢯⢯⢽⣫⢯⣗⣳⢯⢽⢾⢼⣹⣹⣚⡾⣳⣞⢳⣺⡯⢧⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡔⡡⠥⠀⠀⠀⡁⠂⠸⡹⣹⢻⣞⢆⠰⠄⠀⠂⠈⠐⠀⠀⠈⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣽⡧⠀⠘⢝⣺⢼⣹⣺⢭⢷⣹⢺⣞⠽⣞⡭⣏⡳⢗⣝⡳⡞⣏⡼⣹⠶⣍⣳⠶⡯⢧⣳⡽⣝⢾⢺⣺⢯⢭⢯⣏⣏⢯⣖⡾⡭⣖⡯⢽⣲⢫⣳⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣏⡒⢁⢂⣖⠂⠀⠀⠠⣀⣀⡈⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⣿⣿⡇⠀⠀⠸⣳⢧⣗⢯⣓⢯⢳⣺⠽⡼⢧⣏⡵⢧⣫⣓⡧⣫⢳⢧⣹⡼⢞⠽⡼⣹⠾⣜⡾⡯⣏⡗⣗⡯⢽⣺⢼⣺⢽⣜⡽⣹⡼⣞⠽⡼⢽⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⠐⢱⢎⢂⠀⢀⢴⡭⣹⢳⡹⡫⡛⠕⠀⠀⠐⠀⠐⠀⠀⠄⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⣽⣿⣿⣷⠀⠀⠀⠀⠧⣫⢳⣳⢯⣚⣓⡽⡭⣳⠶⣏⣹⢖⡭⣳⡼⢧⣓⡵⡳⡞⣏⢳⣹⠾⣗⣺⣚⣗⡯⢽⣗⣺⢯⢳⢯⣲⡭⢷⣳⣚⣓⡽⢳⡞⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣿⣿⣿⣄⠌⡑⠅⢸⡾⢷⢯⢞⡌⠌⡠⡈⠌⡀⠀⠀⠀⠀⠀⠀⡁⠠⠐⠀⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢴⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠯⢧⣞⢭⡭⣳⠽⣜⡞⣕⣏⢳⡞⣕⡵⡞⡭⡞⡳⢧⡹⣜⢞⣹⣓⣞⡽⡭⣗⣺⣖⡽⡧⣷⠯⣳⣧⣯⣞⢭⣳⣿⣏⣽⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⡿⠗⠆⠐⠡⢪⢯⣽⣹⣷⣹⣯⣚⢎⡦⢆⢣⣂⢀⠂⠠⠰⠂⡀⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⣿⣿⡓⠀⠀⠀⠀⠀⠀⠀⠀⠐⠫⡝⡲⢯⡹⡼⢞⡼⢮⣓⢧⡹⣎⣣⠯⡵⢞⡹⣎⢧⠯⣞⣞⠯⣗⣯⣶⣳⣷⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠻⠛⠋⠁⠁⠀⠀⠀⠀⠀⠀⠀⢪⢹⣫⣟⢽⡾⢫⢯⡺⡕⠯⡳⠮⡰⢂⠂⠈⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠙⠳⠮⣍⡞⡭⡞⣱⢫⣣⠽⢼⡹⢎⡵⡝⣖⢯⢽⣽⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠻⠟⠉⠉⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣍⠥⡪⢓⡫⡸⢝⢊⡪⠎⠣⠚⠂⠑⠁⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⣿⣿⣿⣿⡋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠓⠱⠋⢜⢧⡳⢞⡳⣩⠯⡼⣿⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠛⠛⠁⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⡇⠀⠀⠀⡈⡐⠑⠄⢁⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠑⢝⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠃⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣇⠀⠀⠀⠀⠂⡂⢁⠨⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣾⣿⣿⣿⣿⣿⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⠁⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣬⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠨⢂⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣻⢿⣹⠶⢏⡽⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀ ⣿⣿⣿⣿⣿⡿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⡿⣿⣿⣿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⣿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠀⠈⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣿⣿⣿⣿⣿⣿⣿⣿⣗⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣲⣿⣿⣿⣿⣿⣿⣿⢿⢺⢭⣓⢧⢯⡹⡵⡞⣏⡳⣧⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣻⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣟⣿⣿⣿⣿⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿⣿⣿⣿⣿⣿⣿⣿⡫⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⡽⢞⣍⣳⢳⢭⢝⡼⡞⣹⠶⣏⣿⣿⣿⣿⣿⣿⣿⣿⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣻⣿⣿⣿⣿⣿⣾⣿⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⢿⣿⣿⣿⣿⣿⣹⣖⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣺⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣞⢭⠶⣏⢧⠯⢯⣚⡵⢧⣫⣿⣿⣽⣿⣿⣿⣿⣿⣿⠀ ⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣯⣿⣿⣾⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⣿⣿⣿⣿⣿⣿⣀⠕⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣻⢳⣿⣽⣽⣿⣿⣿⣿⡟⣍⣳⣯⣿⣿⣿⣿⣿⠀ ⣿⣽⣿⣿⣯⣿⣿⣷⣿⣻⣿⣿⣿⣿⣿⣽⣯⣿⣿⣿⣿⣯⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⢼⣾⠎⣿⣿⣿⣿⣽⡪⣒⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠓⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⢯⠽⣟⡼⡝⣶⣷⣿⣿⣿⣿⣿⠀ ⣿⣿⣾⣿⣿⣿⣷⣿⣿⣿⢿⣿⢿⣿⣿⢿⣻⣿⣿⣯⣿⣽⣿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡸⣯⣽⣿⣻⣿⣹⣿⣿⣿⡕⡆⡀⠀⠠⠀⠂⢠⣼⣻⠽⣜⡝⡪⠜⡸⠟⢿⣿⣿⣿⣟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀ ⢿⣿⣿⣻⣻⣿⣿⣿⣟⣿⣟⣿⣿⡿⣿⣿⣿⢿⣿⣿⢿⣿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⡔⠔⠄⢀⣵⡿⣺⣓⡯⡣⣃⢕⢕⢎⢔⢕⡻⢙⢛⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀ ⣿⣿⣿⣟⣟⣿⣟⣿⣿⣿⣻⣿⡿⣿⣿⣿⣾⣿⣷⣿⣿⡽⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⡂⠸⣿⣷⣷⡯⡳⢕⢪⢮⣵⣺⣾⡾⣮⣧⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀
convert-image.sh | ansi2html.sh > braille.html # output 'pre' tags refined with 'line-height' and 'font-size' styling
01: #!/bin/bash 02: # An example Bash script 03: # Version: 2018.08.19.19.33.05 04: 05: function main() # An example function 06: { 07: local sentence="Hello, World!" 08: for (( i=0;i<"${1:-1}";i++ )) 09: { 10: echo "$sentence" 11: } 12: } 13: main "$@" 14: exit
source-highlight -n -f html -i example.sh -o example.html
#!/bin/bash # (GNU bash, version 4.4.19(1)-release) # # Create a cacophony of 'Mimic' text-to-speech voices, using words found in the # system's 'words' file. Note: The concept can be applied to any text-to-speech # software and, as such, a rudimentary function using 'espeak' is included. # (Mimic info: https://mycroft.ai/documentation/mimic/) # - Optional parameters: '$1' number of words - '$2' Number of voices # # Version: 2018.08.11.15.54.15 # Source: https://oioiiooixiii.blogspot.com function randWords() # RETURNS PUNCTUATED LIST OF WORDS FROM SYSTEM DICTIONARY { shuf </usr/share/dict/words \ | head -"$1" \ | awk 1 ORS='. ' } function randNum() # RETURNS RANDOM NUMBER BETWEEN '$1' and '$2' { shuf -i "$1"-"$2" -n 1 } function randVoice() # RETURNS NAME OF RANDOM MIMIC VOICE { local voices=("ap" "slt" "kal" "awb" "kal16" "rms") printf "${voices[$(randNum 0 ${#voices[@]})]}" } function mimicSpeak() # INVOKES 'MIMIC' APPLICATION { mimic \ -voice "$(randVoice)" \ --setf int_f0_target_mean="$(randNum 20 180)" \ --setf duration_stretch="$(randNum 1 12)" \ <<<"$1" } function espeakAlt() # INVOKES 'ESPEAK' ALTERNATIVE { espeak \ -p "$(randNum 1 200)" \ -s "$(randNum 1 100)" \ "$1" } function main() { clear for (( i=0;i<"${2:-5}";i++ )) { local sentence="$(randWords "${1:-5}")" echo "$sentence" mimicSpeak "$sentence" & #espeakAlt "$sentence" & } } main "$@" exit #### NOTES: One line concept # shuf </usr/share/dict/british-english \ # | head -5 \ # | sed ':a;N;$!ba;s/\n/. /g' \ # | tee > \ # ( # mimic \ # -voice slt \ # --setf int_f0_target_mean=50 \ # --setf duration_stretch=16 \ # )download: mimic-cacophony.sh
Brutal #Doom (Project Brutality 2.0), Zandronum window stablised with FFmpeg+VidStab pic.twitter.com/q3wmVXxO23
— oioiiooixiii {media} (@oioiiooixiii_) April 3, 2017