The tweet-hs package

[ Tags: bsd3, library, web ] [ Propose Tags ]

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
Dependencies aeson, ansi-wl-pprint, authenticate-oauth, base (>=4.7 && <5), bytestring, composition, data-default, directory, extra, http-client, http-client-tls, http-types, lens, megaparsec, MissingH, optparse-applicative, split, text, tweet-hs [details]
License BSD3
Copyright 2016 Vanessa McHale
Author Vanessa McHale
Maintainer tmchale@wisc.edu
Category Web
Home page https://github.com/vmchale/command-line-tweeter#readme
Source repository head: git clone https://github.com/vmchale/command-line-tweeter
Uploaded Sat Apr 8 06:13:26 UTC 2017 by vmchale
Distributions NixOS:1.0.1.27
Executables tweet
Downloads 1403 total (58 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-04-08 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Flags

NameDescriptionDefaultType
llvm-fast

Enable build with llvm backend

DisabledAutomatic

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

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for tweet-hs-0.5.3.4

[back to package description]

Command Line Interface Tweeter

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-s:

  • Faster than other tools (t, oysttyer)
  • Support for colored output.
  • Can be used in scripts
  • You know haskell and like being able to extend your tools.
  • You want something that can be called from vim
  • You want a twitter library for haskell.
  • BSD3 licensed

Reasons not to use tweet-hs:

  • You want to extend your tools in haskell
  • You want "twitter in a terminal" that rainbowtools or oysttyer provides.
  • You want to be able to easily tweet emoji

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, separated by a line break:

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 tweet from stderr, run a command that pipes stderr to stdin, i.e.

YOUR_BUILD_COMMAND 2>&1 >/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.

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.