GithubHelp home page GithubHelp logo

sbt-twt's Introduction

sbt-twt

sbt-twt is a twitter command for simple-built-tool (sbt), forked from @n8han's dispatch twine.

install it

add the following to ~/.sbt/plugins/build.sbt:

addSbtPlugin("com.eed3si9n" % "sbt-twt" % "0.2.0")

this adds a new command called twt with tab completion.

for 0.12.0-M2 add the following to ~/.sbt/plugins/build.sbt:

libraryDependencies += Defaults.sbtPluginExtra("com.eed3si9n" % "sbt-twt" % "0.2.1", "0.12.0-M2", "2.9.1")

uninstall it

remove the oauth token:

sbt "twt clearauth"

remove the entry from global build.sbt.

twt

all you have to do now, is start up sbt, and in the console type twt <command>.

> twt
usage: twt <command>
  twt log [-12]             : prints 12 tweets from the timeline.
  twt unread [-100]         : prints unread tweets from the timeline.
  twt grep #scala [-12]     : searches for #scala. also as twt ?
  twt commit "tweet!"       : tweets quoted string. also as twt ci.
  twt re <id> "tweet!"      : tweets quoted string in reply to <id>.
  twt rt 118567297655902208 : retweets the tweet with <id>.
  twt fav <id> [-d]         : faves/unfaves the tweet with  <id>.
  twt pin 1234567           : authorizes twt to access twitter.
  twt clearauth             : clears the authorization.
> twt grep [tab]
grep "#sbt #scala"   grep #scala
> twt grep "#sbt #scala"
* <bibixdev>             118465815925374978
- bibixdev: #scala #sbt #github pure pleasure!

oauth

since we don't want to either store passwords on machine or send them over wire, it uses OAuth. and because this is not a web app, you'd need to type in a PIN number given to you by twitter.

$ sbt
...
> twt log
accept the authorization request in your browser, for the fun to begin.
(brower should pop up asking if you want to let sbt-twt access you account)
then run `twt pin <pin>` to complete the process.
> twt pin 8686743

credits

most of the heavy lifting of talking to twitter was done by @n8han's dispatch library.

the Unicode rendering issue (mojibakeh)

you need to add -Dfile.encoding=UTF-8 in sbt's launch script to render non-ASCII correctly.

sbt-twt's People

Contributors

eed3si9n avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.