add maintainer_wanted for Guylhem.

This commit is contained in:
david 2002-07-04 19:41:41 +00:00
parent 43f6efc935
commit 532391bce1
6 changed files with 88 additions and 103 deletions

View File

@ -1,3 +1,5 @@
NOTE: Installation is being reworked, but this is how it works now:
Installation from the tarball or .tar.gz, or from CVS, uses standard
Makefiles. run `make` to build the few things that need to be built,
primarily the documentation. Then run `make install` as root to install

View File

@ -5,53 +5,7 @@ Lampadas is a young project, although it is based on the LDP Database,
which has been in actual use for over a year. It is not yet recommended
for production use.
See INSTALL for requirements.
System Variables
----------------
System variables are stored in the 'config' table as name/value pairs.
Variable names are case-sensitive.
version
The program version. This isn't really the version of the code,
but the version of the database tables. However, the code and database
versions must be in sync or the system will fail, perhaps horribly.
smtp_server
This is the full domain name of your mail server, which is used when
sending mail to users. Relaying must be allowed by the user under whom
the web server is running, or mail will fail.
If mail fails, users will not be able to register!
copyright
This holds the copyright statement for the site. You may add to it as
appropriate, but remember that much of the content is generated by
Lampadas, and is Copyrighted by David C. Merrill.
Please do not remove my copyright statement, but amend it as
appropriate for your installation.
local_email
Place the email address here that you want to appear in the From header
on all mail sent by Lampadas.
cookie_domain
This is the domain name used when setting cookies. Note that to prevent
cookies from being set in TLDs (e.g., .edu or .com), this value
must contain two periods, as specified in RFC 2109. So, for example,
for lampadas.org the cookie should be set to '.lampadas.org'.
hostname
The hostname of the server. Used when doing redirects.
root_dir
The root directory where Lampadas is available on your web server.
It must end with a /.
cvs_root
The root directory of the CVS tree. Filenames must be below this dir.
It must end with a /.
See INSTALL for requirements, and the Lampadas Developer's Guide for
information about the system. The Guide and other documentation is in
the /doc directory.

View File

@ -3,13 +3,20 @@
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
PENDING:
Write a Makefile to install Lampadas onto a fresh system. Also let `make test`
run the unit tests, and `make clean` remove any installation. `make tar` and
other build targets would be nice, too.
-- wrote Makefiles, but no test target yet
TODO:
Guylhem wants to be able to flag a document, "maintainers needed", even if it
is maintained but the maintainer needs or wants help. (David)
Display the number of times the document has been read. Think of and add other
metrics of this nature. This should be an optional feature, since it will add
overhead and some admins might not want that overhead. (David)
We need a cron job that runs nightly and stores statistics into the stats and
stats_cdf tables. This should be a Python module (Stats.py), which deletes
and then replaces any existing records for the current day. The cron job would
@ -19,11 +26,6 @@ and just port it. Feel free to recommend additional metrics that would be
valuable to the management of the site. Also add user count, which didn't
apply to the LDPDB but does apply to Lampadas. And docs served, pages served.
Write a Makefile to install Lampadas onto a fresh system. Also let `make test`
run the unit tests, and `make clean` remove any installation. `make tar` and
other build targets would be nice, too.
-- wrote Makefiles, but no test target yet
Add date_entered timestamps to additional records where it is appropriate.
Maybe even to all of them. It's nice meta-data to have. And add creator_id
also, to record the user who created the record. Then it will have to
@ -38,11 +40,6 @@ a role which comes with a set of permissions. This will allow more fine-
grained control over permissions, so admins can customize them to fit their
particular organizational needs.
Flatten the topic/subtopic structures into a single table with topic_id as
the record identifier, plus topic_num and subtopic_num for display only.
This will let people reorder and renumber topics without having to alter any
referring records in document_topic.
Make sure that email addresses are spam-protected everywhere they display on
the website!
@ -74,20 +71,30 @@ API implemented in a URL scheme for them to code against. This is pretty
high priority because it will give us a huge amount of visibility and help
build the project.
Write manpage.
-- done, for lampadasdb and lampadasweb
Need mod_perl front end.
Speed up initial loading; it's annoying and overhead for short running scripts.
Loading all tables in single SELECT statements would help a lot,
but would require top level objects to do the loading.
Need combobox for selecting seriesid for a document.
Need to devise set of error messages and add them to Lintadas.
Add support for the W3C core CSS styles, if possible.
Block table should not include language support -- use only for HTML blocks
with embedded tokens.
DONE:
Flatten the topic/subtopic structures into a single table with topic_id as
the record identifier, plus topic_num and subtopic_num for display only.
This will let people reorder and renumber topics without having to alter any
referring records in document_topic.
-- didn't flatten, but linked document to subtopic directly, and
made renumbering easy.
Write manpage.
-- done.
Need combobox for selecting seriesid for a document.
-- done.

