Giter Club home page Giter Club logo

dessert-bot's Introduction

Dessert Bot v2

DESSERT

Un bot qui aime beaucoup le dessert.

Installation

Pour faire fonctionner ce bot vous aurez besoin de :

  • Python >= 2.7
  • clés API Twitter (consumer key, consumer secret key, token key et secret token key) avec les autorisations de lecture, d'écriture et d'accès aux messages privés(vous devez créer une app sur dev.twitter.com)
  • de quoi launch le script périodiquement (cron)

Mettez vos clés API dans le fichier twitter_settings.py et sauvegardez. Le script s'occupe du reste.

Utilisation

Le syntaxe principale est : python dessert.py [argument]

Comment arguments disponibles, vous avez :

  • -s, qui vous permettra tout simplement de poster un tweet
  • -m, qui s'occupera de répondre aux mentions
  • -mp, qui s'occupera de répondre aux messages privés
  • -r, qui s'occupera de retweeter un post contenant "LE DESSERT"

Pour automatiser le script vous pouvez utiliser une commande cron.

Exemple (utilisé par LEDESSERT)

30 12,20 * * * python /home/pi/twitterBots/dessert/dessert.py -s >> /home/pi/twitterBots/dessert/logsDessert

0 */9 * * * python /home/pi/twitterBots/dessert/dessert.py -r >> /home/pi/twitterBots/dessert/logsDessert

*/10 * * * * python /home/pi/twitterBots/dessert/dessert.py -m >> /home/pi/twitterBots/dessert/logsDessert

Fonctionnement

Le script génère un nombre aléatoire et grâce à un algorithme incroyable de ouf, il séléctionne l'une des réponses grâce à leur indice de référence.

dessert-bot's People

Contributors

lukaamet avatar

Watchers

 avatar  avatar  avatar

Forkers

chiyozel

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.