Download Images From Sensr.net

Full Moon Mystery

Sensr.net will store images for up to a month. When your images get older than 31 days, we remove them unless you’ve marked them as a favorite or made a clip. If you want to pull down the images and store them on your local hard drive, we have some open source tools for that. This post shows how to use the get-images.rb program to pull images down from Sensr.net to your local machine.

To use this approach you’ll need a few things:

  • Access to the command line
  • The ability to run Ruby programs
  • The ability to install Ruby Gems
  • A Sensr.net account

I’ll assume you know how to get to the command line on your machine. Personally I use iTerm on the Mac but Terminal is installed by default.

Ruby is installed on most Mac and Linux machines these days. To see if you have Ruby installed, just pop over to the command line and run the

ruby -v command. The output should looks something like this:

``

Full Moon Mystery

Sensr.net will store images for up to a month. When your images get older than 31 days, we remove them unless you’ve marked them as a favorite or made a clip. If you want to pull down the images and store them on your local hard drive, we have some open source tools for that. This post shows how to use the get-images.rb program to pull images down from Sensr.net to your local machine.

To use this approach you’ll need a few things:

  • Access to the command line
  • The ability to run Ruby programs
  • The ability to install Ruby Gems
  • A Sensr.net account

I’ll assume you know how to get to the command line on your machine. Personally I use iTerm on the Mac but Terminal is installed by default.

Ruby is installed on most Mac and Linux machines these days. To see if you have Ruby installed, just pop over to the command line and run the

ruby -v command. The output should looks something like this:

``

If you don’t have Ruby installed you’ll have to Google around to find out how to install it on your machine.  I recommend starting with RVM.

Install Sensr.net Gem

Now you  need to install the Sensr.net gem. This will let you run Ruby programs that interact with the Sensr.net APIs. The program that downloads images from Sensr.net also uses this gem. Just run gem install sensr from the command line and you’ll be good to go. It should look something like this:

$ gem install sensr
Successfully installed sensr-1.0.2
1 gem installed
$

Install get-images.rb

Next you’ll need to get the get-images.rb program. If you’re comfortable with git, you can just run git clone https://github.com/adamb/Sensr-utils.git and you’ll have the entire Sensr-utils repository. If you just want the get-images.rb program, you can find it here. Just save a copy of it to your local disk where you can get at it from the command line.

Find Your Sensr.net Token

To use the Sensr.net API you need a secret token.  This is so only you can access the images stored in Sensr.net.  To get a token, you can follow the instructions on the API Tutorial.  Basically you log into Sensr.net and go to Developer Applications.

You’ll need the crazy long string that the site generates called Client Secret. Here’s one for an account that I just created.  This account doesn’t have any cameras, but you could use this token to access public cameras.

Edit the line in get-images.rb so it uses your token. The change will look something like this:

