Last active
August 14, 2017 15:38
-
-
Save eightseventhreethree/31a4430028d4de882c3dce7a1db3b930 to your computer and use it in GitHub Desktop.
Creates ascii art, the url is the first argument of the script only work on Ubuntu.
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
#!/usr/bin/env bash | |
sudo apt-get install ruby ruby-dev | |
sudo apt-get install imagemagick libmagickwand-dev | |
sudo gem install asciiart | |
url_of_file=$1 | |
ruby_script_var="$(cat <<EOF | |
#!/usr/bin/env ruby | |
require 'asciiart' | |
art_file = AsciiArt.new("${url_of_file}") | |
puts art_file.to_ascii_art(width: 50, color: true) | |
EOF | |
)" | |
touch /tmp/foo.rb | |
echo "${ruby_script_var}" > /tmp/foo.rb | |
ruby /tmp/foo.rb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment