summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* system.py: report error message in 'check_run_cmd_list()'HEADmasterAssaf Gordon2016-06-211-2/+2
|
* system.py: new function 'save_file()'Assaf Gordon2016-06-212-1/+10
|
* params.py: new method 'get_options_param()'Assaf Gordon2016-06-212-1/+13
|
* params.py: allow missing params with 'get_first_non_empty_param'Assaf Gordon2016-06-211-2/+6
|
* doc: add HACKING.mdAssaf Gordon2016-05-121-0/+69
|
* build: automatically detect version string from git0.0.2Assaf Gordon2016-05-125-1/+171
| | | | | | | | | * detect_version.py: module to detect version from git, or fallback to 'cgi_tools/version.py' (if compiled from a tarball). * setup.py: use new module to detect version. * cgi_tools/__init__.py: import version string. * .gitignore: ignore auto-generated version.py file. * MANIFEST.in: include 'detect_version.py' in source distributions tarballs.
* tests: add framework for CGI script simulationAssaf Gordon2016-05-125-0/+298
| | | | | | | | | Run external scripts as if a CGI script under a web-server (by simulating environment variables). Python's internal CGIHTTPServer package is not suitible for testing: It always returns HTTP-200 regardless of the status code returned from the CGI script.
* maint: refactor type-related functions to separate moduleAssaf Gordon2016-05-125-57/+67
| | | | | | | * cgi_tools/system.py: move is_string,is_iterable,to_str_list to ... * cgi_tools/types.py: here. * cgi_tools/validators.py: import types module * tests/test_types.py: rename from 'test_system_internals.py'
* new validator: valid_in_list(v,list)Assaf Gordon2016-05-123-2/+26
| | | | | | | | returns TRUE if v is in list (after conversion to string). * cgi_tools/validators.py: new function * cgi_tools/__init__.py: import function * tests/test_validators.py: add tests
* system: improve string/list internal conversionsAssaf Gordon2016-05-073-14/+101
| | | | | | | | | | | | Add new 'to_str_list()' function to convert anything into a string list, prepare is_string() for python3. * cgi_tools/system.py: is_string(): prepare for python3. is_iterable(): new function. to_str_list(): new function. * cgi_tools/params.py: use 'to_str_list'. * cgi_tools/test_system_internals.py: test new functions.
* maint: gitignore emacs temp filesAssaf Gordon2016-05-071-0/+1
|
* cgi_tools.params: new function get_cgi_first_non_empty_paramAssaf Gordon2016-05-074-2/+115
| | | | | | | | | | Useful for <FORM>s with multiple upload methods (eg. paste text or upload file). * cgi_tools/params.py: add new function. * cgi_tools/__init__.py: import new function. * demos/cgi-bin/wordcount.py: demo CGI scripts for new function. * demos/index.html: new <FORM>, call new demo CGI script.
* doc: more TODOsAssaf Gordon2016-05-051-0/+6
|
* maint: update setup files for PyPi upload0.0.1Assaf Gordon2016-05-054-3/+7
|
* http_responses: add 'app code' in error messagesAssaf Gordon2016-05-055-8/+22
| | | | | | | | | | | | | Allow CGI scripts to set custom numeric application-code which will appear before the random request code, example: set_app_code(555) then, when an error occurs: request 555.0123456789: something went wrong The 555 identifies the application (i.e. the CGI script), the other digits are random number which will be shown to the user when an error occurs, but also written to the log (possibly with more detailed error information).
* maint: add license/copyright header to all sourcecode filesAssaf Gordon2016-05-0520-15/+122
|
* doc: update README/TODO filesAssaf Gordon2016-05-052-1/+51
|
* Import demo filesAssaf Gordon2016-05-059-0/+383
|
* Import tests source code filesAssaf Gordon2016-05-058-0/+261
|
* add setup.pyAssaf Gordon2016-05-051-0/+30
|
* Import cgi_tools package source code filesAssaf Gordon2016-05-056-1/+258
|
* Initial stub commitAssaf Gordon2016-05-043-0/+20