New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

screenshots

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

screenshots

  • 0.0.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Screenshots

This gem takes a list of URLs, gets the title of each page at those URLs, then builds an HTML string that can be copied-pasted in a blog article to present those web pages. It assumes screenshots of those pages would have been uploaded on the blog.

Installation

Add this line to your application's Gemfile:

gem 'screenshots'

And then execute:

$ bundle

Or install it yourself as:

$ gem install screenshots

Configuration

# 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

Directly call the binary

$ screenshots my-input-file.txt my_output_dir

Generate HTML for a single URL

Screenshots::Processor.generate('http://www.google.com')

It returns a string containing the HTML code to be copied in the blog post:

<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

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

FAQs

Package last updated on 23 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc