npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

stackshots

v0.1.2

Published

A command line interface to get screenshots from BrowserStack's Screenshot API

Downloads

6

Readme

stackshots

stackshots uses the BrowserStack's Screenshot API to take screenshots from websites and downloads to your computer. It's great for automated tests to get a glance of your site in different browsers.

Note that this feature needs as of now, a "Regular" BrowserStack plan. Please, see BrowserStack for more details.

CLI Usage

These are the parameters of the CLI

Options:
  -u, --username     The email you use to log in to Browserstack                                                            [required]
  -p, --password     Your account's password                                                                                [required]
  -w, --website      The website(s) from which you want to get screenshots. Comma separated list
  -b, --browser      The browser(s) from which you want to get screenshots. Comma separated list                            [default: "IE_8,IE_9,Chrome,Firefox"]
  -o, --orientation  Orientation of the device (portrait|landscape).                                                        [default: "portrait"]
  -s, --os           Operating System of the browser separating version with underscore (windows_xp). Comma separated list  [default: "windows_7"]
  -d, --device       The device(s) from which you want to get screenshots. Comma separated list
  -f, --folder       Folder in which screenshots will be stored                                                              [default: Current folder]
  -l, --ls           Instead of getting images, it will output a list of browsers and OS available
  -h, --help         Shows help info

You may think that website should be mandatory. Since every single browser you request is a paid request and it will consume from the total, if you don't provide any website you only will get the browsers to which you would submit the request. Try as many times as you want!

username

This is actually your email to log into your BrowserStack account

password

Password of your BrowserStack account

website

Comma separated list of the URL's you want to get screenshot's from.

For example:

www.google.com,www.browserstack.com

Or just one:

www.google.com

browser

Browser from which you want to get an screenshot. By default they are:

  • Internet Explorer 8 & Internet Explorer 9
  • Chrome Latest
  • Firefox Latest

If you don't specify a version, it will suppose you wan't to get the latest one:

--browser ie

Will get you:

  • IE 10 Desktop - Windows 8
  • IE 10 normal - Windows 7

You can also get all of the versions from a browser, attaching _all:

--browser ie_all

Or a single version or a combination of them:

--browser ie_6,ie_7
  • IE 6 - Windows XP
  • IE 7 - Windows XP

Current available browsers

  • safari
  • chrome
  • firefox
  • opera
  • ie
  • mobile safari
  • android browser

Just add " if you need to add spaces:

--browser "chrome,mobile safari_6.0"

orientation

Orientation is usefull for Mobile Devices, otherwise, it is not. However, the program will not allow you to pass anything that's not portrait or landscape. By default is portrait.

os

This is the Operating System in which you can request Screenshots. By default is Windows

--os "OS X"

The program is smart enough to know your intentions... some times. Let's say you want to get Firefox screenshots from Mac and screenshots from IE 8:

--os "OS X" --browser firefox,ie_8

Will get you:

  • Firefox 20 - Snow Leopard
  • Firefox 20 - Lion
  • Firefox 20 - Mountain Lion
  • IE 8 - Windows 7

You can specify the version with an underscore _:

--os "OS X_Mountain Lion" --browser firefox,ie_8

Currently available OS and versions

| Operating System | Version | | ---------------- |:-------------:| | OS X | Snow Leopard | | OS X | Lion | | OS X | Mountain Lion | | Windows | XP | | Windows | 8 | | Windows | 7 | | ios | 5.0 | | ios | 5.1 | | ios | 6.0 | | android | 4.2 | | android | 4.0 | | android | 4.1 | | android | 2.3 | | android | 2.2 |

device

The device from which you want to take a screenshot.

--device "iPhone 5"

Currently available devices in browsers and os versions

| Browser | Device | OS Version | | ---------------- |:-------------:|:-------------:| | Mobile Safari | iPad 2 (5.0) | 5.0| | Mobile Safari | iPhone 4S | 5.1| | Mobile Safari | iPad 3rd | 5.1| | Mobile Safari | iPhone 4S (6.0) | 6.0| | Mobile Safari | iPhone 5 | 6.0| | Mobile Safari | iPad 3rd (6.0) | 6.0| | Android Browser | LG Nexus 4 | 4.2| | Android Browser | Samsung Galaxy Tab 2 10.1 | 4.0| | Android Browser | Samsung Galaxy Nexus | 4.0| | Android Browser | Motorola Atrix HD | 4.0| | Android Browser | Motorola Razr | 4.0| | Android Browser | HTC Evo 3D | 4.0| | Android Browser | HTC One X | 4.0| | Android Browser | Sony Xperia Tipo | 4.0| | Android Browser | Amazon Kindle Fire 2 | 4.0| | Android Browser | Amazon Kindle Fire HD 8.9 | 4.0| | Android Browser | Samsung Galaxy Note 10.1 | 4.0| | Android Browser | Samsung Galaxy S III | 4.1| | Android Browser | Samsung Galaxy Note II | 4.1| | Android Browser | Motorola Razr Maxx HD | 4.1| | Android Browser | Google Nexus 7 | 4.1| | Android Browser | Samsung Galaxy S II | 2.3| | Android Browser | Samsung Galaxy Note | 2.3| | Android Browser | Motorola Droid Razr | 2.3| | Android Browser | Motorola Droid 4 | 2.3| | Android Browser | Samsung Galaxy S | 2.2| | Android Browser | HTC Wildfire | 2.2| | Android Browser | LG Optimus 3D | 2.2|

folder

The folder in which you want to store the screenshots. By default is the folder in which you are invoking the process.

--folder /tmp

ls

This option will ignore the rest of arguments and will output the list of browsers, versions and OS available so you have an idea of what is available.

Browser: ie
OS: windows
Versions: 6.0, 7.0, 10.0 Desktop, 8.0, 9.0, 10.0

##Development and Tests

npm install
./node_modules/.bin/grunt

Credits

Really thanks for the support shown from BrowserStack guys, they made this possible.