```

Full Moon Mystery

Sensr.net will store images for up to a month. When your images get older than 31 days, we remove them unless you’ve marked them as a favorite or made a clip. If you want to pull down the images and store them on your local hard drive, we have some open source tools for that. This post shows how to use the get-images.rb program to pull images down from Sensr.net to your local machine.

To use this approach you’ll need a few things:

  • Access to the command line
  • The ability to run Ruby programs
  • The ability to install Ruby Gems
  • A Sensr.net account

I’ll assume you know how to get to the command line on your machine. Personally I use iTerm on the Mac but Terminal is installed by default.

Ruby is installed on most Mac and Linux machines these days. To see if you have Ruby installed, just pop over to the command line and run the

ruby -v command. The output should looks something like this:

``

Full Moon Mystery

Sensr.net will store images for up to a month. When your images get older than 31 days, we remove them unless you’ve marked them as a favorite or made a clip. If you want to pull down the images and store them on your local hard drive, we have some open source tools for that. This post shows how to use the get-images.rb program to pull images down from Sensr.net to your local machine.

To use this approach you’ll need a few things:

  • Access to the command line
  • The ability to run Ruby programs
  • The ability to install Ruby Gems
  • A Sensr.net account

I’ll assume you know how to get to the command line on your machine. Personally I use iTerm on the Mac but Terminal is installed by default.

Ruby is installed on most Mac and Linux machines these days. To see if you have Ruby installed, just pop over to the command line and run the

ruby -v command. The output should looks something like this:

``

If you don’t have Ruby installed you’ll have to Google around to find out how to install it on your machine.  I recommend starting with RVM.

Install Sensr.net Gem

Now you  need to install the Sensr.net gem. This will let you run Ruby programs that interact with the Sensr.net APIs. The program that downloads images from Sensr.net also uses this gem. Just run gem install sensr from the command line and you’ll be good to go. It should look something like this:

$ gem install sensr
Successfully installed sensr-1.0.2
1 gem installed
$

Install get-images.rb

Next you’ll need to get the get-images.rb program. If you’re comfortable with git, you can just run git clone https://github.com/adamb/Sensr-utils.git and you’ll have the entire Sensr-utils repository. If you just want the get-images.rb program, you can find it here. Just save a copy of it to your local disk where you can get at it from the command line.

Find Your Sensr.net Token

To use the Sensr.net API you need a secret token.  This is so only you can access the images stored in Sensr.net.  To get a token, you can follow the instructions on the API Tutorial.  Basically you log into Sensr.net and go to Developer Applications.

You’ll need the crazy long string that the site generates called Client Secret. Here’s one for an account that I just created.  This account doesn’t have any cameras, but you could use this token to access public cameras.

Edit the line in get-images.rb so it uses your token. The change will look something like this:


becomes

`Sensr.oauth_token = '201148a20b5468d2bca75a71e36e9f0086034037b7d341142daf84a6a2f2fba5'`

Alternatively you could create a file called `mytoken.rb` that has just this line.

## Run get-images.rb

Finally you can run the program! Run it like this. The –help parameter shows you the options.

 ````<div class="share_buttons_simple_use_buttons" style="padding: 10px 0; display: inline-block">
  <div class="tweet_button" style="float: left; vertical-align: top">
    <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://ec2-35-161-252-137.us-west-2.compute.amazonaws.com/2014/07/08/download-images-from-sensr-net/" data-text="Download Images From Sensr.net " data-count="none">Tweet</a>
  </div>
  
  <div class="facebook_like_button" style="float: left; vertical-align: top; margin-left: 10px; max-width: 255px">
  </div>
</div>

[<img class="alignleft  wp-image-2923" src="/img/2014/07/3264084341_e851a2cf68_z.jpg" alt="Full Moon Mystery" width="245" height="368" srcset="/img/2014/07/3264084341_e851a2cf68_z.jpg 427w, /img/2014/07/3264084341_e851a2cf68_z-200x300.jpg 200w" sizes="(max-width: 245px) 100vw, 245px" />][1]

Sensr.net will store images for up to a month. When your images get older than 31 days, we remove them unless you&#8217;ve marked them as a favorite or [made a clip][2]. If you want to pull down the images and store them on your local hard drive, we have some open source tools for that. This post shows how to use the get-images.rb program to pull images down from Sensr.net to your local machine.

To use this approach you&#8217;ll need a few things:

  * Access to the command line
  * The ability to run Ruby programs
  * The ability to install Ruby Gems
  * A Sensr.net account

I&#8217;ll assume you know how to get to the command line on your machine. Personally I use iTerm on the Mac but Terminal is installed by default.

<!--more-->Ruby is installed on most Mac and Linux machines these days. To see if you have Ruby installed, just pop over to the command line and run the 

`ruby -v` command. The output should looks something like this:

 ``<div class="share_buttons_simple_use_buttons" style="padding: 10px 0; display: inline-block">
  <div class="tweet_button" style="float: left; vertical-align: top">
    <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://ec2-35-161-252-137.us-west-2.compute.amazonaws.com/2014/07/08/download-images-from-sensr-net/" data-text="Download Images From Sensr.net " data-count="none">Tweet</a>
  </div>
  
  <div class="facebook_like_button" style="float: left; vertical-align: top; margin-left: 10px; max-width: 255px">
  </div>
</div>

[<img class="alignleft  wp-image-2923" src="/img/2014/07/3264084341_e851a2cf68_z.jpg" alt="Full Moon Mystery" width="245" height="368" srcset="/img/2014/07/3264084341_e851a2cf68_z.jpg 427w, /img/2014/07/3264084341_e851a2cf68_z-200x300.jpg 200w" sizes="(max-width: 245px) 100vw, 245px" />][1]

Sensr.net will store images for up to a month. When your images get older than 31 days, we remove them unless you&#8217;ve marked them as a favorite or [made a clip][2]. If you want to pull down the images and store them on your local hard drive, we have some open source tools for that. This post shows how to use the get-images.rb program to pull images down from Sensr.net to your local machine.

To use this approach you&#8217;ll need a few things:

  * Access to the command line
  * The ability to run Ruby programs
  * The ability to install Ruby Gems
  * A Sensr.net account

I&#8217;ll assume you know how to get to the command line on your machine. Personally I use iTerm on the Mac but Terminal is installed by default.

<!--more-->Ruby is installed on most Mac and Linux machines these days. To see if you have Ruby installed, just pop over to the command line and run the 

`ruby -v` command. The output should looks something like this:

`` 

If you don&#8217;t have Ruby installed you&#8217;ll have to Google around to find out how to install it on your machine.  I recommend starting with [RVM][3].

## Install Sensr.net Gem

Now you  need to install the Sensr.net gem. This will let you run Ruby programs that interact with the [Sensr.net APIs][4]. The program that downloads images from Sensr.net also uses this gem. Just run `gem install sensr` from the command line and you&#8217;ll be good to go. It should look something like this:

<pre>$ gem install sensr
Successfully installed sensr-1.0.2
1 gem installed
$</pre>

## Install get-images.rb

Next you&#8217;ll need to get the get-images.rb program. If you&#8217;re comfortable with git, you can just run <code>git clone https://github.com/adamb/Sensr-utils.git</code> and you&#8217;ll have the entire [Sensr-utils repository][5]. If you just want the get-images.rb program, you can find it [here][6]. Just save a copy of it to your local disk where you can get at it from the command line.

## Find Your Sensr.net Token

To use the Sensr.net API you need a secret token.  This is so only you can access the images stored in Sensr.net.  To get a token, you can follow the instructions on the [API Tutorial][7].  Basically you log into Sensr.net and go to [Developer Applications][8].

You&#8217;ll need the crazy long string that the site generates called **Client Secret**. Here&#8217;s one for an account that I just created.  This account doesn&#8217;t have any cameras, but you could use this token to access public cameras.

Edit the line in `get-images.rb` so it uses your token. The change will look something like this:

```<div class="share_buttons_simple_use_buttons" style="padding: 10px 0; display: inline-block">
  <div class="tweet_button" style="float: left; vertical-align: top">
    <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://ec2-35-161-252-137.us-west-2.compute.amazonaws.com/2014/07/08/download-images-from-sensr-net/" data-text="Download Images From Sensr.net " data-count="none">Tweet</a>
  </div>
  
  <div class="facebook_like_button" style="float: left; vertical-align: top; margin-left: 10px; max-width: 255px">
  </div>
