How do I Export/Download Screenshots?

Hubstaff screenshots are retained for 6 months on paid plans and 1 month on free plans. In order to save your screenshots, you will need to export them. Fortunately, we have a tool that makes it very easy to quickly export your screenshots to retain for your own records.

Download the Hubstaff Export Tool >>

Using the Hubstaff Export Tool

To use the Hubstaff Export Tool, you will need to have Ruby installed on your computer. See how to install Ruby on various operating systems. Additional Ruby setup guides can been seen below:

You can verify that Ruby is installed on your system by typing

ruby -v

into the command line.

With Ruby installed on your system, you can run the hubstaff-export.rb file found at the repository.

Step 1

Download the file at GitHub >>

Click the “Download ZIP” file to quickly download it to your computer.

Unzip the hubstaff-export.rb file to the location of your choice.

Step 2

Open a terminal window or command prompt and navigate to the directory where you have downloaded and unzipped the hubstaff-export.rb file.

For example, if you have the hubstaff-export.rb file on your Windows desktop, your file path to be: C:\Users\YourUserName\Desktop or on a Mac it would be $HOME/Desktop

You may change the directory by using the ‘cd’ command (without quotes) i.e. cd Desktop or cd Downloads. 

Step 3

You will only need to do this step one time. First, make sure that you have a Hubstaff App Token. With your App Token in hand, you can run this command:

ruby hubstaff-export.rb authenticate AppToken bob@example.com MyAwesomePass

Replace AppToken with your App Token, bob@example.com with your Hubstaff login, and MyAwesomePass with your Hubstaff password.

After running the command, you should see, “User authentication successful.”

The Authentication token and App token are cached into a file named hubstaff-client.cfg in the current directory.

Step 4

Now you can run the command that will export your screenshots. An example command would be:

ruby hubstaff-export.rb export-screens 2015-07-01T00:00:00Z 2015-07-01T07:00:00Z -o 84 -i both

Start and Stop time are required. Start and stop time should be in the following format: YYYY-MM-DDThh:mmZ where Z means that the time is in UTC (or it can be a timezone offset).

Example: 2015-06-01T04:00Z or 2015-06-01T00:00-0400 or 2015-06-01T05:00+0100 all represent the same time.

If you are in a time zone that is +08:00 in order to specify times in UTZ (the Z suffix to the ISO 8601 date time format) you need to subtract 8 hours.

Thus to fetch the 8 hours of screens that the user worked you would specify 2016-04-25T16:00Z -> 2016-04-26T00:00Z

Another way to specify the time is to explicitly specify the time zone in the iSO 8601 format e.g.

2016-04-26T00:00+0800 -> 2016-04-26T08:00+0800

If you want to specify time in eastern you need to use an offset on the time e.g.

2017-04-24T08:30:00-0400 (for DST) or 2017-01-01T08:30:00-0500 (for non DST). Or convert your times to UTC first when using the “Z” suffix.

After the start and stop times, you can add optional parameters. In the example above, -o 84 means Hubstaff organization with the ID 84. The “-i both” option means that both full size and thumbnail images will be downloaded. Other options are “-i full” (to download full size images only, this is the default), “-i thumb” (to download thumbnails only) and “-u 12″ which denotes a specific user on the organization.

For a complete list of the available options, run:

ruby hubstaff-export.rb -h

After running the command, you should see “Saving screenshots”:

hubstaff-screenshot-export

The screenshots will start to be downloaded to your current directory.

Once screenshots are deleted, they cannot be recovered. Please make sure to export your screenshots before they are removed.

See a complete breakdown of Hubstaff’s data retention policies.

SSL Errors

If you’re on Windows, you may get SSL errors when you try to authenticate or export the screenshots.

To fix this, you’ll first want to download this file: http://curl.haxx.se/ca/cacert.pem

Next, you’ll need to create an environment variable called SSL_CERT_FILE and set its value to where you downloaded the cacert.pem file.

If you’re not sure how to create an environment variable, please see the instructions below.

Windows 8/Windows 10

First, type “System” into your computer’s search bar and select the “System” option for the control panel.

Next, you’ll want to click on “Advanced system settings” link on the side.

From there, click the button labeled “Environment variables”.

Under system variables, click “New”.

For the variable name, enter: SSL_CERT_FILE

For the variable’s value, enter the file path to where you downloaded the cacert.pem file previously. If you downloaded it to your desktop, for example, it might look like C:\Users\YourName\Desktop\cacert.pem

Finally, click “OK”.

Once you’ve done that, fully close out of all command prompt windows you might have open and restart the command prompt. You should no longer receive the SSL errors.

  • Was this Helpful ?
  • Yes   No
  • Was this Helpful ?
  • Yes   No