Simple file browser over HTTP
Demo: https://webls.x4204.xyz/fs/
python 3.12
poetry
- create virtual environment
poetry env use 3.12
- enter virtual environment
poetry shell
- install dependencies
poetry install
- setup
storage/
directory for development and testing
sudo bash scripts/setup-storage.sh
- run tests
python -m tests -v
- run app
python -m webls --help
python -m webls
- build image
docker build \
--build-arg UID=$(id -u) \
--build-arg GID=$(id -g) \
--tag webls:local .
- run container and serve a specific host directory
docker run \
--rm \
--network=host \
--volume /path/to/dir:/app/storage \
webls:local
-
?migrate to werkzeug
-
?support downloading a directory (with confirmation; zip)
- export pip requirements
bash scripts/export-pip-requirements.sh
templates/highlight.css
is generated by:
from pygments.formatters import HtmlFormatter
print(HtmlFormatter().get_style_defs('.highlight'))