Giter Club home page Giter Club logo

cloaked-chatter's Introduction

README

About

This program posts links to news items on /r/technology on Reddit. The links are gathered from TechHeat. The project is licensed under Mozilla Public License 2.0.

Author: Daniel 'MaTachi' Jonsson, http://danielj.se

Setup

  1. Install pip sudo apt-get install python3-pip

  2. Install PRAW sudo pip-3.2 install praw

  3. Install BeatuifulSoup sudo pip-3.2 install beautifulsoup4

  4. Install SQLite3 sudo apt-get install sqlite3

  5. Install YAML sudo apt-get install python3-yaml

  6. Configure with your Reddit username and password:

    1. Make a copy of bot-sample.ini named bot.ini: cd configs ; cp bot-sample.ini bot.ini

    2. Add your Reddit username and password to bot.ini: vim bot.ini

Launching

  1. Add permission to launch the program chmod u+x bot.py.

  2. Launch with ./bot.py or python3 bot.py.

Schedule automatic posting

Automatic posting can be achieved by schedule launching bot.py with cron. Add a cronjob with crontab -e. List cronjobs with crontab -l.

Cronjob to launch the script once every hour:

0 * * * * cd /home/pi/cloaked-chatter && ./bot.py

Or to launch it once every two hours:

0 1-23/2 * * * cd /home/pi/cloaked-chatter && ./bot.py

As the Linux username pi suggests, in this case it's running on a Raspberry Pi with Raspbian "wheezy". A Raspberry Pi is perfect for this type of project considering its low energy consumption and that very little computing power is needed.

Program arguments

  • --level=[1,2,3,4,5]: Specify the freshness level, see bot.ini. This overrides the setting in bot.ini. Useful when scheduling multiple instances of the program and you want them to run with different levels.

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.