</div>

[<img class="alignleft  wp-image-2923" src="/img/2014/07/3264084341_e851a2cf68_z.jpg" alt="Full Moon Mystery" width="245" height="368" srcset="/img/2014/07/3264084341_e851a2cf68_z.jpg 427w, /img/2014/07/3264084341_e851a2cf68_z-200x300.jpg 200w" sizes="(max-width: 245px) 100vw, 245px" />][1]

Sensr.net will store images for up to a month. When your images get older than 31 days, we remove them unless you&#8217;ve marked them as a favorite or [made a clip][2]. If you want to pull down the images and store them on your local hard drive, we have some open source tools for that. This post shows how to use the get-images.rb program to pull images down from Sensr.net to your local machine.

To use this approach you&#8217;ll need a few things:

  * Access to the command line
  * The ability to run Ruby programs
  * The ability to install Ruby Gems
  * A Sensr.net account

I&#8217;ll assume you know how to get to the command line on your machine. Personally I use iTerm on the Mac but Terminal is installed by default.

<!--more-->Ruby is installed on most Mac and Linux machines these days. To see if you have Ruby installed, just pop over to the command line and run the 

`ruby -v` command. The output should looks something like this:

 ``<div class="share_buttons_simple_use_buttons" style="padding: 10px 0; display: inline-block">
  <div class="tweet_button" style="float: left; vertical-align: top">
    <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://ec2-35-161-252-137.us-west-2.compute.amazonaws.com/2014/07/08/download-images-from-sensr-net/" data-text="Download Images From Sensr.net " data-count="none">Tweet</a>
  </div>
  
  <div class="facebook_like_button" style="float: left; vertical-align: top; margin-left: 10px; max-width: 255px">
  </div>
</div>

[<img class="alignleft  wp-image-2923" src="/img/2014/07/3264084341_e851a2cf68_z.jpg" alt="Full Moon Mystery" width="245" height="368" srcset="/img/2014/07/3264084341_e851a2cf68_z.jpg 427w, /img/2014/07/3264084341_e851a2cf68_z-200x300.jpg 200w" sizes="(max-width: 245px) 100vw, 245px" />][1]

Sensr.net will store images for up to a month. When your images get older than 31 days, we remove them unless you&#8217;ve marked them as a favorite or [made a clip][2]. If you want to pull down the images and store them on your local hard drive, we have some open source tools for that. This post shows how to use the get-images.rb program to pull images down from Sensr.net to your local machine.

To use this approach you&#8217;ll need a few things:

  * Access to the command line
  * The ability to run Ruby programs
  * The ability to install Ruby Gems
  * A Sensr.net account

