https://github.com/kamui-fin/res-bank
Bot interface to manage a resource bank
https://github.com/kamui-fin/res-bank
browser-addon discord-bot management resource-db
Last synced: 3 months ago
JSON representation
Bot interface to manage a resource bank
- Host: GitHub
- URL: https://github.com/kamui-fin/res-bank
- Owner: kamui-fin
- License: gpl-3.0
- Created: 2022-07-15T21:25:36.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-05T22:09:42.000Z (almost 3 years ago)
- Last Synced: 2025-01-26T16:48:17.154Z (5 months ago)
- Topics: browser-addon, discord-bot, management, resource-db
- Language: Python
- Homepage:
- Size: 499 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Resource management Discord bot
This is a Discord bot for our server which is meant for centralized resource aggregation, management, and search. Saving useful and unique resources together as a group for various topics is now significantly easier with this bot. No more keeping track of arbitrary links buried across DMs.
## Features Overview
- Weekly backups of resource database
- On-demand export to CSV or JSON
- Submit links or attachments with keywords and an optional description
- SEO data pulled for improved search results
- Batch import from a file of links
- Search using author and query filters
- Custom limit option
- Paginated 12 records per page using new interactions library
- Immutable records with a constant log of newly added submissions
- Supplemental cross-browser extension to make it easier & faster to submit records## Installation
Pull the repository and install dependencies:
```
git clone https://github.com/kamui-fin/res-bank.git
cd res-bank
pip install -r requirements.txt
```Add a `.env` file with the discord token for the bot. Make sure to replace `{token}` with your actual token.
```
echo "TOKEN={token}" >> .env
```Run the bot:
```
python src/bot.py
```## Commands
### Add submission
Adds a single submission to the resource database.
#### Format
```
"[keyword(s)]" "[description]" [link]
```Keywords can be separated with any delimiter. Description and keywords must be wrapped within quotes, but the link should not be.
There is no specific command for this functionality, you can simply send a message with this format to the designated channel, like #submissions.
As there should be no duplicate resources in the database, the bot will notify you if there was a collision.#### Example
```
"Programming" "Ask and view programming questions" https://stackoverflow.com/
```### Import links
Batch imports resources to the database using a file of links.
#### Format
`>importlinks` with an attached text file. The file must include _only_ links on separate lines. It optionally receives a string `keywords` to tag all the links.
#### Example

### Search
Sends a search query to the database given a set of parameters and returns the result. Limit must be a valid integer greater than 0.
Optional: `[user]` and `[limit]`. An empty query "" means no text filtering.#### Format
```
>search "[query]" [user] [limit]
```#### Example

### Export
Exports a list of saved resources into a given filetype parameter (either json or csv).
#### Format
```
>export
```#### Example

## Backups
Backups of the database are automatically generated every Monday with the script in the form of JSON files. They are placed in the `backups/` directory.
## Extension
This repository includes an extension that works on Firefox and Chrome to make it easier to send the current tab to the resource bank.
