← Posts

Automate your screenshots

tl;dr — I created a tool called snapit to automatically capture and name screenshots for you.

I’ve been using InVision for a little over a month now and it’s been fantastic! There’s a really useful feature in the tool that allows you to upload a file with the same name and it will automatically replace an existing screen with that name. More information about this feature is documented on their blog.

I’m always looking for ways to automate part of my work and the tedious process of capturing and naming screenshots is not my favorite thing. So I built a tool called snapit that will take a list of URLs and capture screenshots and name them.

Using my site I can now automate this workflow:

To get started you’ll need the following items installed on your computer:

Open up a terminal and run:

gem install snapit

And then somewhere on your computer create a YAML file that looks like this:

# my_personal_site.yml
name: 'My Personal Site'
  - homepage: https://markhay.es/
  - about: https://markhay.es/about

Now you can run:

snapit capture ./my_personal_site.yml

And voila, you’ll see the following directory structure formed:

├── my_personal_site.yml
└── snapit_captures
    └── My_Personal_Site
        ├── about.png
        └── homepage.png

There’s probably more features that could be added, but this is a good starting point. Might even be a great opportunity to explore Google Drive / Dropbox sync’ing to automatically upload screenshots to InVision once they’ve been captured.