h1. Scribd_fu A Ruby on Rails plugin that streamlines interaction with Scribd.com's iPaper service, and works along side of either Attachment_fu or Paperclip h1. 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. h2. 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! h2. Requirements Scribd_fu requires the rscribd gem via @sudo gem install rscribd@ (along with either the Attachment_fu plugin or the Paperclip gem) h2. How to Install h3. ScribdFu requires a base plugin ScribdFu is awesome, but it needs help from either "Attachment_fu":http://github.com/technoweenie/attachment_fu/tree/master or "Paperclip":http://github.com/thoughtbot/paperclip/tree/master h3. Install ScribdFu
sudo gem install mdarby-scribd_fu --source 'http://gems.github.com'h3. Add ScribdFu to your environment.rb
config.gem 'mdarby-scribd_fu', :lib => 'scribd_fu', :source => 'http://gems.github.com'h2. How to Use * Sign up for "Scribd.com's API access":http://www.scribd.com/developers/signup_api (it's totally free) * Run @./script/generate scribd_fu@ and fill out @config/scribd_fu.yml@ file 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_keyScribd_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_processing?@, @conversion_complete?@, @conversion_successful?@, and @conversion_error?@ instance methods can be used to determine the conversion status of the document. h2. Viewing the iPaper Document Just add @<%= document.display_ipaper %>@ into your view (where @document@ is an object of your ScribdFu model). That's it! h2. Access 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. h2. About the Author My name is "Matt Darby.":http://blog.matt-darby.com I’m an IT Manager and pro-web-dev at for "Dynamix Engineering":http://dynamix-ltd.com and hold a Master’s Degree in Computer Science from "Franklin University":http://www.franklin.edu in sunny "Columbus, OH.":http://en.wikipedia.org/wiki/Columbus,_Ohio Feel free to check out my "blog":http://blog.matt-darby.com or "recommend me":http://www.workingwithrails.com/person/10908-matt-darby