View File

@ -165,7 +165,7 @@ class Doc:
self.Load(id)
def Load(self, id):
sql = "SELECT doc_id, title, type_code, format_code, dtd, dtd_version, version, last_update, url, isbn, pub_status, review_status, tickle_date, pub_date, ref_url, tech_review_status, maintained, license_code, abstract, rating, lang, sk_seriesid FROM document WHERE doc_id=" + str(id)
sql = "SELECT doc_id, title, type_code, format_code, dtd, dtd_version, version, last_update, url, isbn, pub_status, review_status, tickle_date, pub_date, ref_url, tech_review_status, maintained, maintainer_wanted, license_code, abstract, rating, lang, sk_seriesid FROM document WHERE doc_id=" + str(id)
cursor = db.select(sql)
row = cursor.fetchone()
self.LoadRow(row)
@ -188,11 +188,12 @@ class Doc:
self.HomeURL = trim(row[14])
self.TechReviewStatusCode = trim(row[15])
self.Maintained = tf2bool(row[16])
self.license_code = trim(row[17])
self.Abstract = trim(row[18])
self.Rating = safeint(row[19])
self.Lang = trim(row[20])
self.SeriesID = trim(row[21])
self.maintainer_wanted = tf2bool(row[17])
self.license_code = trim(row[18])
self.Abstract = trim(row[19])
self.Rating = safeint(row[20])
self.Lang = trim(row[21])
self.sk_seriesid = trim(row[22])
self.Errs = DocErrs(self.ID)
self.Files = DocFiles(self.ID)
self.Ratings = DocRatings(self.ID)
@ -200,7 +201,7 @@ class Doc:
self.Versions = DocVersions(self.ID)
def Save(self):
sql = "UPDATE document SET title=" + wsq(self.Title) + ", type_code=" + wsq(self.type_code) + ", format_code=" + wsq(self.format_code) + ", dtd=" + wsq(self.DTD) + ", dtd_version=" + wsq(self.DTDVersion) + ", version=" + wsq(self.Version) + ", last_update=" + wsq(self.LastUpdate) + ", url=" + wsq(self.URL) + ", isbn=" + wsq(self.ISBN) + ", pub_status=" + wsq(self.PubStatusCode) + ", review_status=" + wsq(self.ReviewStatusCode) + ", tickle_date=" + wsq(self.TickleDate) + ", pub_date=" + wsq(self.PubDate) + ", ref_url=" + wsq(self.HomeURL) + ", tech_review_status=" + wsq(self.TechReviewStatusCode) + ", maintained=" + wsq(bool2tf(self.Maintained)) + ", license_code=" + wsq(self.license_code) + ", abstract=" + wsq(self.Abstract) + ", rating=" + dbint(self.Rating) + ", lang=" + wsq(self.Lang) + ", sk_seriesid=" + wsq(self.SeriesID) + " WHERE doc_id=" + str(self.ID)
sql = "UPDATE document SET title=" + wsq(self.Title) + ", type_code=" + wsq(self.type_code) + ", format_code=" + wsq(self.format_code) + ", dtd=" + wsq(self.DTD) + ", dtd_version=" + wsq(self.DTDVersion) + ", version=" + wsq(self.Version) + ", last_update=" + wsq(self.LastUpdate) + ", url=" + wsq(self.URL) + ", isbn=" + wsq(self.ISBN) + ", pub_status=" + wsq(self.PubStatusCode) + ", review_status=" + wsq(self.ReviewStatusCode) + ", tickle_date=" + wsq(self.TickleDate) + ", pub_date=" + wsq(self.PubDate) + ", ref_url=" + wsq(self.HomeURL) + ", tech_review_status=" + wsq(self.TechReviewStatusCode) + ", maintained=" + wsq(bool2tf(self.Maintained)) + ', maintainer_wanted=' + wsq(bool2tf(self.maintainer_wanted)) + ", license_code=" + wsq(self.license_code) + ", abstract=" + wsq(self.Abstract) + ", rating=" + dbint(self.Rating) + ", lang=" + wsq(self.Lang) + ", sk_seriesid=" + wsq(self.SeriesID) + " WHERE doc_id=" + str(self.ID)
db.runsql(sql)
db.commit()

