Sha256: 4f816e073e1ac76d690c2ef005bdbfc2c4bc44c85abc2048986391f411a7e8e0
Contents?: true
Size: 1.21 KB
Versions: 1
Compression:
Stored size: 1.21 KB
Contents
# Screenshots TODO: Write a gem description ## Installation Add this line to your application's Gemfile: ```ruby gem 'screenshots' ``` And then execute: $ bundle Or install it yourself as: $ gem install screenshots ## Configuration ```ruby # config/initializers/screenshots.rb Screenshots.configure do |config| config.blog_assets_url = 'http://www.codeur.com/blog/wp-content/uploads/2014/07' config.image_extension = 'jpg' end ``` ## Usage ### Generate HTML for a single URL ```ruby Screenshots::Processor.generate('http://www.google.com') ``` It returns a string containing the HTML code to be copied in the blog post: ```html <h2><a href="http://www.google.com">Google</a></h2> <img src="http://www.codeur.com/blog/wp-content/uploads/2014/07/http_www.google.com.jpg" /> ``` ### Generate HTML for a list of URLs ```ruby Screenshots::Processor.generate_list(['http://www.google.com', 'http://www.lemonde.fr']) ``` ## Contributing 1. Fork it ( https://github.com/[my-github-username]/screenshots/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
screenshots-0.0.1 | README.md |