I&#8217;ll assume you know how to get to the command line on your machine. Personally I use iTerm on the Mac but Terminal is installed by default.

<!--more-->Ruby is installed on most Mac and Linux machines these days. To see if you have Ruby installed, just pop over to the command line and run the 

`ruby -v` command. The output should looks something like this:

`` 

If you don&#8217;t have Ruby installed you&#8217;ll have to Google around to find out how to install it on your machine.  I recommend starting with [RVM][3].

## Install Sensr.net Gem

Now you  need to install the Sensr.net gem. This will let you run Ruby programs that interact with the [Sensr.net APIs][4]. The program that downloads images from Sensr.net also uses this gem. Just run `gem install sensr` from the command line and you&#8217;ll be good to go. It should look something like this:

<pre>$ gem install sensr
Successfully installed sensr-1.0.2
1 gem installed
$</pre>

## Install get-images.rb

Next you&#8217;ll need to get the get-images.rb program. If you&#8217;re comfortable with git, you can just run <code>git clone https://github.com/adamb/Sensr-utils.git</code> and you&#8217;ll have the entire [Sensr-utils repository][5]. If you just want the get-images.rb program, you can find it [here][6]. Just save a copy of it to your local disk where you can get at it from the command line.

## Find Your Sensr.net Token

To use the Sensr.net API you need a secret token.  This is so only you can access the images stored in Sensr.net.  To get a token, you can follow the instructions on the [API Tutorial][7].  Basically you log into Sensr.net and go to [Developer Applications][8].

You&#8217;ll need the crazy long string that the site generates called **Client Secret**. Here&#8217;s one for an account that I just created.  This account doesn&#8217;t have any cameras, but you could use this token to access public cameras.

Edit the line in `get-images.rb` so it uses your token. The change will look something like this:

becomes

Sensr.oauth_token = '201148a20b5468d2bca75a71e36e9f0086034037b7d341142daf84a6a2f2fba5'

Alternatively you could create a file called mytoken.rb that has just this line.

Run get-images.rb

Finally you can run the program! Run it like this. The –help parameter shows you the options.


