A Ruby on Rails plugin that streamlines interaction with Scribd.com’s iPaper service, and works along side of either Attachment_fu or Paperclip
Big Changes! v2.0 OMGZ!
Please make sure to read below if you’re using an older version of ScribdFu. Pretty much everything has changed. Don’t fret, it’s now easier and cleaner. ScribdFu has been taken out into the backyard and given a thorough scrubbing. It’s now lean, mean, fully tested, and works beautifully with Attachment_fu, Paperclip, and Amazon’s S3 service.
What it does
Scribd_fu hides out in the shadows like a document converting ninja, just waiting to process your data into a convenient Flash format (like YouTube) with the help of the black majick of Scribd.com. Imagine embedding documents inline with your web UI — no downloading, no required programs on the client side (except for Flash) to view your data. It’s pretty damned cool, and free to boot!
Scribd_fu requires the rscribd gem via
sudo gem install rscribd (along with either the Attachment_fu plugin or the Paperclip gem)
How to Install
ScribdFu requires a base plugin
sudo gem install mdarby-scribd_fu --source 'http://gems.github.com'
Add ScribdFu to your environment.rb
config.gem 'mdarby-scribd_fu', :lib => 'scribd_fu', :source => 'http://gems.github.com'
How to Use
- Sign up for Scribd.com’s API access (it’s totally free)
./script/generate scribd_fuand fill out
config/scribd_fu.ymlfile with your Scribd account info.
- If you’re using AttachmentFu, add
has_ipaper_and_uses 'AttachmentFu'to your model that uses ScribdFu
- If you’re using Paperclip, add
has_ipaper_and_uses 'Paperclip'to your model that uses ScribdFu
- Add the following fields into a new migration for the target model:
t.integer :ipaper_id t.string :ipaper_access_key
Scribd_fu will use these to track Scribd-related information.
Now, when you upload a file to that model, Scribd_fu will automatically handle the Scribd side of things for you. Files are uploaded to Scribd after the model is saved. No muss, no fuss. Scribd’s conversion of your document is usally quite fast, but if you want a contingency plan, the
conversion_error? instance methods can be used to determine the conversion status of the document.
Viewing the iPaper Document
<%= document.display_ipaper %> into your view (where
document is an object of your ScribdFu model). That’s it!
You can set the access level on all documents by setting the
access key in the scribd_fu.yml file to either ‘private’ or ‘public’. ScribdFu assumes that you’d like to keep your documents private.
Add a ticket to ScribdFu’s Lighthouse Account