From d263b748aa04139becaabb249a1bdfa11477a8d5 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 10 Jun 2019 15:47:08 +0000 Subject: [PATCH] thumbnail ideas --- README.md | 41 +++++++++++++++++++++++++++++++++++------ docs/design.txt | 21 +++++++++++++++++++++ 2 files changed, 56 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 726209a7..f33cf049 100644 --- a/README.md +++ b/README.md @@ -25,18 +25,47 @@ turn your phone or raspi into a portable file server with resumable uploads/down * [x] volumes * [x] accounts -conclusion: mostly useless -## dependencies +# dependencies -* jinja2 - * markupsafe +* `jinja2` + * pulls in `markupsafe` -## dev env +optional, enables thumbnails: +* `Pillow` (requires py2.7 or py3.5+) + + +# install on android + +install [Termux](https://termux.com/) (see [ocv.me/termux](https://ocv.me/termux/)) and then +```sh +apt install python +python3 -m venv ~/pe/ve.copyparty +. ~/pe/ve.copyparty/activate +pip install jinja2 +# download copyparty somehow +python3 -m copyparty ``` + +for image thumbnails, install optional dependency [Pillow](https://pypi.org/project/Pillow/): +```sh +apt install clang python-dev zlib-dev libjpeg-turbo-dev libcrypt-dev ndk-sysroot +CFLAGS=-I$HOME/../usr/include/ pip install Pillow +``` + + +# dev env setup +```sh python3 -v venv .env . .env/bin/activate -pip install jinja2 # dependencies +pip install jinja2 # mandatory deps +pip install Pillow # thumbnail deps pip install black bandit pylint flake8 # vscode tooling ``` + +# TODO + +roughly sorted by priority + +* support pillow-simd diff --git a/docs/design.txt b/docs/design.txt index bbfd8439..a1f74e34 100644 --- a/docs/design.txt +++ b/docs/design.txt @@ -1,3 +1,24 @@ +## +## current design + +main + tcpsrv + httpsrv + mpsrv + mpworker + httpsrv + ... + +## +## thumbnails + +two components: + thumbcache is directly accessed by httpd to return pregenerated thumbnails + thumbsrv is accessed through a broker on cache miss to generate and return + +## +## initial ideas + need log interface tcpsrv creates it httpsrv must use interface