rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: NaitLee on February 14, 2021, 10:52:45 AM

Title: The Python Template Interpreter (PTI) Plan: suggestions?
Post by: NaitLee on February 14, 2021, 10:52:45 AM
I just think python is a good choice to make a cross-platform HFS template interpreter.
After struggling for days, now we can truly make such a thing out: core macro parser has been made, in a different way.

So this time I'm searching for some tips and suggestions, more is good :)

Also, here's it's repo (https://github.com/NaitLee/PHFS) and site (http://python-hfs.ga/) :D, it's named phfs because it also has a server!

Poll: Which priority should I choose? (https://www.poll-maker.com/poll3659977x7dEC4D14-110)
Title: Re: The Python Template Interpreter (PTI) Plan: suggestions?
Post by: NaitLee on February 14, 2021, 10:54:47 AM
May 13, 2021:
Now the basic part is done, see the table and image below :)
Now worksNow doesn't work
file listing, downloading, uploading, archiving, searching
accounts & login
some symbols and macros
special:strings for translation
file actions
multi-threading
seems slower, sadly
virtual file system
limits, ban, ......
Title: Re: The Python Template Interpreter (PTI) Plan: suggestions?
Post by: danny on February 14, 2021, 11:21:52 PM
I'm not versed in this programming, but do have suggestions about where to prevent macro: 
Prevent macro execution at drive root and  OS critical (c:/ & c:/windows* & c:/progra*) folders.
Prevent macro execution at same folder that contains HFS.exe, because takeover risk.
Prevent archive at webroot (./) because archive all is overload (archive can't work then).

P.S.
Also a question:  Can macros be run non-block/async? 
I ask because, if you run a macro loop in HFS then it is completely stuck until loop end (this condition serves 1 or zero users). 
Title: Re: The Python Template Interpreter (PTI) Plan: suggestions?
Post by: NaitLee on February 15, 2021, 11:02:46 AM
Also a question:  Can macros be run non-block/async? 
I ask because, if you run a macro loop in HFS then it is completely stuck until loop end (this condition serves 1 or zero users).

What in my mind is: we serve a web UI, thus everything is handled by http handler.
Multi-threading (https://pymotw.com/2/BaseHTTPServer/index.html#threading-and-forking) for both serving requests and macros are possible.
If python is yet not possible for such a server, we can try others... what we make is just an interpreter :)