💫 Python3 implementation of rejetto HTTP File Server~
🏗 Under construction...
🎉 Please make this project grow. Any contributions are welcome!
👏 Features that works:
- Filelist, download
- Sorting files, Archiving
- Some macros,
special:alias
- Upload (No permission restriction)
- Translations,
special:strings
🕳 Features that doesn't work:
- Search
- Virtual File System
- File actions
- Accounts, Login, Ban, Limits, ...
👀 This project is working halfly now, but yet not for production use.
If you are interested in testing this project, please:
-
Install Werkzeug by either using
pip
or placing the folderWerkzeug-(version)/src/werkzeug
from downloaded archive to cloned repo. -
Pick a HFS template (for HFS 2.4), rename it to
hfs.tpl
and place into cloned repo. -
Configure port and base folder in
hfs.ini
. -
For running a server, open
_run_simple.py
; for developing, open_test.py
; for using as a CGI server with Apache etc., usecgi.cgi
, and consult Internet for how-to.
Template choices:
-
_test.py
: Run a server for testing, debugging. It also contains werkzeug's reload feature. -
_run_simple.py
: Run a simple server. Have no debug feature, but works on pypy on aarch64 architecture. -
hfs.ini
: Some configs, like port, are here. Currently you can set a base path as the root dir of served pages. -
_test_macro.py
: Run & test a macro, by entering as argv1 in commandline. -
cgi.cgi
: For being used as a CGI application with Apache, Nginx etc. -
cfgLib.py
: TheConfig
object is inside this file. -
classesLib.py
: Some usefulclass
es are here. -
helpersLib.py
: Some useful functions are here. -
mimeLib.py
: Manages MIME types. Get a defined MIME type with something likemimeLib.getmime('*.html')
. You can define your own MIMEs inmime.ini
. -
scriptLib.py
: When executing a macro/symbol, usually functions in this file will be called. -
serverLib.py
: Defines a WSGI application, which acts like original HFS. -
tplLib.py
: The template is interpretered by this.