cyx / scribd_fu forked from mdarby/scribd_fu

A Ruby on Rails plugin that streamlines interactions with the Scribd service

This URL has Read+Write access

name age message
file MIT-LICENSE Mon Mar 24 20:00:02 -0700 2008 Initial import of Scribd_fu [mdarby]
file README.textile Loading commit data...
directory generators/ Sun Mar 29 06:31:17 -0700 2009 ScribdFu v2.0 has landed ScribdFu has been com... [mdarby]
file init.rb Sun Mar 29 06:31:17 -0700 2009 ScribdFu v2.0 has landed ScribdFu has been com... [mdarby]
directory lib/
file scribd_fu.gemspec
directory spec/ Sun Apr 12 16:26:39 -0700 2009 Refactored #load_ipaper_document to be more per... [mdarby]
README.textile

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

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!

Requirements

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

ScribdFu is awesome, but it needs help from either Attachment_fu or Paperclip

Install ScribdFu

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

  • 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_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_processing?, conversion_complete?, conversion_successful?, and conversion_error? instance methods can be used to determine the conversion status of the document.

Viewing the iPaper Document

Just add <%= document.display_ipaper %> into your view (where document is an object of your ScribdFu model). That’s it!

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.

Help

Add a ticket to ScribdFu’s Lighthouse Account

About the Author

My name is Matt Darby. I’m an IT Manager and pro-web-dev at for Dynamix Engineering and hold a Master’s Degree in Computer Science from Franklin University in sunny Columbus, OH.

Feel free to check out my blog or recommend me