View File

@ -101,6 +101,22 @@ class ComboFactory:
combo = combo + "</select>"
return combo
def sk_seriesid(self, value, lang):
combo = "<select name='sk_seriesid'>\n"
keys = lampadas.Docs.sort_by_lang('Title', lang)
for key in keys:
doc = lampadas.Docs[key]
assert not doc==None
if doc.Lang==lang or lang==None:
combo = combo + "<option "
if doc.sk_seriesid==value:
combo = combo + "selected "
combo = combo + "value='" + str(doc.sk_seriesid) + "'>"
combo = combo + doc.Title
combo = combo + "</option>\n"
combo = combo + "</select>"
return combo
def dtd(self, value, lang):
combo = "<select name='dtd'>\n"
keys = lampadas.DTDs.sort_by_lang('DTD', lang)
@ -147,7 +163,7 @@ class ComboFactory:
return combo
def license(self, value, lang):
combo = "<select name='license'>\n"
combo = "<select name='license_code'>\n"
keys = lampadas.licenses.sort_by('sort_order')
for key in keys:
license = lampadas.licenses[key]
@ -243,25 +259,25 @@ class TableFactory:
return str(value) + '/' + str(max)
def doc(self, uri):
box = '<table class="box"><tr><th colspan="6">|strdocdetails|</th></tr>'
if uri.id:
doc = lampadas.Docs[uri.id]
box = box + '<form method=GET action="data/save/document" name="document">'
box = '<form method=GET action="data/save/document" name="document">'
else:
doc = Doc()
box = box + '<form method=GET action="data/save/newdocument" name="document">'
box = '<form method=GET action="data/save/newdocument" name="document">'
box = box + '<input name="doc_id" type=hidden value=' + str(doc.ID) + '>\n'
box = box + '<table class="box"><tr><th colspan="6">|strdocdetails|</th></tr>'
box = box + '<tr>\n'
box = box + '<th class="label">strtitle</th><td colspan=5><input type=text name=title size=60 style="width:100%" value="' + doc.Title + '"></td>\n'
box = box + '<th class="label">|strtitle|</th><td colspan=5><input type=text name="title" size=60 style="width:100%" value="' + doc.Title + '"></td>\n'
box = box + '</tr>\n'
box = box + '<tr>\n'
box = box + '<th class="label">'
if doc.URL:
box = box + '<a href="' + doc.URL + '">url</a>'
box = box + '<a href="' + doc.URL + '">|strurl|</a>'
else:
box = box + 'strurl'
box = box + '</th><td colspan=5><input type=text name=url size=60 style="width:100%" value="' + doc.URL + '"></td>'
box = box + '|strurl|'
box = box + '</th><td colspan=5><input type=text name="url" size=60 style="width:100%" value="' + doc.URL + '"></td>'
box = box + '</tr>\n<tr>\n'
box = box + '<th class="label">'
@ -269,7 +285,7 @@ class TableFactory:
box = box + '<a href="' + doc.HomeURL + '">|strhome_url|</a>'
else:
box = box + '|strhome_url|'
box = box + '</th><td colspan=5><input type=text name=ref_url size=60 style="width:100%" value="' + doc.HomeURL + '"></td>'
box = box + '</th><td colspan=5><input type=text name="ref_url" size=60 style="width:100%" value="' + doc.HomeURL + '"></td>'
box = box + '</tr>\n<tr>\n'
box = box + '<th class="label">|strstatus|</th><td>'
box = box + combo_factory.pub_status(doc.PubStatusCode, uri.lang)
@ -294,12 +310,12 @@ class TableFactory:
box = box + combo_factory.license(doc.license_code, uri.lang)
box = box + '</td>'
box = box + '</tr>\n<tr>\n'
box = box + '<th class="label">|strpub_date|</th><td><input type=text name=pub_date size=10 value="' + doc.PubDate + '"></td>'
box = box + '<th class="label">|strupdated|</th><td><input type=text name=last_update size=10 value="' + doc.LastUpdate + '"></td>'
box = box + '<th class="label">|strversion|</th><td><input type=text name=version size=10 value="' + doc.Version + '"></td>'
box = box + '<th class="label">|strpub_date|</th><td><input type=text name="pub_date" size=10 value="' + doc.PubDate + '"></td>'
box = box + '<th class="label">|strupdated|</th><td><input type=text name="last_update" size=10 value="' + doc.LastUpdate + '"></td>'
box = box + '<th class="label">|strversion|</th><td><input type=text name="version" size=10 value="' + doc.Version + '"></td>'
box = box + '</tr>\n<tr>\n'
box = box + '<th class="label">|strtickle_date|</th><td><input type=text name=tickle_date size=10 value="' + doc.TickleDate + '"></td>'
box = box + '<th class="label">|strisbn|</th><td><input type=text name=isbn size=14 value="' + doc.ISBN + '"></td>'
box = box + '<th class="label">|strtickle_date|</th><td><input type=text name="tickle_date" size=10 value="' + doc.TickleDate + '"></td>'
box = box + '<th class="label">|strisbn|</th><td><input type=text name="isbn" size=14 value="' + doc.ISBN + '"></td>'
box = box + '<th class="label">|strrating|</th>\n'
box = box + '<td>'
box = box + self.bar_graph(doc.Rating, 10, uri.lang)
@ -315,12 +331,15 @@ class TableFactory:
box = box + combo_factory.language(doc.Lang, uri.lang)
box = box + '</td>'
box = box + '</tr>\n<tr>\n'
box = box + '<th class="label">|strmaintainer_wanted|</th><td>' + combo_factory.tf('maintainer_wanted', doc.maintainer_wanted, uri.lang) + '</td>\n'
box = box + '<td></td><td></td>'
box = box + '</tr>\n<tr>\n'
box = box + '<th class="label">|strabstract|</th>'
box = box + '<td colspan=5><textarea name=abstract rows=6 cols=40 style="width:100%" wrap>' + doc.Abstract + '</textarea></td>\n'
box = box + '<td colspan=5><textarea name="abstract" rows=6 cols=40 style="width:100%" wrap>' + doc.Abstract + '</textarea></td>\n'
box = box + '</tr>\n'
box = box + '<tr><td></td><td><input type=submit name=save value="|strsave|"></td></tr>\n'
box = box + '</form>\n'
box = box + '<tr><td></td><td><input type=submit name="save" value="|strsave|"></td></tr>\n'
box = box + '</table>\n'
box = box + '</form>\n'
return box

