Coder Social home page Coder Social logo

hypertweet's Introduction

hypertweet

Proof of concept Twitter + Dat feed stream thingy.

Streams your twitter feed to a hypercore feed. Pretty print your feed or stream it anywhere with hyperpipe.

hypertweet

Install

npm install -g hypertweet

hypertweet --help # see help!

Set twitter tokens

Get Twitter developer key and either set them as environment variables or copy .sample.env to .env file.

process.env.TWITTER_CONSUMER_KEY,
process.env.TWITTER_CONSUMER_SECRET
process.env.TWITTER_ACCESS_TOKEN_KEY,
process.env.TWITTER_ACCESS_TOKEN_SECRET

Usage

Use hypertweet --help to see all the options.

Collect Feed Data

Streams your feed into a hypercore feed:

❯ hypertweet --dir=/joe/my-twitter-data/
sharing 0c3ec59a8111fde379e7ef82e6610ec02daf6bd3b704f41554cd5fe76afd5cc4

2017-04-21T02:20:24.205Z tweet by: 'some twitter user'
2017-04-21T02:20:25.000Z tweet by: 'more chirps'
2017-04-21T02:20:30.043Z tweet by: 'asdf'

Print anywhere

Pretty print it in another terminal (or another computer anywhere):

❯ hypertweet 0c3ec59a8111fde379e7ef82e6610ec02daf6bd3b704f41554cd5fe76afd5cc4

# pretty tweets here

Or pipe

Pipe anywhere to anything.

npm install -g hyperpipe
hyperpipe /db 0c3ec59a8111fde379e7ef82e6610ec02daf6bd3b704f41554cd5fe76afd5cc4 > data.json

API

hypertweet(dir|storage, [opts], callback(err, feed))

Create a stream from the twitter API and share via hypercore feed. Automatically joins network via discovery-swarm.

  • dir|storage: directory or random access module, e.g random-access-memory.
  • opts.streamUrl: the twitter streaming api endpoint you want. defaults to user.
  • opts.streamOpts: stream opts

License

MIT

hypertweet's People

Contributors

joehand 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

Watchers

 avatar  avatar  avatar  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.