Add docstrings to files
This commit is contained in:
parent
551644de5e
commit
e045f07282
3 changed files with 74 additions and 5 deletions
|
|
@ -1,3 +1,31 @@
|
|||
"""
|
||||
The main file for the discord-rss-bot.
|
||||
|
||||
This file is used to start the bot.
|
||||
|
||||
Functions:
|
||||
check_feed() -> /check
|
||||
POST - Update a feed.
|
||||
crete_feed() -> /add
|
||||
POST - Create a new feed.
|
||||
favicon() -> /favicon.ico
|
||||
GET - Return the favicon.
|
||||
get_add() -> /add
|
||||
GET - Page for adding a new feed.
|
||||
get_feed() -> /feed
|
||||
GET - Page for a single feed.
|
||||
index() -> /
|
||||
GET - index page.
|
||||
remove_feed() -> /remove
|
||||
POST - Remove a feed.
|
||||
|
||||
create_list_of_webhooks()
|
||||
Create a list with webhooks.
|
||||
make_context_index()
|
||||
Create the needed context for the index page.
|
||||
startup()
|
||||
Runs on startup.
|
||||
"""
|
||||
import enum
|
||||
import sys
|
||||
from functools import cache
|
||||
|
|
@ -60,7 +88,7 @@ def index(request: Request):
|
|||
This is the root of the website.
|
||||
|
||||
Args:
|
||||
request:
|
||||
request: The request.
|
||||
|
||||
Returns:
|
||||
HTMLResponse: The HTML response.
|
||||
|
|
@ -188,10 +216,10 @@ async def create_feed(feed_url: str = Form(), webhook_dropdown: str = Form()):
|
|||
@app.get("/add", response_class=HTMLResponse)
|
||||
def get_add(request: Request):
|
||||
"""
|
||||
This is the root of the website.
|
||||
Page for adding a new feed.
|
||||
|
||||
Args:
|
||||
request:
|
||||
request: The request.
|
||||
|
||||
Returns:
|
||||
HTMLResponse: The HTML response.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue