design-benchmarker

1.0.9 • Public • Published

Benchmarker

This script is an automated tool for capturing multiple screenshots based on dynamic search queries. It takes the queries, search them on Google (using Puppeteer.js), open the first result and take a screenshot of desktop and/or mobile versions. You can include multiple queries at once too.

The main objective is to assist designers doing benchmarks or researching lots of pages, since it speeds and automates the work of searching for each page and taking snapshots.

Installing

  1. Install Node.js
  2. Open terminal and run
    npm i design-benchmarker -g
  3. (Optional) You can also clone this repository or download as .ZIP. If you do so, in the codes below you will need to replace benchmarker to node benchmarker.js

Usage

After installing the dependencies, call the script in your terminal:

benchmarker "checkin rules" --folder ~/Desktop/screenshots

Simple query

Pass a text string to benchmarker or use a --search parameter

benchmarker "checkin rules" --folder ~/Desktop/screenshots
# same as 
benchmarker --search "checkin rules" --folder ~/Desktop/screenshots
# same as 

Change screenshots directory

If you don't know where the screenshots are being saved to or want to change it, set it manually:

benchmarker "checkin rules" --folder ~/Desktop/customScreenshotFolder

Dynamic queries

Use double brackets [[listItem]] to include dynamic variables from the lists created in lists.js. This is located in the folder your benchmarker is installed (See "Create or edit lists" below).

For example, a list named "ciaBr" with the items "azul", "gol", "latam" and a search term like regras de checkin [[ciaBr]] will yield three variations of this query for each of the variables.

benchmarker "regras de checkin [[ciaBr]]" --folder ~/Desktop/screenshots
# regras de checkin azul 
# regras de checkin gol 
# regras de checkin latam 

Multiple queries

Use comma (,) to use input multiple sentences:

benchmarker "regras de checkin [[ciaBr]], checkin rules [[ciaEn]]" --folder ~/Desktop/screenshots
# regras de checkin azul 
# regras de checkin gol 
# regras de checkin latam 
# checkin rules jetblue 
# checkin rules american airlines 
# ... 

Create or edit lists

Use --setList to create a new list. Use = to define the list name and separate its values with ,:

benchmarker --setList "listName=item 1, item 2"

You can manually update the list, just edit list.js file. To view its folder, use --showLists:

benchmarker --showLists

Screenshot Mobile and Desktop

Use --desktop and --mobile parameter

benchmarker "regras de checkin [[ciaBr]]" --desktop --mobile --folder ~/Desktop/screenshots

Hide browser

Use --headless to make Chromium browser run in background:

benchmarker "regras de checkin [[ciaBr]]" --headless --folder ~/Desktop/screenshots

Help

Forgot something? All the commands are summarised with:

benchmarker --help
# or 
benchmarker -h

Readme

Keywords

Package Sidebar

Install

npm i design-benchmarker

Weekly Downloads

10

Version

1.0.9

License

ISC

Unpacked Size

11.3 kB

Total Files

6

Last publish

Collaborators

  • kikobr