twitter

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2019 License: MIT Imports: 1 Imported by: 0

README

Twitter CLI for collecting tweets

CircleCI Build status codecov GoDoc

Installation

Download from GitHub Releases.
Or go get github.com/mpppk/twitter (go modules must be enabled)

Setup

Put below .twitter.yml to ~/.config.

ConsumerKey: xxxx
ConsumerSecret: xxxx
AccessToken: xxxx
AccessTokenSecret: xxxx

Usage

Search tweets by query and some options.
Results are stored in local file DB. (You must specify the DB path by --db-path flag.)
If you want to download images which contained in tweets, execute 'download images' command after search command.

Search command manages two states, 'minID' and 'maxID', which decide tweet ID range of searching. So search command can resume even if the process is interrupted.

$ twitter search \
  ---db-path tweets.db \
  -query [some_words] \
  --exclude retweets \
  --filter images 
  
  100 tweets are saved. (1157495237557678080-1157489067203760128)
  maxID is updated => 1157489067203760127
  100 tweets are saved. (1157489006810206210-1157483911351377921)
  maxID is updated => 1157483911351377920
  ...
Download images

Download images which contained tweets from DB file.
You must execute 'search' command first for collecting tweets to DB.

$ twitter download images -db-path tweets.db
Configuration

Each DB file has two states, 'minID' and 'maxID', which decide the tweet ID range when searching.
These values are updated automatically by search command, but you can also update manually through 'config' command.

$ twitter config set --db-path tweets.db [maxID|minID] [new tweet ID]
$ twitter config get --db-path tweets.db [maxID|minID]
=> 1157483911351377920 

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
option
Package option provides utilities of option handling
Package option provides utilities of option handling
selfupdate
Package selfupdate provides function to update binary
Package selfupdate provides function to update binary
pkg
io
util
Package util provides some utilities
Package util provides some utilities

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL