summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAssaf Gordon <assafgordon@gmail.com>2016-05-05 04:13:16 (GMT)
committerAssaf Gordon <assafgordon@gmail.com>2016-05-05 04:49:47 (GMT)
commit49825843436977c8afa1fc356fd36deb69d905c1 (patch)
treea5d6073f299926e850fb3d74fbf74b4e8c3fd0d6
parent14ae34d4cae1e496ad9871b40651aef29cc10217 (diff)
downloadcgi-tools-49825843436977c8afa1fc356fd36deb69d905c1.zip
cgi-tools-49825843436977c8afa1fc356fd36deb69d905c1.tar.gz
cgi-tools-49825843436977c8afa1fc356fd36deb69d905c1.tar.bz2
doc: update README/TODO files
-rw-r--r--README.md24
-rw-r--r--TODO.md28
2 files changed, 51 insertions, 1 deletions
diff --git a/README.md b/README.md
index c5c0187..a20264f 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,31 @@ CGI-TOOLS
Collection of functions for quick CGI script development.
+Copyright (C) 2016 Assaf Gordon (assafgordon@gmail.com)
+License: BSD
+https://github.com/agordon/cgi-tools
+Installation
+============
+
+From PyPi (latest released version):
+
+ sudo pip install cgi-tools
+
+From source code:
+
+ git clone https://github.com/agordon/cgi-tools.git
+ cd cgi-tools
+ python setup.py build
+ python setup.py test
+ sudo python setup.py install
+
+
+Examples
+========
+
+See `./demos/cgi-bin/*.py`,
+or run `./demos/demo-http-server.py` then visit http://127.0.0.1:8888.
diff --git a/TODO.md b/TODO.md
index dc0dd60..49496a6 100644
--- a/TODO.md
+++ b/TODO.md
@@ -5,4 +5,30 @@ TODO List
* Documentation
* Describe scripts
* Docstring exported functions (https://www.python.org/dev/peps/pep-0257/)
-* version 2: use pythonian idioms \ No newline at end of file
+* version 2: use pythonian idioms
+* add resource tests
+ * file size limits
+ * file descriptors limits
+ * memory limits
+* Document command-line usage:
+ * HTTP GET requests:
+
+ ```
+ curl 'http://localhost:8888/cgi-bin/get-params.py?name=foo&age=43'
+ curl 'http://localhost:8888/cgi-bin/get-params.py?name=foo&age=XXX'
+
+ curl 'http://localhost:8888/cgi-bin/gnu-date-delta.py?d=2+years'
+ ```
+
+ * HTTP POST requests:
+
+ ```
+ curl -F name=foo -F age=43 http://localhost:8888/cgi-bin/get-params.py
+ curl -F age=43 http://localhost:8888/cgi-bin/get-params.py
+ curl -F name=XXXX http://localhost:8888/cgi-bin/get-params.py
+
+ curl -F d="2 years - 3 days" http://localhost:8888/cgi-bin/gnu-date-delta.py
+ ```
+* Explain setting up a tiny container with Busybox's HTTPD + local-unix sockets.
+ * Mention `curl -H "Expect:"` for faster busybox POST requests.
+* Catch-all for exceptions, send back server-error