To grab the images from a specific day, say May 1, 2014 on camera 5 and drop the images into a directory called `mayday`, you would run the program like this:

 `````<div class="share_buttons_simple_use_buttons" style="padding: 10px 0; display: inline-block">
  <div class="tweet_button" style="float: left; vertical-align: top">
    <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://ec2-35-161-252-137.us-west-2.compute.amazonaws.com/2014/07/08/download-images-from-sensr-net/" data-text="Download Images From Sensr.net " data-count="none">Tweet</a>
  </div>
  
  <div class="facebook_like_button" style="float: left; vertical-align: top; margin-left: 10px; max-width: 255px">
  </div>
</div>

[<img class="alignleft  wp-image-2923" src="/img/2014/07/3264084341_e851a2cf68_z.jpg" alt="Full Moon Mystery" width="245" height="368" srcset="/img/2014/07/3264084341_e851a2cf68_z.jpg 427w, /img/2014/07/3264084341_e851a2cf68_z-200x300.jpg 200w" sizes="(max-width: 245px) 100vw, 245px" />][1]

Sensr.net will store images for up to a month. When your images get older than 31 days, we remove them unless you&#8217;ve marked them as a favorite or [made a clip][2]. If you want to pull down the images and store them on your local hard drive, we have some open source tools for that. This post shows how to use the get-images.rb program to pull images down from Sensr.net to your local machine.

To use this approach you&#8217;ll need a few things:

  * Access to the command line
  * The ability to run Ruby programs
  * The ability to install Ruby Gems
  * A Sensr.net account

I&#8217;ll assume you know how to get to the command line on your machine. Personally I use iTerm on the Mac but Terminal is installed by default.

<!--more-->Ruby is installed on most Mac and Linux machines these days. To see if you have Ruby installed, just pop over to the command line and run the 

`ruby -v` command. The output should looks something like this:

 ``<div class="share_buttons_simple_use_buttons" style="padding: 10px 0; display: inline-block">
  <div class="tweet_button" style="float: left; vertical-align: top">
    <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://ec2-35-161-252-137.us-west-2.compute.amazonaws.com/2014/07/08/download-images-from-sensr-net/" data-text="Download Images From Sensr.net " data-count="none">Tweet</a>
  </div>
  
  <div class="facebook_like_button" style="float: left; vertical-align: top; margin-left: 10px; max-width: 255px">
  </div>
</div>

[<img class="alignleft  wp-image-2923" src="/img/2014/07/3264084341_e851a2cf68_z.jpg" alt="Full Moon Mystery" width="245" height="368" srcset="/img/2014/07/3264084341_e851a2cf68_z.jpg 427w, /img/2014/07/3264084341_e851a2cf68_z-200x300.jpg 200w" sizes="(max-width: 245px) 100vw, 245px" />][1]

Sensr.net will store images for up to a month. When your images get older than 31 days, we remove them unless you&#8217;ve marked them as a favorite or [made a clip][2]. If you want to pull down the images and store them on your local hard drive, we have some open source tools for that. This post shows how to use the get-images.rb program to pull images down from Sensr.net to your local machine.

To use this approach you&#8217;ll need a few things:

  * Access to the command line
  * The ability to run Ruby programs
  * The ability to install Ruby Gems
  * A Sensr.net account

I&#8217;ll assume you know how to get to the command line on your machine. Personally I use iTerm on the Mac but Terminal is installed by default.

<!--more-->Ruby is installed on most Mac and Linux machines these days. To see if you have Ruby installed, just pop over to the command line and run the 

`ruby -v` command. The output should looks something like this:

`` 

If you don&#8217;t have Ruby installed you&#8217;ll have to Google around to find out how to install it on your machine.  I recommend starting with [RVM][3].

## Install Sensr.net Gem

Now you  need to install the Sensr.net gem. This will let you run Ruby programs that interact with the [Sensr.net APIs][4]. The program that downloads images from Sensr.net also uses this gem. Just run `gem install sensr` from the command line and you&#8217;ll be good to go. It should look something like this:

<pre>$ gem install sensr
Successfully installed sensr-1.0.2
1 gem installed
$</pre>

## Install get-images.rb

Next you&#8217;ll need to get the get-images.rb program. If you&#8217;re comfortable with git, you can just run <code>git clone https://github.com/adamb/Sensr-utils.git</code> and you&#8217;ll have the entire [Sensr-utils repository][5]. If you just want the get-images.rb program, you can find it [here][6]. Just save a copy of it to your local disk where you can get at it from the command line.

## Find Your Sensr.net Token

To use the Sensr.net API you need a secret token.  This is so only you can access the images stored in Sensr.net.  To get a token, you can follow the instructions on the [API Tutorial][7].  Basically you log into Sensr.net and go to [Developer Applications][8].

You&#8217;ll need the crazy long string that the site generates called **Client Secret**. Here&#8217;s one for an account that I just created.  This account doesn&#8217;t have any cameras, but you could use this token to access public cameras.

Edit the line in `get-images.rb` so it uses your token. The change will look something like this:

```<div class="share_buttons_simple_use_buttons" style="padding: 10px 0; display: inline-block">
  <div class="tweet_button" style="float: left; vertical-align: top">
    <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://ec2-35-161-252-137.us-west-2.compute.amazonaws.com/2014/07/08/download-images-from-sensr-net/" data-text="Download Images From Sensr.net " data-count="none">Tweet</a>
  </div>
  
  <div class="facebook_like_button" style="float: left; vertical-align: top; margin-left: 10px; max-width: 255px">
  </div>
</div>

[<img class="alignleft  wp-image-2923" src="/img/2014/07/3264084341_e851a2cf68_z.jpg" alt="Full Moon Mystery" width="245" height="368" srcset="/img/2014/07/3264084341_e851a2cf68_z.jpg 427w, /img/2014/07/3264084341_e851a2cf68_z-200x300.jpg 200w" sizes="(max-width: 245px) 100vw, 245px" />][1]

Sensr.net will store images for up to a month. When your images get older than 31 days, we remove them unless you&#8217;ve marked them as a favorite or [made a clip][2]. If you want to pull down the images and store them on your local hard drive, we have some open source tools for that. This post shows how to use the get-images.rb program to pull images down from Sensr.net to your local machine.

To use this approach you&#8217;ll need a few things:

  * Access to the command line
  * The ability to run Ruby programs
  * The ability to install Ruby Gems
  * A Sensr.net account

I&#8217;ll assume you know how to get to the command line on your machine. Personally I use iTerm on the Mac but Terminal is installed by default.

<!--more-->Ruby is installed on most Mac and Linux machines these days. To see if you have Ruby installed, just pop over to the command line and run the 

`ruby -v` command. The output should looks something like this:

 ``<div class="share_buttons_simple_use_buttons" style="padding: 10px 0; display: inline-block">
  <div class="tweet_button" style="float: left; vertical-align: top">
    <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://ec2-35-161-252-137.us-west-2.compute.amazonaws.com/2014/07/08/download-images-from-sensr-net/" data-text="Download Images From Sensr.net " data-count="none">Tweet</a>
  </div>
  
  <div class="facebook_like_button" style="float: left; vertical-align: top; margin-left: 10px; max-width: 255px">
  </div>
