Menu

Tree [985553] master /
 History

HTTPS access


File Date Author Commit
 htdocs 2010-08-21 Eric Willisson Eric Willisson [569535] Added the Python distutils setup.py file which ...
 INSTALL 2010-08-21 Eric Willisson Eric Willisson [985553] Added INSTALL file
 LICENSE 2010-08-21 Eric Willisson Eric Willisson [54e040] Neatened and added a few things. Ready to packa...
 README 2010-08-21 Eric Willisson Eric Willisson [9632f5] This should be a fully featured, working version.
 VERSION 2010-08-21 Eric Willisson Eric Willisson [c0be7d] Added VERSION file
 backup.cgi 2010-08-21 Eric Willisson Eric Willisson [9280b4] Updated comments, removed files from previous i...
 backup.sh 2010-08-21 Eric Willisson Eric Willisson [eeef83] Added information
 cgi_error.py 2010-08-21 Eric Willisson Eric Willisson [65967e] Moved cgi-error.py to cgi_error.py for proper P...
 cms.css 2010-08-21 Eric Willisson Eric Willisson [bb3f49] Naming correctly
 create-password.sh 2010-08-21 Eric Willisson Eric Willisson [9280b4] Updated comments, removed files from previous i...
 delete-page.sh 2010-08-21 Eric Willisson Eric Willisson [54e040] Neatened and added a few things. Ready to packa...
 editor.cgi 2010-08-21 Eric Willisson Eric Willisson [f02495] Put CMS backend CGI in its own place
 encrypt.py 2010-08-21 Eric Willisson Eric Willisson [9280b4] Updated comments, removed files from previous i...
 export-packages.sh 2010-08-21 Eric Willisson Eric Willisson [985553] Added INSTALL file
 extract_tags.py 2010-08-21 Eric Willisson Eric Willisson [9280b4] Updated comments, removed files from previous i...
 file-editor.cgi 2010-08-21 Eric Willisson Eric Willisson [f02495] Put CMS backend CGI in its own place
 file-uploader.html 2010-08-21 Eric Willisson Eric Willisson [f02495] Put CMS backend CGI in its own place
 frame.html 2010-08-21 Eric Willisson Eric Willisson [9280b4] Updated comments, removed files from previous i...
 local_cgi.py 2010-08-21 Eric Willisson Eric Willisson [ab3442] This is the initial commit to have files up in ...
 merge.py 2010-08-21 Eric Willisson Eric Willisson [9280b4] Updated comments, removed files from previous i...
 password.py 2010-08-21 Eric Willisson Eric Willisson [e017c8] Had to properly read in password
 save-file.cgi 2010-08-21 Eric Willisson Eric Willisson [9280b4] Updated comments, removed files from previous i...
 save-uploaded-file.cgi 2010-08-21 Eric Willisson Eric Willisson [9280b4] Updated comments, removed files from previous i...
 setup.py 2010-08-21 Eric Willisson Eric Willisson [65967e] Moved cgi-error.py to cgi_error.py for proper P...
 style.css 2010-08-21 Eric Willisson Eric Willisson [ab3442] This is the initial commit to have files up in ...
 update-all.cgi 2010-08-21 Eric Willisson Eric Willisson [ab3442] This is the initial commit to have files up in ...
 update.cgi 2010-08-21 Eric Willisson Eric Willisson [9280b4] Updated comments, removed files from previous i...
 viewer.cgi 2010-08-21 Eric Willisson Eric Willisson [f02495] Put CMS backend CGI in its own place

Read Me

This is a collection of useful scripts and files.

To use, they should all be placed in a directory reachable by a web
server on the system, which allows Python CGI scripts with the
executable bit set and the extension .cgi

This is most easily achieved by moving the directory this package
expanded in to to the spot it should be accessed, say, /var/www or
/var/www/website (it will not interfere with any web site files in
directories above itself).

The minimum files necessary are:
bodies/
cgi_error.py
editor.cgi
extract_tags.py
file-editor.cgi
file-uploader.html
frame.html
local_cgi.py
merge.py
password.py
save-file.cgi
save-uploaed-file.cgi
style.css
update-all.cgi
update.cgi
viewer.cgi

The owner of the webserver process will need write access to this
directory and the bodies/ subdirectory.

The file frame.html defines the elements which should be the same on
every page. It must be a complete HTML file, with three
tokens. "INSERT TITLE HERE" must appear in between the <title> tags,
/* INSERT CSS HERE */ must appear in the <style> tags, and <!-- INSERT
HTML HERE --> must appear somewhere in the body. Other than that, it
is a completely normal page, and so can define its own CSS and
surrounding content, such as a banner and navigation links, and then
indicate where the unique page content will be filled in.

Editing the website should not be done through direct access of the
files. Instead, use a web browser to go to viewer.cgi in the root of
the website. From here, there are links to create a new page as
well as edit links for all pages created with this system. Either will
take you to an editor, which has the filename as it should be typed in
a URL, spaces for either the name of a background image which is
already loaded or a file to be uploaded, a block for the CSS, and the
body. The page body should be HTML which is assumed to be directly
inserted into frame.html, so it does not require any of the <html>,
<head>, or <body> type tags. Finally, there is a password prompt for
security next to the save button.

frame.html and the default CSS, style.css can also be edited from
special links in viewer.cgi . This should be done carefully, as they
impact the entire site and errors could break everything. They also
use a password for authentication.

If you absolutely must edit the files directly, the bodies are
stored in the bodies/ subdirectory, with the same name as they appear
in the main directory. After editing them, run the script
update-all.cgi, either as a python script or accessing it through a
web browser.

Files which do not need to conform to the standard web page as defined
in frame.html can just be loaded normally, and will be ignored by the
system.

To cause backups to be recorded, just visit backup.cgi in a web
browser or execute backup.sh . backup.cgi may need to be removed if
unauthorized users attempt to use it to cause a DoS attack on the
system.

To delete a page created in the editor, the delete-page.sh script will
take a list of pages and deletes both the visible page and the body
stored in the bodies/ directory. It is best to use this script to
remove a page rather than deleting the files by hand so that they
correctly disappear from both the publicly reachable files and the
list in viewer.cgi .

To change the password, run the create-password.sh script. Neither
this nor delete-page.sh are executable, to prevent unauthorized
execution of them as CGI scripts.

WARNING: Due to the nature of these scripts, if someone learns the
password to the website, they may be able to gain access to a shell!
Guard the password carefully!
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.