[ckan-discuss] CKAN Curation Tool
William Waites
ww at eris.okfn.org
Mon Dec 6 18:12:07 GMT 2010
Hi all,
I did some work over the past couple of days to try to imagine how a
package curation tool might work. This means a tool that looks at
packages on CKAN, applies some rules, and produces some output. The
output might be instructions to add a tag to a package or it might be
to add a package to a group. This last is the main use case, really --
trying to answer the question of, given a package and some rules about
group membership, does it qualify?
I tried to approach this in a general way and what I arrived at was
actually quite easy to implement. On the other had it is a command
line too, and writing rules, whilst straightforward enough, requires
some knowledge of inference rules. Ideas on how to make it more "user
friendly" are more than welcome.
Here's a very brief summary of how it works. It first reads an RDF
description of a package and a set of rules. The set of rules can
include operators like, "try to get this web page" or even,
"add this tag to the package" or "add this package to a group". It
compiles the ruleset and then feeds the description through,
triggering these operations. Any inferred statements and relationships
are printed out and (optionally) any desired changes are saved back to
CKAN through the API.
A somewhat longer explanation, with worked examples can be found at,
http://packages.python.org/curate/overview.html
For this to be truly useful, a much larger library of built-in
predicates and good bunch of example rulesets would be necessary at
the very least.
Comments and suggestions most welcome -- indeed eagerly sought.
Cheers,
-w
--
William Waites
http://eris.okfn.org/ww/foaf#i
9C7E F636 52F6 1004 E40A E565 98E3 BBF3 8320 7664
More information about the ckan-discuss
mailing list