View File

@ -28,25 +28,27 @@ import smtplib
import string
import whrandom
def document(req, doc_id, title, url, ref_url, pub_status_code, class_id,
review_status_code, tech_review_status_code, license, pub_date,
last_update, version, tickle_date, isbn, lang, abstract):
def document(req, doc_id, title, url, ref_url, pub_status_code, type_code,
review_status_code, tech_review_status_code, maintainer_wanted,
license_code, pub_date, last_update, version, tickle_date, isbn,
lang, abstract):
if not doc_id:
return error("A required parameter is missing. Please go back and correct the error.")
doc = lampadas.Docs[int(doc_id)]
if doc == None:
if doc==None:
return error("Cannot find document " + str(doc_id))
doc.Title = title
doc.URL = url
doc.HomeURL = ref_url
doc.PubStatusCode = pub_status_code
doc.ClassID = int(class_id)
doc.type_code = type_code
doc.ReviewStatusCode = review_status_code
doc.TechReviewStatusCode = tech_review_status_code
doc.License = license
doc.maintainer_wanted = maintainer_wanted
doc.license_code = license_code
doc.PubDate = pub_date
doc.LastUpdate = last_update
doc.Version = version
@ -61,7 +63,7 @@ def document(req, doc_id, title, url, ref_url, pub_status_code, class_id,
def user(req, username, first_name, middle_name, surname, email, stylesheet, password, admin, sysadmin, notes):
user = lampadas.users[username]
if not user == None:
if not user==None:
user.first_name = first_name
user.middle_name = middle_name
user.surname = surname
@ -79,7 +81,7 @@ def user(req, username, first_name, middle_name, surname, email, stylesheet, pas
def newuser(req, username, email, first_name, middle_name, surname):
if username == '':
if username=='':
return page_factory.page('username_required')
user = lampadas.users[username]