aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorKyle Javier [kj_sh604]2026-03-16 14:24:34 -0400
committerGitHub2026-03-16 14:24:34 -0400
commit64d8fc9ce9922f38780cc677478cbfb47b21a87e (patch)
tree5b244c18193da100a88904536bf1496392339f65 /README.md
parent17a970b067fcdf6758668c23184fb2112370bb94 (diff)
merge: python rewrite (#1)
* refactor: Dockerfile * refactor: docker-compose.yml * refactor: docker-entrypoint.sh * refactor: src/font.php * refactor: src/fonts.php * refactor: src/index.php * refactor: src/upload.php * refactor: src/app.py * refactor: src/index.html * refactor: src/requirements.txt * refactor: 24.04 vps compatibility and README re-write * refactor: python .gitignore update * refactor: README.md
Diffstat (limited to 'README.md')
-rw-r--r--README.md46
1 files changed, 33 insertions, 13 deletions
diff --git a/README.md b/README.md
index 140f679..f8883d0 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
> suckless's sent tool ported to the very sucky web world
A web-based reimplementation of [suckless sent](https://tools.suckless.org/sent/)
-using pure PHP and vanilla JavaScript.
+using Python and vanilla JavaScript.
<img width="1280" height="800" alt="sent0" src="https://github.com/user-attachments/assets/0c503bd4-3609-4e36-ae23-77b7f0711736" />
<br><br>
@@ -11,15 +11,14 @@ using pure PHP and vanilla JavaScript.
## features
-- **sent-compatible format** — paragraphs = slides, `#` comments, `@image`
+- **sent-compatible format** - paragraphs = slides, `#` comments, `@image`
slides, `\` escapes
-- **keyboard navigation** — arrow keys, hjkl, space, enter, backspace, pgup/pgdn
+- **keyboard navigation** - arrow keys, hjkl, space, enter, backspace, pgup/pgdn
(same as sent)
-- **mouse navigation** — left-click right half = next, left half = prev, scroll
+- **mouse navigation** - left-click right half = next, left half = prev, scroll
wheel
-- **image upload** — upload images and insert `@filename` references
-- **export** — download as `.sent` file for local sent, or export `.pdf` for portability
-
+- **image upload** - upload images and insert `@filename` references (50 MB cap)
+- **export** - download as `.sent` file for local sent, or export `.pdf` for portability
## usage
### docker compose (recommended)
@@ -37,6 +36,26 @@ docker build -t sent-web .
docker run -d -p 3000:3000 --init --name sent-web sent-web
```
+### local python run (without docker)
+
+Requirements:
+
+- Python `3.12+`
+- `fontconfig` (`fc-list` must be available)
+- `libmagic` runtime (`libmagic1` on Ubuntu)
+
+Setup:
+
+```sh
+cd src
+python3.12 -m venv .venv
+. .venv/bin/activate
+pip install -r requirements.txt
+gunicorn --bind 0.0.0.0:3000 --workers 2 app:app
+```
+
+Then open [http://localhost:3000](http://localhost:3000).
+
### presentation shortcuts
| key | action |
@@ -65,12 +84,13 @@ with multiple lines
## technology
-- **PHP 8.3** — no framework, just `.php` files
-- **vanilla JavaScript** — no npm, no webpack, no react
-- **[noir.css](https://github.com/kj-sh604/noir.css)** — classless CSS
-- **Apache** — serves it all
-- **fontconfig** — `fc-list` for font enumeration
-- **Docker** — containerized with fonts pre-installed
+- **Python 3.12+** - Flask backend
+- **vanilla JavaScript** - no npm, no webpack, no react
+- **[noir.css](https://github.com/kj-sh604/noir.css)** - classless CSS
+- **Gunicorn** - production WSGI server
+- **fontconfig** - `fc-list` for font enumeration
+- **python-magic + libmagic** - content-based upload type checks
+- **Docker** - containerized with fonts pre-installed
## license