</div>

[<img class="alignleft  wp-image-2923" src="/img/2014/07/3264084341_e851a2cf68_z.jpg" alt="Full Moon Mystery" width="245" height="368" srcset="/img/2014/07/3264084341_e851a2cf68_z.jpg 427w, /img/2014/07/3264084341_e851a2cf68_z-200x300.jpg 200w" sizes="(max-width: 245px) 100vw, 245px" />][1]

Sensr.net will store images for up to a month. When your images get older than 31 days, we remove them unless you&#8217;ve marked them as a favorite or [made a clip][2]. If you want to pull down the images and store them on your local hard drive, we have some open source tools for that. This post shows how to use the get-images.rb program to pull images down from Sensr.net to your local machine.

To use this approach you&#8217;ll need a few things:

  * Access to the command line
  * The ability to run Ruby programs
  * The ability to install Ruby Gems
  * A Sensr.net account

I&#8217;ll assume you know how to get to the command line on your machine. Personally I use iTerm on the Mac but Terminal is installed by default.

<!--more-->Ruby is installed on most Mac and Linux machines these days. To see if you have Ruby installed, just pop over to the command line and run the 

`ruby -v` command. The output should looks something like this:

`` 

If you don&#8217;t have Ruby installed you&#8217;ll have to Google around to find out how to install it on your machine.  I recommend starting with [RVM][3].

## Install Sensr.net Gem

Now you  need to install the Sensr.net gem. This will let you run Ruby programs that interact with the [Sensr.net APIs][4]. The program that downloads images from Sensr.net also uses this gem. Just run `gem install sensr` from the command line and you&#8217;ll be good to go. It should look something like this:

<pre>$ gem install sensr
Successfully installed sensr-1.0.2
1 gem installed
$</pre>

## Install get-images.rb

Next you&#8217;ll need to get the get-images.rb program. If you&#8217;re comfortable with git, you can just run <code>git clone https://github.com/adamb/Sensr-utils.git</code> and you&#8217;ll have the entire [Sensr-utils repository][5]. If you just want the get-images.rb program, you can find it [here][6]. Just save a copy of it to your local disk where you can get at it from the command line.

## Find Your Sensr.net Token

To use the Sensr.net API you need a secret token.  This is so only you can access the images stored in Sensr.net.  To get a token, you can follow the instructions on the [API Tutorial][7].  Basically you log into Sensr.net and go to [Developer Applications][8].

You&#8217;ll need the crazy long string that the site generates called **Client Secret**. Here&#8217;s one for an account that I just created.  This account doesn&#8217;t have any cameras, but you could use this token to access public cameras.

Edit the line in `get-images.rb` so it uses your token. The change will look something like this:

