# CatAsk Theme Store icon Theme Store a theme store for CatAsk ## Prerequisites - Python 3.10+ (3.12+ recommended) ## Install Clone this repository: ``` sh git clone https://codeberg.org/catask-org/theme-store.git ``` Go into the cloned repository, create a virtual environment and activate it: ### Linux ``` sh python3 -m venv venv && . venv/bin/activate ``` ### Windows (PowerShell) ``` pwsh python -m venv venv; .\venv\Scripts\activate ``` --- After that, install required packages: ``` sh pip install -r requirements.txt ``` ## Post-install Rename `.env.example` to `.env`, then configure all the values below: `APP_SECRET` - application secret, generate one with this command: `python3 -c 'import secrets; print(secrets.token_hex())'` ## Usage ### Starting CTS Start CTS with this command: ``` gunicorn -w 4 app:app ``` This command will start CTS at the `127.0.0.1:8000` address If you want CTS to be accessible on a different host address, specify a `--bind` option to the command (e.g. `--bind 127.0.0.1:5000`) For debugging, run `flask run --debug` ### Adding themes You can add themes with the `flask add-theme` command For example: ``` sh flask add-theme --name "My theme" --author "John Doe" --created-at "2017-02-28 06:48:10" --preview-file "/home/user/Pictures/preview.png" --theme-file "/home/user/Documents/theme.css" ``` You can also use short arguments instead: ``` sh flask add-theme -n "My theme" -a "John Doe" -c "2017-02-28 06:48:10" -p "/home/user/Pictures/my_theme.png" -t "/home/user/Documents/mytheme.css" ``` ### Caddy This repository contains an example Caddyfile that runs CTS on themes.example.com by reverse proxying it to 127.0.0.1:8000, you can modify it as needed ## Changelog Check [CHANGELOG.md](./CHANGELOG.md) file for release notes