tweet-hs: Command-line tool for twitter

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

a Command Line Interface Tweeter


[Skip to Readme]

Properties

Versions 0.4.0.7, 0.5.0.0, 0.5.0.1, 0.5.1.0, 0.5.1.2, 0.5.2.0, 0.5.3.0, 0.5.3.2, 0.5.3.3, 0.5.3.4, 0.5.3.5, 0.5.3.6, 0.5.3.7, 0.5.3.8, 0.5.3.9, 0.5.3.10, 0.5.3.11, 0.5.3.12, 0.5.3.13, 0.6.0.0, 0.6.0.1, 0.6.1.2, 0.6.1.3, 1.0.0.0, 1.0.0.1, 1.0.1.0, 1.0.1.1, 1.0.1.2, 1.0.1.3, 1.0.1.4, 1.0.1.5, 1.0.1.6, 1.0.1.7, 1.0.1.8, 1.0.1.9, 1.0.1.21, 1.0.1.27, 1.0.1.33, 1.0.1.34, 1.0.1.35, 1.0.1.36, 1.0.1.37, 1.0.1.38, 1.0.1.39, 1.0.1.40, 1.0.1.41, 1.0.1.42, 1.0.1.43, 1.0.2.1, 1.0.2.2, 1.0.2.3
Change log None available
Dependencies aeson, ansi-wl-pprint, authenticate-oauth, base (>=4.9 && <5), bytestring, composition-prelude, containers, data-default, directory, extra, htoml-megaparsec, http-client, http-client-tls, http-types, lens, megaparsec (>=6.0), optparse-applicative, split, text, tweet-hs, unordered-containers [details]
License BSD-3-Clause
Copyright 2016, 2017 Vanessa McHale
Author Vanessa McHale
Maintainer vanessa.mchale@reconfigure.io
Category Web
Home page https://github.com/vmchale/command-line-tweeter#readme
Source repo head: git clone https://hub.darcs.net/vmchale/tweet-hs
Uploaded by vmchale at 2018-01-18T21:16:01Z

Modules

Flags

Manual Flags

NameDescriptionDefault
development

Enable -Werror

Disabled
Automatic Flags
NameDescriptionDefault
llvm-fast

Enable build with llvm backend

Disabled
library

Don't build an executable

Disabled
parallel-gc

Use parallel garbage collector

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for tweet-hs-1.0.1.34

[back to package description]

Command Line Interface Tweeter

Windows build status Build Status

Displaying a user timeline in a terminal.

tweet-hs is a command-line tool for twitter. It has more features than its rust counterpart and it's a bit slower.

Reasons to use tweeth-hs:

Reasons not to use tweet-hs:

Comparison to other command-line clients

Tool Language Color output Interactive Vim plugin support Scriptable Send emoji
tw Rust x x x
rainbowstream Python x x x
oysttyer Perl x ½
tweet-hs Haskell x x x
t Ruby ½ x

Config

Generate a token to authorize access to your twitter account by following the guide here

Then place your API keys and OAuth tokens in a file ~/.cred.toml, as in the following example:

api-key = "API_KEY_HERE"
api-sec = "API_SECRET_HERE"
tok = "OAUTH_TOKEN_HERE"
tok-sec = "TOKEN_SECRET_HERE"

Installation

If you're on Linux/Windows the best way is probably to download the binaries from the releases page here.

To build from source, install haskell stack; on unix systems this is as simple as

wget -qO- https://get.haskellstack.org/ | sh

Then type stack install tweet-hs it will put an executable called tweet on your path.

Use

View Profiles and timelines

To get your timeline, simply type:

tweet view

To view a user's profile, type e.g.

tweet user NateSilver538 --color

Sending tweets

To send a tweet:

tweet send "This is my tweet"

Input from stdin

To tweet from stderr, run a command that pipes stderr to stdin, i.e.

stack build &>/dev/null | tweet input

The tweet executable reads from stdin only, but you can view the options (replies, number of tweets to thread, etc.) with

tweet --help

This script powers the twitter account @my_build_errors for instance. There's an example bash script for in bash/example

Viewing your timeline

You can also use

tweet view

or

tweet view --color

to view your own timeline.

GHCi integration

You can define the following in your ~/.ghci

:def tweet (\str -> pure $ ":! tweet send \"" ++ str ++ "\"")

Completions

The directory bash/ has a mkCompletions script to allow command completions for your convenience.

Library

A haskell package is included. It's fairly easy to use once you have the credentials set up, with two main functions: thread and basicTweet: the first for threading your own tweets or replying to someone else's and the second for just tweeting.