Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tubone24/post_twitter_on_work

If you use it, you can watch Twitter on work.
https://github.com/tubone24/post_twitter_on_work

cli nim twitter

Last synced: 1 day ago
JSON representation

If you use it, you can watch Twitter on work.

Awesome Lists containing this project

README

        

# post_twitter_on_work (Twitter CLI client)

![img](./docs/images/header_twitter.png)

[![Actions Status](https://github.com/tubone24/post_twitter_on_work/workflows/Build%20and%20Test/badge.svg)](https://github.com/tubone24/post_twitter_on_work/actions)

> If you use it, you can watch Twitter on work.

# Quick start

First, download binary files as link the below. (compatible with Windows, Ubuntu, MacOS)

And you execute this binary, set your access token.

```
$ ./post_witter_on_work home

Access the url, please obtain the verifier key.
https://api.twitter.com/oauth/authorize?oauth_token=xxxxxxxxxxxxxxxxxxxxxxx
Please enter a verifier key (PIN code).

```

And you try to access authorize token url (https://api.twitter.com/oauth/authorize?oauth_token=xxxxxxxxxxxxxxxxxxxxxxx)

![img](./docs/images/auth.png)

And set PIN code and push enter button. That's all.

# Setup

Use Nim and Nimble, so you should install nim (>=1.00)

## Secret file

If you build this app, copy `secret.tpl.nim` to `secret.nim`

```
mv src/post_twitter_on_workpkg/secret.tpl.nim src/post_twitter_on_workpkg/secret.nim
```

## build

```
$ nimble install -d
$ nimble build
```

And create `settings.cfg` file, fill out Twitter Keys

```
[auth]
appKey="xxxxxx"
appKeySecret="xxxxxxxxxxxxxxxx"
accessToken="xxxxxxxxxxxxxx"
accessTokenSecret="xxxxxxx"
```

## Release Build

If you would like to optimize build.

```
$ nimble build -d:release
```

# Run

## Build and Run

```
$ nimble run post_twitter_on_work
```

## Or Run builder binary

### for LINUX

```
$ ./bin/post_twitter_on_work
```

### for Windows

```
$ bin\post_twitter_on_work.exe
```

## Usage

```
Overview:
Get Tweets on CLI for Nim Client

Usage:
post_twitter_on_work status
post_twitter_on_work home [-r|--resetToken] [-i|--interval=]
post_twitter_on_work mention [-r|--resetToken] [-i|--interval=]
post_twitter_on_work user [-r|--resetToken] [-i|--interval=]
post_twitter_on_work search [-r|--resetToken] [-i|--interval=]
post_twitter_on_work list
post_twitter_on_work showlist [-r|--resetToken] [-i|--interval=]
post_twitter_on_work post [-r|--resetToken]

Options:
status Get status
home Get home timeline
mention Get mention timeline
user Get user timeline
search Get twitter search
list Get twitter list
post Post Tweet
showlist Show list
Twitter username
Search query keyword
Tweet text
Slug name
-i, --interval= Get tweet interval (defaults 60 second)
-r, --resetToken Reset accessToken when change user account

```

## demo

You can watch your timeline and post tweets only CLI.

![img](./docs/images/demo.gif)