Giter Club home page Giter Club logo

node-tweet-cli's Introduction

node-tweet-cli

build status npm version Download Count

Small node.js cli tool that allows to tweet from bash, zsh, whatever..

http://ascii.io/a/5633

How to use it

Install module globally:

npm install -g node-tweet-cli

You will be able to use tweet command in your shell.

Start with authorizing your twitter account and start tweeting :)

Commands to use

There are description of available commands here:

tweet login

The tweet login command manages authorization flow. It redirects you to http://twitter.com/oauth/authorize?oauth_token=.. where you need to login and get a PIN. Enter PIN in the terminal prompt and "voilà!" - you are able to tweet from your terminal.

tweet login

tweet logout

The tweet logout command unauthorizes your twitter account from node-tweet-cli.

tweet logout

tweet create (or tweet new)

The tweet create command allows you to post tweets into your twitter account. You will be prompted to type a message.

tweet create

or alias:

tweet new

tweet read

The tweet read command posts message to twitter but reads it from stdin, enabling use with scripting.

echo "your tweet message" | tweet read

or

tweet read < yourInputFile

tweet whoami

The tweet whoami command shows current twitter account name.

tweet whoami

tweet stream [options]

Streams tweets to the console, optionally as json.

tweet stream twitter

or

tweet stream twitter --json

Warning The latter option dumps a lot of json in your console. Make sure your console is able to keep up, or (preferably) pipe to another utility. The latter is actually the use case this option is designed for.

tweet timeline [options]

Streams your timeline to the console, optionally as json.

tweet timeline

or

tweet timeline --json

To do

  • tweeting with images

Contribution

If you have suggestions or found a bug please create an issue here. Thanks!


(c) 2013-2015 MIT License

node-tweet-cli's People

Contributors

1e4 avatar agudulin avatar drugoi avatar jzacsh avatar victorperin avatar voronianski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

node-tweet-cli's Issues

Not able to authenticate

I installed node-tweet-cli via npm and proceed with the -g ( global) option.

Then "tweet login" and got the following error message:
info: Start sending request to https://twitter.com
error: Error while executing command!

Any help would be appreciated!

support piping to tweet

Would be useful to allow better piping to and from tweet in order to incorporate it into other command line tools.

stream timeline

how to stream my own timeline

$tweet stream twitter

this pulls everything, but how to stream my own? Also is it possible to pipe the result into other app? (e.g., read x x x x)

Stream api

I have interest in a command line app that can stream twitter messages to stdout. Eg, in the lines of:

$ tweet stream twitter

Streaming all tweets related to "twitter" (which are a lot).

Using this, I can pipe the output to other utilities. Would this be something for node-tweet-cli? If so, I am happy to work on it and create a pull request. I was thinking along the lines of

$ tweet stream twitter

Outputting tweets as lines of text in the format "@[user]: [tweet]" and

$ tweet stream twitter --json

Outputting tweets as lines of json (which would be useful in a pipe chain)

Stream timeline

Is there a way to start streaming the timeline?
I'll try to find a way and post a pull request, but if someone knows how to do this it could be faster.

Weird auth issue with locally installed package

When package is installed locally from cloned master:

➜  node-tweet-cli git:(master) ✗ sudo ./bin/tweet.js login
info:    Start sending request to https://twitter.com
https://api.twitter.com/oauth/request_token {}
{ statusCode: 400,
  data: '{"errors":[{"code":215,"message":"Bad Authentication data."}]}' }
error:   Error while executing command!

When same version 0.1.3 is installed via npm globally, it works. Very strange.

Stopped Working?

Trying to send a tweet:

$ tweet create -d
info:    Type your tweet below (max 140 symbols):
prompt: tweet:  Testing Tweet?
error:   Error while executing command!

Error: {
  "message": "Timestamp out of bounds",
  "code": 135
}
    at module.exports (/usr/local/lib/node_modules/node-tweet-cli/src/common/errors.js:10:9)
    at Request._callback (/usr/local/lib/node_modules/node-tweet-cli/src/commands/create.js:29:13)
    at Request.self.callback (/usr/local/lib/node_modules/node-tweet-cli/node_modules/request/request.js:129:22)
    at Request.emit (events.js:98:17)
    at Request.<anonymous> (/usr/local/lib/node_modules/node-tweet-cli/node_modules/request/request.js:873:14)
    at Request.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/node-tweet-cli/node_modules/request/request.js:824:12)
    at IncomingMessage.emit (events.js:117:20)
    at _stream_readable.js:943:16
    at process._tickCallback (node.js:419:13)

.
Not sure if a dependency updated or if the API has changed. Just a heads up!

Unable to authenticate behind proxy

I installed via NPM and on using tweet login I'm faced with this:

> tweet login
info:    Start sending request to https://twitter.com
error:   Error while executing command!

I'm using zsh on a Linux system behind an http proxy server with environment variables http_proxy https_proxy set.
Are proxies supported at the moment or does it require any particular environment variables to be set?

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.