C# Other
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Docker
res
src
test
.gitignore
.travis.yml
README.md
archive.sh
build.cmd
build.sh
publish.sh
shelltwitcore.sln
shelltwitcore_NOTESTS.sln

README.md

shelltwit

Join the chat at https://gitter.im/sebagomez/shelltwit Travis Build Status

shelltwit allows you to update your twitter status via command line. It also has bit.ly integration for url shortening. It's a good example of twitter API calls with xAuth. As of Jun-05-2017 it uses PIN-based authorization

shelltwit running on Windows

shelltwit running on Linux (WSL)

Little more (?) info about it at the original blog post

Implemented Twitter APIs

Build

As of June 11th 2018 there's a single solution in .NEET Core 2.1. After downloading the repo just build the sln with Visual Studio 2017 (15.7+).

This build has been tested on Ubuntu WSL, and it works on my machine

but it can now work on your machine thanks to Docker

Docker

In order to build your own container you must run the following command

docker run -e "TWIT_KEY=<Your Twitter Key>" -e "TWIT_SECRET=<Your Twitter Secret>" -it --name twit sebagomez/shelltwit

Copy and paste the provided URL in your favorite browser, authorize the app to access twitter on your behalf and copy and paste the provided PIN in the command line waiting for it.

Now you have a container with the needed credentials to access the Twitter API.

We'll now commit those changes into a new image:

docker commit twit mytwit

And that's it, you can now call commands inside the newly created image as follows:

docker run --rm mytwit --help

Sebagomez.Shelltwit version 7.6.0.0 for Microsoft Windows 10.0.17134
Copyright (C) @sebagomez. All rights reserved.

Usage: twit [options] | <status> [<mediaPath>]

Options:
        -c|--clear      clears user stored credentials
        -t|--timeline   show user's timeline (Default)
        -q|--query      query twits containing words
        -m|--mentions   show user's mentions
        -u|--user       show another user's timeline
        -k|--track      live status with a specific track
        -s|--streamed   streamed user timeline
        -l|--likes      user's likes (fka favorites)
        -h|--help       show this help

status:
        status to update at twitter.com

mediaPath:
        full path, between brackets, to the media files (up to four) to upload.