0.0
No commit activity in last 3 years
No release in over 3 years
A CLI tool that downloads the most recent images from twitter based on the search terms provided. Please remember that you need to provide your own consumer key and consumer secret as well as the access token and access token secret. You can find those over here: https://apps.twitter.com Just create a placeholder app and generate the required credentials.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 2.4.3, ~> 2.4
>= 0.4.7, ~> 0.4
>= 1.7.5, ~> 1.7
~> 5.16
~> 1.0
 Project Readme

twitter_images

Gem Version Circle CI Code Climate Test Coverage

This is a CLI tool for downloading the most recent images off of Twitter based on the search terms you provide.

Roadmap

I've recently started a major overhaul of the gem's structure. However, it's still a work in progress, and there is a lot I want to add and change.

For the list of possible future changes see the Trello board.

Installation

Execute this in the terminal:

$ gem install twitter_images

Usage

alt tag

After installing the gem you need to run the following command to authorize the app with Twitter:

twitter_images -a

After that, your credentials will be saved in your home directory, inside a twitter_imagesrc file. No need to set up any environment variables anymore. If you remove the configuration file, you can simply run the command again to re-authorize the app.

The CLI format is as follows: twitter_images [path] [search terms] [amount]

For example:

twitter_images ./test_pics "#cats" 50

will download 50 pictures into your ./test_pics directory.

You can search for hashtags and multiple words if you enclose your search terms in quotes. You can also search for non-hashtags words like so:

twitter_images ./test_pics friends 150

Please note that the Twitter API rate limit is 180 calls every 15 minutes.

Development

If you want to build a runnable version yourself, follow these simple steps

  • Create your own Twitter Application

  • Get your Twitter application's API key and secret

  • Put those in the lib/twitter_images/consumer.rb:

def consumer_key
  "APIKey"
end

def consumer_secret
  "APISecret"
end
  • Install locally with bundle exec rake install

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request