Code Monkey home page Code Monkey logo

autotweet's Introduction

autotweet.js

What is it?

autotweet.js is a simple node.js script that randomly generates some text from a list of sentences (using a Markov Chain) and then posts it as a tweet on twitter.

How Do I use it?

Before you try using autotweet.js, you'll need to have a twitter account and you'll need to have node.js installed on your computer. After you have that done and over with, just clone autotweet.js from github.

git clone https://github.com/WaldoHatesYou/autotweet.git

Then, go to the "autotweet" directory and write out a "settings.json" file. The "settings.json" file should contain the information that is required to post to your twitter account (api consumer key, api consumer secret, api access token key, and api access token secret) as well as a list of sentences that is to be included in the corpus field of the "settings.json" file. An example is shown below.

{
	"consumer_key":"Insert key here",
	"consumer_secret":"Insert consumer secret here",
	"access_token_key":"Insert access token key here",
	"access_token_secret":"Insert access token secret here",
	"corpus":[
		"Hi, I am a sentence in a corpus",
		"Is this sentence awesome or is this sentence really awesome?",
		"Strawberry fields forever"
	]
}

After you're done that, grab the node-twitter library using the following command.

npm init

Once that finishes, convert your node.js script file into an executable by executing the following command.

chmod+x autotweet

If you finished that step, you can now start sending tweets by typing the following command into your command line.

./autotweet

Of course, if you want to, you can place your settings file in a different location with a name other than "settings.json". If you do this, you will have to pass the location of the json file to autotweet like this.

./autotweet ~/Documents/settings.json

autotweet's People

Contributors

javednissar avatar

Stargazers

Amir avatar  avatar Good God Job avatar Christian avatar Pablo Duboue avatar Uno avatar  avatar moses alexander avatar Sacit Küheylan avatar  avatar Joey Zhou avatar  avatar Yash Desai avatar Fred hao avatar John Marczak avatar  avatar Angus H. avatar Ryan Milbourne avatar  avatar Carlos avatar noa avatar Marc Lebrun avatar Derek Mayer avatar Michael Herman avatar Judson Mitchell avatar Steve Kwok avatar Régis Gaidot avatar Sixia "Leask" Huang avatar veelion avatar 橘子 avatar elaine avatar  avatar 千机变 avatar  avatar Sebastian Boyd avatar Pantelis Koukousoulas avatar Nazeeruddin Ikram avatar

Watchers

Kaique Silva avatar James Cloos 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.