pazdera / catpix Goto Github PK
View Code? Open in Web Editor NEWPrint images in the terminal using Ruby.
License: MIT License
Print images in the terminal using Ruby.
License: MIT License
We could use only one character for the pixel split into two colours using the Unicode "Upper Half Block" character (U+2580 - ▀ and ▄) with foreground and colouring the rest with background colour.
Suggested by: Doodpants and 0x0dea
when I try gem install catpix
I get this errors:
gem install catpix 2 ↵ 6529 13:28:51
Building native extensions. This could take a while...
ERROR: Error installing catpix:
ERROR: Failed to build gem native extension.
current directory: /home/jlozadad/.gem/ruby/gems/rmagick-2.16.0/ext/RMagick
/usr/bin/ruby -r ./siteconf20180820-16460-qlq0i5.rb extconf.rb
checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
Package 'MagickCore', required by 'virtual:world', not found
checking for outdated ImageMagick version (<= 6.4.9)... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib64
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/jlozadad/.gem/ruby/extensions/x86_64-linux/2.4.0/rmagick-2.16.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/jlozadad/.gem/ruby/gems/rmagick-2.16.0 for inspection.
Results logged to /home/jlozadad/.gem/ruby/extensions/x86_64-linux/2.4.0/rmagick-2.16.0/gem_make.out
I check the log file:
find_executable: checking for gcc... -------------------- yes
--------------------
find_executable: checking for Magick-config... -------------------- no
--------------------
find_executable: checking for pkg-config... -------------------- yes
--------------------
Detected ImageMagick version:
Can't install RMagick 2.16.0. You must have ImageMagick 6.4.9 or later.
Can't install RMagick 2.16.0. You must have ImageMagick 6.4.9 or later.
but, I have imagemagick installed
sudo dnf install ImageMagick 1 ↵ 6527 13:28:25
Failed to synchronize cache for repo 'ippytraxx-gnome-twitch', disabling.
Last metadata expiration check: 0:00:09 ago on Mon 20 Aug 2018 01:28:25 PM EDT.
Package ImageMagick-1:6.9.9.38-1.fc27.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
Would it be possible to return the image as a string instead of printing it directly to the screen?
I get the following error while trying to install:
$ gem install catpix
Building native extensions. This could take a while...
ERROR: Error installing catpix:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/rmagick-2.16.0/ext/RMagick
/usr/bin/ruby2.3 -r ./siteconf20181012-11922-hvbkdo.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.3.0/gems/rmagick-2.16.0 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rmagick-2.16.0/gem_make.out
https://github.com/minimagick/minimagick
Suggested by: MattBearman
This gem rocks, I was thinking about adding some tests (maybe rspec).
Specs will make code refactor easyer.
Building native extensions. This could take a while...
ERROR: Error installing catpix:
ERROR: Failed to build gem native extension.
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/rmagick-2.16.0/ext/RMagick
/data/data/com.termux/files/usr/bin/ruby -r ./siteconf20190112-26739-1vvdqbd.rb extconf.rb
mkmf.rb can't find header files for ruby at /data/data/com.termux/files/usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/rmagick-2.16.0 for inspection.
Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/extensions/aarch64-linux/2.5.0/rmagick-2.16.0/gem_make.out```
also with rmagic
the gem seems to depend on libmagickcore-dev
and libmagickwand-dev
. I had installed the regular packages but still could not build the native extensions.
OS: Linux Mint 17.1 Rebecca
thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.