From 9da252a7d4e842010adc0f36f1c6610e5080abae Mon Sep 17 00:00:00 2001 From: "K.B.Dharun Krishna" Date: Tue, 1 Oct 2024 00:39:25 +0530 Subject: [PATCH] cleanup: update files Signed-off-by: K.B.Dharun Krishna --- .gitattributes | 1 + LICENSE => LICENSE.txt | 2 +- README.md | 33 ++++++++++++++++++--------------- 3 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 .gitattributes rename LICENSE => LICENSE.txt (95%) diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6313b56 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/LICENSE b/LICENSE.txt similarity index 95% rename from LICENSE rename to LICENSE.txt index 5a1ed6e..1b5da62 100644 --- a/LICENSE +++ b/LICENSE.txt @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017 tldr pages +Copyright (c) 2017 - present tldr pages contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index a95b567..5ab2013 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,34 @@ -tldr-bot -======== +# tldr-bot -A simple [bot](https://github.com/tldr-bot) that performs automation tasks on the main [tldr repo](https://github.com/tldr-pages/tldr). +A simple [bot](https://github.com/tldr-bot) that performs automation tasks on the main [tldr repository](https://github.com/tldr-pages/tldr). -Quick start ------------ +## Quick start -First of all, set the needed environment variables: +- Generate a GitHub personal access token with the `repo` scope and then set the needed environment variables: - FLASK_APP=/path/to/app/tldr_bot.py - BOT_TOKEN= - BOT_USERNAME= - REPO_SLUG=tldr-pages/tldr - PORT= +```sh +FLASK_APP=/path/to/app/tldr_bot.py +BOT_TOKEN= +BOT_USERNAME= +REPO_SLUG=tldr-pages/tldr +PORT= +``` -Then run using Flask: +Then run the app using Flask: - flask run --port=$PORT +```sh +flask run --port=$PORT +``` -Run as a service ----------------- +## Run as a service See the [`tldr-bot.service`](/tldr-bot.service) file for an example systemd unit configuration. Typically, the service is running under uWSGI and fronted by nginx. So you need to set the proper nginx config too. +```sh location / { include uwsgi_params; uwsgi_pass 127.0.0.1:6129; } +```