Skip to content

mdarby/scribd_fu

Repository files navigation

OBSOLETE

Check out Sam Woodard’s fork

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

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 scribd_fu --source 'http://gemcutter.com'

Add ScribdFu to your environment.rb

config.gem 'scribd_fu', :source => 'http://gemcutter.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

About

OBSOLETE: Check out the below fork

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages