Lbox - a litterbox clone-ish
This is a self-hosted server that makes you make available files for a limited amount of time.
Installation
The best way to install this is via pipx which will create a virtual environment and manage the dependencies for you:
pipx install lbox
That will work when the project is available from Pypi, meanwhile from the .tar.gz file as created by the build command sdist:
pipx install lbox-X.Y.tar.gz
Where, of course, X.Y is the version number.
Building from repo
You should be working on a virtual environment. On your virtual environment install the buildpackage:
python3 -m pip install build
then simply run build, which will create the source distribution (i.e. the .tar.gz file) and the wheel package:
python3 -m build
Using Lbox
Lbox scans the directory specified in the environment variable LBOX_ROOTDIR for directories with names of the form number timeunits e.g. 5 hours, 2days, 20m, etc. And the files under those directories will be deleted after the specified time elapses, being available for download in the meantime. Note that you only need to specify d, m, h and s for days, minutes, hours and seconds, respectively. Only the initial matters. Also note that whitespace between the number and the units is optional.
If the LBOX_ROOTDIR environment variable is not set, the default folder will be /var/www/lbox
The lbox server
The lboxcommand is the web server that publishes the files. It will just provide a list of the files along with its size and the time to expiration. Every file can be downloaded from the url ending in /file/<filename>, with no additional directory path. No, the server doesn't allow uploading new files, but what's the need for it? Being self hosted, you can always scpinto the right directories to share.
The lbox server runs by default on port 8080.
To run lboxuse the command:
LBOX_ROOTDIR=/path/to/dir lbox
It is recommended that a systemdis created to run lbox continuously. It is also recommended that lboxbe run on http behind a reverse proxy that handles the SSL certificate and manages security etc.
License
This project is released under the MIT license.
Metadata
Release files for lbox 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lbox-2.0.0.tar.gz | 54.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lbox-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 107.6 kB
Release files / lbox-2.0.0.tar.gz
| Download URL | lbox-2.0.0.tar.gz |
|---|---|
| Size | 54.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49e57a1dadc1a57b81fa329d1a6896de1a06b77a6cb263a1754b765a87ea8b4c
|
|
BLAKE2b-256 checksum How to use checksums |
9ae8327bd76fca3c722ca7a68778245044ae1599114ab503aef3c4157d6f226f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / lbox-2.0.0-py3-none-any.whl
| Download URL | lbox-2.0.0-py3-none-any.whl |
|---|---|
| Size | 53.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
39bcd4e3d056c17e04e51caf81e46d7a8fcbd3e80338eeca086acd7705082a71
|
|
BLAKE2b-256 checksum How to use checksums |
447fb27f313102c79f632c7ee56b1c6131c77a3f770347d173c208d8a0d6dab2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|