Enhance README and stub POST method in Lines

Updated README to highlight PyFiche's lack of external dependencies, improving project clarity for potential users. Added a stub for the POST method in the Lines server signaling planned upload functionality with an informative 501 Not Implemented response to client requests. This sets the groundwork for future implementations of the file upload feature.
This commit is contained in:
Kumi 2024-01-21 21:42:29 +01:00
parent 9c485c7875
commit b23e97e3b8
Signed by: kumi
GPG key ID: ECBCC9082395383F
2 changed files with 12 additions and 6 deletions

View file

@ -2,19 +2,19 @@
PyFiche is a simple pastebin optimized for the command line, written in Python PyFiche is a simple pastebin optimized for the command line, written in Python
and heavily inspired by [fiche](https://github.com/solusipse/fiche/), or rather and heavily inspired by [fiche](https://github.com/solusipse/fiche/), or rather
a shameless translation. a shameless translation. It has no dependencies outside the Python standard
library.
It also comes with a re-implementation of Lines, the HTTP server that comes It also comes with a re-implementation of Lines, the HTTP server that comes
with Fiche, which this time allows you to upload files, and comes doesn't have with Fiche. Additionally, PyFiche also comes with a simple TCP server, Recup,
dependencies outside the standard library. Additionally, PyFiche also comes to download pastes through netcat without using HTTP(S), in the same way you
with a simple TCP server, Recup, to download pastes through netcat without upload them.
using HTTP(S), in the same way you upload them.
## Installation ## Installation
### Dependencies ### Dependencies
* Python 3 (tested with 3.11) - Python 3 (tested with 3.11)
### Local Installation ### Local Installation

View file

@ -48,6 +48,12 @@ body {{
server_version = "PyFiche Lines/dev" server_version = "PyFiche Lines/dev"
# TODO: Implement uploading
def do_POST(self):
self.send_response(501)
self.end_headers()
self.wfile.write(b"Not implemented")
def not_found(self): def not_found(self):
self.send_response(404) self.send_response(404)
self.end_headers() self.end_headers()