``` 

becomes

`Sensr.oauth_token = '201148a20b5468d2bca75a71e36e9f0086034037b7d341142daf84a6a2f2fba5'`

Alternatively you could create a file called `mytoken.rb` that has just this line.

## Run get-images.rb

Finally you can run the program! Run it like this. The &#8211;help parameter shows you the options.

 ````<div class="share_buttons_simple_use_buttons" style="padding: 10px 0; display: inline-block">
  <div class="tweet_button" style="float: left; vertical-align: top">
    <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://ec2-35-161-252-137.us-west-2.compute.amazonaws.com/2014/07/08/download-images-from-sensr-net/" data-text="Download Images From Sensr.net " data-count="none">Tweet</a>
  </div>
  
  <div class="facebook_like_button" style="float: left; vertical-align: top; margin-left: 10px; max-width: 255px">
  </div>
</div>

[<img class="alignleft  wp-image-2923" src="/img/2014/07/3264084341_e851a2cf68_z.jpg" alt="Full Moon Mystery" width="245" height="368" srcset="/img/2014/07/3264084341_e851a2cf68_z.jpg 427w, /img/2014/07/3264084341_e851a2cf68_z-200x300.jpg 200w" sizes="(max-width: 245px) 100vw, 245px" />][1]

Sensr.net will store images for up to a month. When your images get older than 31 days, we remove them unless you&#8217;ve marked them as a favorite or [made a clip][2]. If you want to pull down the images and store them on your local hard drive, we have some open source tools for that. This post shows how to use the get-images.rb program to pull images down from Sensr.net to your local machine.

To use this approach you&#8217;ll need a few things:

  * Access to the command line
  * The ability to run Ruby programs
  * The ability to install Ruby Gems
  * A Sensr.net account

I&#8217;ll assume you know how to get to the command line on your machine. Personally I use iTerm on the Mac but Terminal is installed by default.

<!--more-->Ruby is installed on most Mac and Linux machines these days. To see if you have Ruby installed, just pop over to the command line and run the 

`ruby -v` command. The output should looks something like this:

 ``<div class="share_buttons_simple_use_buttons" style="padding: 10px 0; display: inline-block">
  <div class="tweet_button" style="float: left; vertical-align: top">
    <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://ec2-35-161-252-137.us-west-2.compute.amazonaws.com/2014/07/08/download-images-from-sensr-net/" data-text="Download Images From Sensr.net " data-count="none">Tweet</a>
  </div>
  
  <div class="facebook_like_button" style="float: left; vertical-align: top; margin-left: 10px; max-width: 255px">
  </div>
</div>

[<img class="alignleft  wp-image-2923" src="/img/2014/07/3264084341_e851a2cf68_z.jpg" alt="Full Moon Mystery" width="245" height="368" srcset="/img/2014/07/3264084341_e851a2cf68_z.jpg 427w, /img/2014/07/3264084341_e851a2cf68_z-200x300.jpg 200w" sizes="(max-width: 245px) 100vw, 245px" />][1]

Sensr.net will store images for up to a month. When your images get older than 31 days, we remove them unless you&#8217;ve marked them as a favorite or [made a clip][2]. If you want to pull down the images and store them on your local hard drive, we have some open source tools for that. This post shows how to use the get-images.rb program to pull images down from Sensr.net to your local machine.

To use this approach you&#8217;ll need a few things:

  * Access to the command line
  * The ability to run Ruby programs
  * The ability to install Ruby Gems
  * A Sensr.net account

I&#8217;ll assume you know how to get to the command line on your machine. Personally I use iTerm on the Mac but Terminal is installed by default.

<!--more-->Ruby is installed on most Mac and Linux machines these days. To see if you have Ruby installed, just pop over to the command line and run the 

`ruby -v` command. The output should looks something like this:

`` 

If you don&#8217;t have Ruby installed you&#8217;ll have to Google around to find out how to install it on your machine.  I recommend starting with [RVM][3].

## Install Sensr.net Gem

Now you  need to install the Sensr.net gem. This will let you run Ruby programs that interact with the [Sensr.net APIs][4]. The program that downloads images from Sensr.net also uses this gem. Just run `gem install sensr` from the command line and you&#8217;ll be good to go. It should look something like this:

<pre>$ gem install sensr
Successfully installed sensr-1.0.2
1 gem installed
$</pre>

## Install get-images.rb

Next you&#8217;ll need to get the get-images.rb program. If you&#8217;re comfortable with git, you can just run <code>git clone https://github.com/adamb/Sensr-utils.git</code> and you&#8217;ll have the entire [Sensr-utils repository][5]. If you just want the get-images.rb program, you can find it [here][6]. Just save a copy of it to your local disk where you can get at it from the command line.

## Find Your Sensr.net Token

To use the Sensr.net API you need a secret token.  This is so only you can access the images stored in Sensr.net.  To get a token, you can follow the instructions on the [API Tutorial][7].  Basically you log into Sensr.net and go to [Developer Applications][8].

You&#8217;ll need the crazy long string that the site generates called **Client Secret**. Here&#8217;s one for an account that I just created.  This account doesn&#8217;t have any cameras, but you could use this token to access public cameras.

Edit the line in `get-images.rb` so it uses your token. The change will look something like this:

```<div class="share_buttons_simple_use_buttons" style="padding: 10px 0; display: inline-block">
  <div class="tweet_button" style="float: left; vertical-align: top">
    <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://ec2-35-161-252-137.us-west-2.compute.amazonaws.com/2014/07/08/download-images-from-sensr-net/" data-text="Download Images From Sensr.net " data-count="none">Tweet</a>
  </div>
  
  <div class="facebook_like_button" style="float: left; vertical-align: top; margin-left: 10px; max-width: 255px">
  </div>
</div>

[<img class="alignleft  wp-image-2923" src="/img/2014/07/3264084341_e851a2cf68_z.jpg" alt="Full Moon Mystery" width="245" height="368" srcset="/img/2014/07/3264084341_e851a2cf68_z.jpg 427w, /img/2014/07/3264084341_e851a2cf68_z-200x300.jpg 200w" sizes="(max-width: 245px) 100vw, 245px" />][1]

Sensr.net will store images for up to a month. When your images get older than 31 days, we remove them unless you&#8217;ve marked them as a favorite or [made a clip][2]. If you want to pull down the images and store them on your local hard drive, we have some open source tools for that. This post shows how to use the get-images.rb program to pull images down from Sensr.net to your local machine.

