Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexleungz/flask-wordle
A wordle game with absurdle mode powered by flask.
https://github.com/alexleungz/flask-wordle
flask python tailwind
Last synced: 7 days ago
JSON representation
A wordle game with absurdle mode powered by flask.
- Host: GitHub
- URL: https://github.com/alexleungz/flask-wordle
- Owner: AlexLeungZ
- Created: 2024-10-28T09:04:33.000Z (11 days ago)
- Default Branch: main
- Last Pushed: 2024-10-29T21:19:52.000Z (9 days ago)
- Last Synced: 2024-10-29T23:38:14.246Z (9 days ago)
- Topics: flask, python, tailwind
- Language: Python
- Homepage:
- Size: 104 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flask Wordle
A wordle game with absurdle mode powered by flask.
## TL;DR
Make sure you have conda/mamba and node/nvm installed, and run:
```bash
nvm install && nvm use
npm install && npm run webpack
mamba env create
mamba activate wordle
python webapp.py --path ./path/to/file.txt # In production mode or
python webapp.py --debug --path ./words/default.txt # In debug mode
```The application should be running at port 5000.
## List of dependencies
[package.json]: package.json
[environment.yml]: environment.yml
[handler.log]: handler.log### Python dependencies
|Package |Version |Channel |Settings |Remarks |
|:------------------|:--------------|:--------------|:----------------|:---------------------:|
|python |>=3.12.0 |conda-forge |[environment.yml]| |
|flask |>=3.0 |conda-forge |[environment.yml]| |
|waitress |>=3.0 |conda-forge |[environment.yml]| |### Javascript dependencies
|Package |Version |Channel |Settings |Remarks |
|:------------------|:--------------|:--------------|:----------------|:---------------------:|
|typescript |>=5.5 |npm |[package.json] | |
|sass |>=1.77 |npm |[package.json] | |
|webpack |>=5.93 |npm |[package.json] | |## Install Python dependencies
- Install [miniconda](docs/miniconda.md) if needed
- Install [mamba](docs/mamba.md) if needed### A. With YAML configuration
```bash
mamba env create # For production
mamba env create -f environment.dev.yml # For development
mamba activate wordle
```### B. With CLI
```bash
mamba create -n wordle
mamba activate wordlemamba install -c conda-forge flask cython waitress -y
mamba install -c conda-forge regex -y# Dev dependencies
mamba install -c conda-forge ipykernel djlint ruff -y
```## Install Javascript dependencies
- Install [nvm](docs/node.md) if needed
### Automatically config and generate js and css
```bash
bash node.sh
```### Manually config nvm and node
```bash
nvm install
nvm usenpm install
```## Webpack
```bash
npm run webpack # In production mode or
npm run webpack:watch # In debug mode
```## Ruff
```bash
ruff check . # Check mode
ruff check . --watch # Watch mode
```## Run the app
```bash
python webapp.py --path ./path/to/file.txt # In production mode or
python webapp.py --flask --path ./path/to/file.txt # In flask mode or
python webapp.py --debug --path ./path/to/file.txt # In debug mode
``````text
-h, --help Show this help message and exit
-f, --flask Run under flask (default: False)
-d, --debug Debug under flask (default: False)
-t, --test Create app only (default: False)
-s, --host HOST Server host (default: None)
-p, --port PORT Server port (default: None)
--path PATH Wordle word list path (Required: True)
--rounds ROUNDS max number of rounds (default: 6)
```### Log files
The log file is located at [handler.log]
### Remarks
- Normally the answers are logged for debug propose (Under debug mode)
- It is recommended to set a larger number for absurdle mode (host cheat)