mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
thumbnail ideas
This commit is contained in:
parent
c758679740
commit
d263b748aa
41
README.md
41
README.md
|
@ -25,18 +25,47 @@ turn your phone or raspi into a portable file server with resumable uploads/down
|
||||||
* [x] volumes
|
* [x] volumes
|
||||||
* [x] accounts
|
* [x] accounts
|
||||||
|
|
||||||
conclusion: mostly useless
|
|
||||||
|
|
||||||
## dependencies
|
# dependencies
|
||||||
|
|
||||||
* jinja2
|
* `jinja2`
|
||||||
* markupsafe
|
* 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
|
python3 -v venv .env
|
||||||
. .env/bin/activate
|
. .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
|
pip install black bandit pylint flake8 # vscode tooling
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
|
||||||
|
roughly sorted by priority
|
||||||
|
|
||||||
|
* support pillow-simd
|
||||||
|
|
|
@ -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
|
need log interface
|
||||||
tcpsrv creates it
|
tcpsrv creates it
|
||||||
httpsrv must use interface
|
httpsrv must use interface
|
||||||
|
|
Loading…
Reference in a new issue