To use this approach you&#8217;ll need a few things:

  * Access to the command line
  * The ability to run Ruby programs
  * The ability to install Ruby Gems
  * A Sensr.net account

I&#8217;ll assume you know how to get to the command line on your machine. Personally I use iTerm on the Mac but Terminal is installed by default.

<!--more-->Ruby is installed on most Mac and Linux machines these days. To see if you have Ruby installed, just pop over to the command line and run the 

`ruby -v` command. The output should looks something like this:

 ``<div class="share_buttons_simple_use_buttons" style="padding: 10px 0; display: inline-block">
  <div class="tweet_button" style="float: left; vertical-align: top">
    <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://ec2-35-161-252-137.us-west-2.compute.amazonaws.com/2014/07/08/download-images-from-sensr-net/" data-text="Download Images From Sensr.net " data-count="none">Tweet</a>
  </div>
  
  <div class="facebook_like_button" style="float: left; vertical-align: top; margin-left: 10px; max-width: 255px">
  </div>
</div>

[<img class="alignleft  wp-image-2923" src="/img/2014/07/3264084341_e851a2cf68_z.jpg" alt="Full Moon Mystery" width="245" height="368" srcset="/img/2014/07/3264084341_e851a2cf68_z.jpg 427w, /img/2014/07/3264084341_e851a2cf68_z-200x300.jpg 200w" sizes="(max-width: 245px) 100vw, 245px" />][1]

Sensr.net will store images for up to a month. When your images get older than 31 days, we remove them unless you&#8217;ve marked them as a favorite or [made a clip][2]. If you want to pull down the images and store them on your local hard drive, we have some open source tools for that. This post shows how to use the get-images.rb program to pull images down from Sensr.net to your local machine.

To use this approach you&#8217;ll need a few things:

  * Access to the command line
  * The ability to run Ruby programs
  * The ability to install Ruby Gems
  * A Sensr.net account

I&#8217;ll assume you know how to get to the command line on your machine. Personally I use iTerm on the Mac but Terminal is installed by default.

<!--more-->Ruby is installed on most Mac and Linux machines these days. To see if you have Ruby installed, just pop over to the command line and run the 

`ruby -v` command. The output should looks something like this:

`` 

If you don&#8217;t have Ruby installed you&#8217;ll have to Google around to find out how to install it on your machine.  I recommend starting with [RVM][3].

## Install Sensr.net Gem

Now you  need to install the Sensr.net gem. This will let you run Ruby programs that interact with the [Sensr.net APIs][4]. The program that downloads images from Sensr.net also uses this gem. Just run `gem install sensr` from the command line and you&#8217;ll be good to go. It should look something like this:

<pre>$ gem install sensr
Successfully installed sensr-1.0.2
1 gem installed
$</pre>

## Install get-images.rb

Next you&#8217;ll need to get the get-images.rb program. If you&#8217;re comfortable with git, you can just run <code>git clone https://github.com/adamb/Sensr-utils.git</code> and you&#8217;ll have the entire [Sensr-utils repository][5]. If you just want the get-images.rb program, you can find it [here][6]. Just save a copy of it to your local disk where you can get at it from the command line.

## Find Your Sensr.net Token

To use the Sensr.net API you need a secret token.  This is so only you can access the images stored in Sensr.net.  To get a token, you can follow the instructions on the [API Tutorial][7].  Basically you log into Sensr.net and go to [Developer Applications][8].

You&#8217;ll need the crazy long string that the site generates called **Client Secret**. Here&#8217;s one for an account that I just created.  This account doesn&#8217;t have any cameras, but you could use this token to access public cameras.

Edit the line in `get-images.rb` so it uses your token. The change will look something like this:

``` 

becomes

`Sensr.oauth_token = '201148a20b5468d2bca75a71e36e9f0086034037b7d341142daf84a6a2f2fba5'`

Alternatively you could create a file called `mytoken.rb` that has just this line.

## Run get-images.rb

Finally you can run the program! Run it like this. The &#8211;help parameter shows you the options.

To grab the images from a specific day, say May 1, 2014 on camera 5 and drop the images into a directory called mayday, you would run the program like this:

`````

Of course you won’t want to use camera 5, but the camera number for your camera. The camera number can be found by going to the camera settings page. The camera number comes from the login information. Camera 5 uses cam5 as the login. You can also go to cameras by using their camera number. For instance, https://sensr.net/cameras/88 is a public camera that uses cam88 for it’s login.

Help Us Improve

The Sensr-utils repository is open source, so feel free to add your own code or help us improve it.