Created
August 19, 2013 16:05
-
-
Save saitoha/6270806 to your computer and use it in GitHub Desktop.
tw sixel extension(https://bitbucket.org/arakiken/tw/commits/branch/sixel) for OS X
This file contains hidden or 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
| diff -r fd6fcb6dd914 lib/tw/app/render.rb | |
| --- a/lib/tw/app/render.rb Mon Aug 19 20:09:42 2013 +0900 | |
| +++ b/lib/tw/app/render.rb Tue Aug 20 01:03:00 2013 +0900 | |
| @@ -48,7 +48,7 @@ | |
| imgfile = cachedir + "/#{m.user}" | |
| until FileTest.exist?(imgfile) do | |
| img_url = Twitter.user(m.user).profile_image_url | |
| - system("curl -k -s #{img_url} | convert -resize #{iconsize}x#{iconsize} - -colors 256 ppm:- | ppmtosixel 2>/dev/null | tr -d '\n' > #{imgfile}") | |
| + system("curl -k -s #{img_url} | convert -resize #{iconsize}x#{iconsize} - -colors 256 ppm:- | ppmtosixel 2>/dev/null | LC_ALL=C tr -d '\n' > #{imgfile}") | |
| end | |
| File::open(imgfile) {|f| | |
| f.each {|line| print line} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment