Skip to content

Commit

Permalink
cleanup: update files (#17)
Browse files Browse the repository at this point in the history
Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
  • Loading branch information
kbdharun authored Sep 30, 2024
1 parent 920a963 commit 832a44f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
2 changes: 1 addition & 1 deletion LICENSE → LICENSE.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
33 changes: 18 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -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=<token>
BOT_USERNAME=<username>
REPO_SLUG=tldr-pages/tldr
PORT=<port>
```sh
FLASK_APP=/path/to/app/tldr_bot.py
BOT_TOKEN=<token>
BOT_USERNAME=<username>
REPO_SLUG=tldr-pages/tldr
PORT=<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;
}
```

0 comments on commit 832a44f

Please sign in to comment.