Skip to content

Instantly share code, notes, and snippets.

@urras
Last active August 29, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save urras/10689125 to your computer and use it in GitHub Desktop.
Save urras/10689125 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require 'swftly'
#
swf_path = '/home/user01/flash/'
#
the_swf = '/home/user01/flash/lolcats.swf'
swftly = Swftly.new(the_swf, false) #don't auto process
swftly.swiff #send the_swf off to Google's hosted service for conversion
if swftly.converter_response_code == 200 #success!
swftly.process! #buildout the Runtime and Converted stuffs
puts 'ok'
else
puts 'warn'
end
#!/usr/bin/ruby
require 'swftly'
the_swf = '/home/user01/flash/lolcats.swf'
swftly = Swftly.new(the_swf) #fire her up
swftly.swiff
index = File.open("index.html", "w")
index.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment