Giter Site home page Giter Site logo

reddit-parenthesis-bot's Introduction

Reddit parenthesis bot

A simple reddit bot which adds missing close parenthesis on comments on reddit. By default set up to only run on /r/programmerhumor


Currently it's kinda broken. That's what happens when you decide to learn writing reddit bots in the middle of the night, when you have to get up early the day after.


This currently runns on the following cron job */5 * * * * /home/parenthesis-bot/programmerhumor/cron-task.sh

reddit-parenthesis-bot's People

Contributors

hugonikanor avatar

Stargazers

 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

reddit-parenthesis-bot's Issues

Limit parenthesis count

Most genuine posts will have a limited number of parentheses anyhow, so I would suggest limiting the maximum number of parentheses the bot will react to. Something like fifteen or twenty should cover it, easy. In cases where this limit is broken, either reply with a generic "parenthesis limit reached" message or don't reply at all.

Please consider rate-limiting per submission

Right now the bot adds some nontrivial noise in threads where people are having good discussions.

I recommend limiting the bot's comments to a maximum of 1 per submission. You can also make exceptions for when users reply to the bot's threads.

Negative depth parenthesis

Currently, the input

(()))))((((

is counted by count-paren.sh as 1. However, (()))))(((() is negative depth parentheses which is not valid parentheses.

Instead, perhaps we should ignore orphan close parentheses that do not match any open parentheses. For example the above input should be closed with )))).

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.