Hi,
I finally ended up doing things as you sugested guys sugested. It is simply the Right Way :-)
Find attached a prototype bit of code that does the taxonomy. It is crude, but works. In the file "library.lisp" you will find the packages defined using a "def-project" form, as in
(def-project :label "pg" :name "Pg" :category "Database" :description "A Common Lisp interface to the PostgreSQL database")
After loading the thing with
(asdf:operate 'asdf:load-op 'taxonomy)
one generates a html of the taxonomy with
(taxonomy:generate-html-taxonomy "filename.html").
It could (and will) be nicer.
If we let people write this kind of form themselves, and put them in their project directory (which is desirable. We could do a lot with this, like automagically generating acceptable temporary project pages) we should be careful to make sure that we don't open a security hole the size of the panama channel.
Ideas?
Perhaps we should ask people to send these forms to us, so that we can eyeball them.
Regards, Mario.
On Sat, 13 Mar 2004, Mario Mommer wrote:
(def-project :label "pg" :name "Pg" :category "Database" :description "A Common Lisp interface to the PostgreSQL database")
their project directory (which is desirable. We could do a lot with this, like automagically generating acceptable temporary project pages) we should be careful to make sure that we don't open a security hole the size of the panama channel.
Why not have the data in file with just alists, and read it into a scratch package with some readtable hackery to 1) guard against #. 2) preserve package hygiene. (See main.lisp in linedit sources for one example of how to do this.) Then just:
(apply #'make-project :label label (apply #'append alist))?
Then the profile.sexp (or whatever) would look like:
;;;; Use this file to alter how your project appears on the ;;;; common-lisp.net website. ;;;; ;;;; The contents should be a single alist, with elements of the form ;;;; ;;;; (<keyword> <value>) ;;;; ;;;; The values will appear on the pages are processed by PRINC. ;;;; Unknown keywords are ignored, so feel free to use them. ;;;; Known keywords are: ;;;; ;;;; :name, :category, :description, :license ;;;; ;;;; The reading of this is done with some readtable hackery: ;;;; ;;;; #.foo => foo ;;;; foo:bar => foo :bar ;;;; foo::bar => foo :bar ;;;;
((:name "Pg") (:category "Database") (:description "A Common Lisp interface to the PostgreSQL database"))
As you see I omitted the label form the stuff user-definable things: we know that when we read the file anyways.
Cheers,
-- Nikodemus
Nikodemus Siivola tsiivola@cc.hut.fi writes:
On Sat, 13 Mar 2004, Mario Mommer wrote:
(def-project :label "pg" :name "Pg" :category "Database" :description "A Common Lisp interface to the PostgreSQL database")
their project directory (which is desirable. We could do a lot with this, like automagically generating acceptable temporary project pages) we should be careful to make sure that we don't open a security hole the size of the panama channel.
Why not have the data in file with just alists,
Good point. But perhaps it looks better this way. In any case, def-project makes an alist. :)
and read it into a scratch package with some readtable hackery to 1) guard against #. 2) preserve package hygiene. (See main.lisp in linedit sources for one example of how to do this.)
Ok.
Then just:
(apply #'make-project :label label (apply #'append alist))?
Then the profile.sexp (or whatever) would look like:
;;;; Use this file to alter how your project appears on the ;;;; common-lisp.net website. ;;;; ;;;; The contents should be a single alist, with elements of the form ;;;; ;;;; (<keyword> <value>) ;;;; ;;;; The values will appear on the pages are processed by PRINC. ;;;; Unknown keywords are ignored, so feel free to use them. ;;;; Known keywords are: ;;;; ;;;; :name, :category, :description, :license ;;;; ;;;; The reading of this is done with some readtable hackery: ;;;; ;;;; #.foo => foo ;;;; foo:bar => foo :bar ;;;; foo::bar => foo :bar ;;;;
((:name "Pg") (:category "Database") (:description "A Common Lisp interface to the PostgreSQL database"))
As you see I omitted the label form the stuff user-definable things: we know that when we read the file anyways.
Good point.
Regards, Mario.
On Mar 13, 2004, at 6:24 AM, Mario Mommer wrote:
Ideas?
This looks great. We could schedule it via cron to generate the projects.shtml every hour or so. Then people would just have to update their alist. Could we perhaps have them use /project/<project>/conf.alist or somesuch? And then just read /project/*/conf.alist and use that to generate the HTML?
Perhaps we should ask people to send these forms to us, so that we can eyeball them.
Let's do what Nikodemus suggests. That in addition to running on their trust will be fine to begin with. If someone is a bad apple and messes things up we will have to deal with it then.
Erik.
Erik Enge erik@nittin.net writes:
Let's do what Nikodemus suggests. That in addition to running on their trust will be fine to begin with. If someone is a bad apple and messes things up we will have to deal with it then.
To be honest, I would prefer not to depend on good will, because good will is also often a matter of skill. If one can mess things up intentionally, one can do it by accident too :)
For now I'll generate the classification with what I have, and then we'll move on to the automated system, going first through the safe read.
Regards, Mario.
My defdoc.contrib.project-website document class is what I'm using to generate websites for my projects. Once the format of these files has been worked out, I can create a separate output-format for the project-website document class so that these files will be auto-generated from the website document.
Has anything been agreed upon as the way you'd like to see these files formatted?