Word cloud generator for Rails - ruby-on-rails

Is there a Ruby/Rails library that I can generate word clouds (output should be an image file) like in Wordle.net?

Why does it have to be a Ruby/Rails library?
You could use JQCloud, which is a nice JQuery plugin to build word and tag clouds.

Have you looked at heatmap? There's also a nice blog post explaining it:
http://www.idolhands.com/ruby-on-rails/guides-tips-and-tutorials/creating-a-heatmap-or-tag-cloud-in-rails

Related

handling wiki links with markdown in ruby

I'm building a simple app with Rails using Markdown for storing content. My question is how to build internal [[wiki]] style links? Either by pre-processing before they get to markdown or some markdown derivative? I release I could probably preprocess using regex, but I'm guessing there are others with ready built solutions.
For example I know Instiki uses both markdown and [[wiki|Wiki]] links and I've looked but couldn't figure out how they're handling it.
Any tips?
If you are using the redcarpet gem you can either use a preprocessor or you can modifiy the generated HTML output.
Have a look at How to extend Redcarpet to support a media library. This article shows how to convert image references to custom HTML and also how to replace boilerplate identifiers with the actual content.
I guess both approaches could be adapted for your specific problem:
The renderer approach directly manipulates the generated HTML code from the markdown code. (This is more elegant as you are not messing with Markdown code)
The preprocess approach manipulates the code by using regular expressions (as you already mentioned) (This is more flexible, but also a little bit messy)

bgStretcher (jQuery) in Ruby on Rails

I came across the following code online:
http://www.ajaxblender.com/bgstretcher-2-jquery-stretch-background-plugin-updated.html
It works like a charm on HTML & Javascript & CSS.
Now the question is how do I implement this kind of code in Ruby on Rails Environment.
I have split off this question in multiple questions:
where do I place the CSS & jQuery
how do I implement the javascript into the erb file
how do I link to my css & jQuery files (like in HTML)
Kind regards,
Vincent
Your best bet is to go through asset pipleline which will clear up a lot of things
http://guides.rubyonrails.org/asset_pipeline.html
http://railscasts.com/episodes/279-understanding-the-asset-pipeline

Is Prince the best way to create PDFs in Ruby on Rails?

After several Google searches, it appears that the way to create PDFs in Rails from HTML and CSS (versus a new markup language) is to use Prince.
With licensing at $3800 for my non-big-commercial app, I'm wondering if this is, in fact, consensus or people have an alternative they can share the whats and hows.
You may check out prawn too. Tutorial can be found on railscasts.com.
This may fit the bill: http://code.google.com/p/wkhtmltopdf/
We tried tow solutions:
using latex generate pdf, there is ruby gem code rtex
using java library iText, use it you may need rjb which allow you using java lib directly in ruby code, just like jruby, but you don't need build all you application on jruby.
I create tons of different PDF files on the fly from various data sources using Rails, including finest layout. I create need to create them for presenting products to customers.
After having tried all the tools mentioned above, Prince is the best tool for this task.
Prince's rendering quality & CSS support (better than some browsers) is its main selling point. If you're only generating documents with simple layouts, stick with Prawn.

Help with rails and tinyMce

I have been using tinyMce_hammer plugin to use tinymce in my rails app... but right now I also want a way for my users to upload photos and insert them into their wysiwyg editor.... is there a simple way to get this done??.. is there any other wysiwyg editor that works with rails and comes with this feature built in??... what do you reccomend?
These two plugins claim to offer it - Rails 2.3 - https://github.com/andreferraro/rails_tiny_mce
Rails 3 - https://github.com/sandipransing/rails_tiny_mce
I don't think there's an easy way to do this in any of the common rich text editors. I usually have a separate section where users can upload photos and then choose from a variety of layout options.
TinyMCE has a couple of commercial image and file management plugins, but they are based on PHP and .Net. However, I haven't seen a Rails version. It's not particularly hard to build your own image manager using a plugin like paperclip and hook into TinyMCE.

Best way to learn how to combine Blueprintcss and Compass/Sass?

I would like to apply Blueprintcss and Compass/Sass to a Rails project.
Should I learn Blueprint first or Compass/Sass first or are there any guides on how to use the two of these together?
Also, does it make any difference that it's a Rails project? Could this combination of technologies be just as easily applied to, say, a Java project?
When I first encountered Compass, I knew neither Compass nor Blueprint. I started out by watching the Compass screencast and then by trying to use it. As Sass is similar to CSS (CSS on steroids ;-)), I was able to get working real soon. Having the Blueprint CSS cheat sheet helped a lot. Thus, I recommend learning Compass first and then learning Blueprint on the way.
Also have a look at the GitHub wiki pages for Compass.
It is easy to use Compass with any language/framework combination.
Compass comes with its own version of Blueprint, so I'd say just learn Compass.
Blueprint is just predefined plain set of css. so you can use it on any frameworks or programming languages.
I my self using blueprint for both php and java project. for php i am using codeigniter, joomla and even wordpress ;)

Resources