Twitter Search CLI
Project description
# ts
![Screen Shot](screenshot.png)
Twitter Search CLI
## Install
pip install ts
## Usage
Before actual usage, you need to initialize config file first:
ts --init
The first time you run ts, it will guide you through an OAuth authentication process.
The tokens will be stored at `~/.ts.config.json`, any time you want refresh the tokens, run:
ts --auth
to make authentication again and update the tokens in config.
The search syntax is the same as [Twitter Web Search](https://twitter.com/search-home) or
[Twitter Search API](https://dev.twitter.com/rest/public/search).
Here are some common search query examples:
1. Find what a person had said:
ts 'from:NASA Elon Musk'
2. Find what people said to a person in a topic:
ts '#Hearthstone to:bdbrode'
Run `ts -h` to see complete usage instructions:
```
usage: ts [-c COUNT] [-l LANG] [--link] [-d] QUERY
ts [--init|--auth|--config CONFIG] [-d]
Twitter Search CLI
Search options:
QUERY search query, see:
https://dev.twitter.com/rest/public/search
-c COUNT set result number, by default it's 50
-l LANG set search language (en, zh-cn), see:
https://dev.twitter.com/rest/reference/get/help/languages
Display options:
--link append link with tweet
-d enable debug log
-dd debug deeper (more verbose)
Other options:
--init init config file
--auth make authentication with twitter
--config {proxy} config ts, support arguments: `proxy`
-h, --help show this help message and exit
```
## Proxy
ts supports proxying, you can set proxy by run ``ts --config proxy``,
a proxy address is something like `http://localhost:1000` or `https://user:pass@fast.proxy.com`.
Note that by default ts only supports HTTP(S) proxying, if you want to use socks5 proxy,
you'll need to install `requests[socks]` before using it. For more information see
[requests document](http://docs.python-requests.org/en/master/user/advanced/#socks).
![Screen Shot](screenshot.png)
Twitter Search CLI
## Install
pip install ts
## Usage
Before actual usage, you need to initialize config file first:
ts --init
The first time you run ts, it will guide you through an OAuth authentication process.
The tokens will be stored at `~/.ts.config.json`, any time you want refresh the tokens, run:
ts --auth
to make authentication again and update the tokens in config.
The search syntax is the same as [Twitter Web Search](https://twitter.com/search-home) or
[Twitter Search API](https://dev.twitter.com/rest/public/search).
Here are some common search query examples:
1. Find what a person had said:
ts 'from:NASA Elon Musk'
2. Find what people said to a person in a topic:
ts '#Hearthstone to:bdbrode'
Run `ts -h` to see complete usage instructions:
```
usage: ts [-c COUNT] [-l LANG] [--link] [-d] QUERY
ts [--init|--auth|--config CONFIG] [-d]
Twitter Search CLI
Search options:
QUERY search query, see:
https://dev.twitter.com/rest/public/search
-c COUNT set result number, by default it's 50
-l LANG set search language (en, zh-cn), see:
https://dev.twitter.com/rest/reference/get/help/languages
Display options:
--link append link with tweet
-d enable debug log
-dd debug deeper (more verbose)
Other options:
--init init config file
--auth make authentication with twitter
--config {proxy} config ts, support arguments: `proxy`
-h, --help show this help message and exit
```
## Proxy
ts supports proxying, you can set proxy by run ``ts --config proxy``,
a proxy address is something like `http://localhost:1000` or `https://user:pass@fast.proxy.com`.
Note that by default ts only supports HTTP(S) proxying, if you want to use socks5 proxy,
you'll need to install `requests[socks]` before using it. For more information see
[requests document](http://docs.python-requests.org/en/master/user/advanced/#socks).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ts-0.4.3.tar.gz
(10.8 kB
view details)
Built Distribution
ts-0.4.3-py2-none-any.whl
(13.8 kB
view details)
File details
Details for the file ts-0.4.3.tar.gz
.
File metadata
- Download URL: ts-0.4.3.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce0eef6d31a9d4bfab94bbc896ff99ab53fe4fc2f4560136a106b644123972a8 |
|
MD5 | 63d626097dd1f6693428bdec04c0fd04 |
|
BLAKE2b-256 | 2b7aa3a7b034737c09d4a0ce60288fb7d395cd54fbb7f7487c15a773ddaef48e |
Provenance
File details
Details for the file ts-0.4.3-py2-none-any.whl
.
File metadata
- Download URL: ts-0.4.3-py2-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a730aea2392805af9b3c38eeb2d852068b82af97087009f6fbd6401713a5390 |
|
MD5 | b2df1a097a97199f016b4d7d58013121 |
|
BLAKE2b-256 | 59a95206116f5498bc5afdab34b2550035dda476d4aaf4c6e01bfa387829ef45 |