Code Monkey home page Code Monkey logo

maintainer-python-bot's Introduction

Maintainer-bot

Maintainer-telegram-bot is simple but useful assistant, that notify you about new GitHub releases (GitLab, BitBucket, etc. will be added later).

image

Setup

Clone git repository

git clone https://github.com/sund3RRR/maintainer-bot.git
cd maintainer-bot

Setup python

python -m venv venv
source ./venv/bin/activate
pip install -r requirements.txt

Run

Don't forget to set your tokens in environment variables.

githubToken=<TOKEN> tgToken=<TOKEN> python src/run.py

Info

Bot uses an exception wrapper, which is set via excepthook to catch unhandled exceptions and write them to the log/ directory.

def log_exception(exc_type, exc_value, exc_traceback):
    logging.error("Uncaught exception",
                  exc_info=(exc_type, exc_value, exc_traceback))
    tb = ''.join(traceback.format_exception(exc_type, exc_value, exc_traceback))

    dt = datetime.datetime.now().strftime(r"%Y-%m-%d-%H:%M")
    with open(f"log/exception-{dt}.log", "w") as f:
        f.write(tb)

sys.excepthook = log_exception

Media

image add_repo list_repos

maintainer-python-bot's People

Contributors

sund3rrr avatar

Watchers

 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.