magic_cloud
magic_cloud copied to clipboard
Simple pretty word cloud for Ruby
The last version on RubyGems does not include the fix for the deprecation warning on require statements with uppercase letters. This means that the current version on RubyGems does not...
I tried to use Japanese but seems like the font settings do not work. I tried this code first ``` words ={"日本語"=>2, "ケール"=>2, "変更"=>2} font = "ArialUnicode" cloud.new(words, rotate: :none,...
Could you please show example how to render/show word cloud in rails view? Also trying to generate from command line i.e. `magic_cloud --textfile README.md -f test.png --rotate free --scale log`...
When we provide equal weights for every word we get such an error: ruby -I lib wordcloud.rb /home/arbox/work_space/magic_cloud/lib/magic_cloud/cloud.rb:132:in `to_i': NaN (FloatDomainError) from /home/arbox/work_space/magic_cloud/lib/magic_cloud/cloud.rb:132:in `block in make_scaler' from /home/arbox/work_space/magic_cloud/lib/magic_cloud/cloud.rb:32:in `block in...
``` /home/robert/git/project-nacho/vendor/bundle/ruby/2.3.0/bundler/gems/magic_cloud-d4d37d05b0f8/lib/magic_cloud/canvas.rb:70:in `get_type_metrics': text string contains image attribute reference `%m' (ArgumentError) from /home/robert/git/project-nacho/vendor/bundle/ruby/2.3.0/bundler/gems/magic_cloud-d4d37d05b0f8/lib/magic_cloud/canvas.rb:70:in `_measure_text' from /home/robert/git/project-nacho/vendor/bundle/ruby/2.3.0/bundler/gems/magic_cloud-d4d37d05b0f8/lib/magic_cloud/canvas.rb:43:in `measure_text' from /home/robert/git/project-nacho/vendor/bundle/ruby/2.3.0/bundler/gems/magic_cloud-d4d37d05b0f8/lib/magic_cloud/word.rb:23:in `measure' from /home/robert/git/project-nacho/vendor/bundle/ruby/2.3.0/bundler/gems/magic_cloud-d4d37d05b0f8/lib/magic_cloud/spriter.rb:32:in `make_sprite' from /home/robert/git/project-nacho/vendor/bundle/ruby/2.3.0/bundler/gems/magic_cloud-d4d37d05b0f8/lib/magic_cloud/spriter.rb:20:in `block in make_sprites!' from /home/robert/git/project-nacho/vendor/bundle/ruby/2.3.0/bundler/gems/magic_cloud-d4d37d05b0f8/lib/magic_cloud/spriter.rb:19:in...
I'm getting this error when trying to require magic_cloud. ``` /home/bbbco/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:2112:in `raise_if_conflicts': Unable to activate magic_cloud-0.0.3, because slop-3.6.0 conflicts with slop (~> 3.0.0) (Gem::ConflictError) ```
This adjusted version checks if `smin` equals `smax` and, if so, returns a function that assigns every word the minimum font size, effectively skipping the scaling process and avoiding the...
`words = [ [Apple, 10], [Banana, 10] ]` `cloud = MagicCloud::Cloud.new(words, rotate: :none, scale: :log)` `img = cloud.draw(800, 600)` `file_path = Rails.root.join("tmp", "#{id}.png")` `img.write(file_path)` `Error performing GenerateWordCloudJob (Job ID: 51ca485a-0dd0-4d75-90b5-30d896165f7b)...