Bash.im database and API
Go to file
Darkn Neko 84eeeb02a6
Update requirements.txt and improve README.md
2023-06-16 12:58:28 +03:00
.gitignore Updated README.md: added credits and about section; added .gitignore 2023-01-28 13:56:02 +03:00
README.md Update requirements.txt and improve README.md 2023-06-16 12:58:28 +03:00
main.py Initiated git repo and enabled lfs for quotes db 2023-01-28 13:29:33 +03:00
quotes.sqlite3 Initiated git repo and enabled lfs for quotes db 2023-01-28 13:29:33 +03:00
requirements.txt Update requirements.txt and improve README.md 2023-06-16 12:58:28 +03:00

README.md

What's this?

This repository contains database of all quotes from the famous website bash.im as well as the API that allows self-hosting your own quotes website.
All of this started in February 2022 when bash.im was shut down.
Quotes were parsed from the web archive.

Requirements

  • Python 3.8+ (Python 3.11 is recommended)
  • Git LFS for fetching the quotes DB

Quickstart

# Clone this repository and enter it:  
git clone https://git.darkn.space/Darkn/bash-fastapi.git  
# Download the quotes.sqlite3 using Git LFS and replace the pointer file with the actual database:  
git lfs pull  
# Configure virtualenv:  
python3 -m venv .venv  
# Activate virtualenv:  
. .venv/bin/activate  
# Install dependencies:  
python3 -m pip install -r requirements.txt  
# Start main.py  
python main.py  

FAQ

How do I change the port on which API runs?

Default port is 8001, but you can change it inside of main.py by modifying those lines at the very end:

if __name__ == "__main__":
    uvicorn.run(app, port=8001, host="0.0.0.0")

Why is quotes.sqlite3 so small and has no quotes inside of it after I cloned your repository?

You probably forgot to install and/or use Git LFS. Go to the repository directory and run following commands:

git lfs install
git lfs fetch
git lfs checkout

You can read more about using Git LFS here and here.

Do you really have all quotes from bash.im?

As long as it was indexed by the web archive, it's there.

Credits:

Thanks to The Man, the Myth, the Legend the Darkn member gameeroor for helping with parsing and making such a nice API.