Request for comments: port-tags
tobez at freebsd.org
Tue Nov 8 02:33:38 PST 2005
On Tue, Nov 08, 2005 at 11:51:00AM +0200, Panagiotis Astithas wrote:
> If you keep maintaining the web site, it would be a good idea to
> provide some sort of web-service protocol in order to be used from
> client applications. It could be something as simple as querying by
> adding the terms in the http path info and returning a document with a
> list of port names (newline-separated, comma-separated or whatever).
> Perhaps it will be easy to add this functionality to sysutils/bpm or
Yes, some sort of API would be useful.
I just added the following:
If you add a m=pl ("mode = portlist") parameter to the URL,
it will return a newline separated list of matching ports:
For performance reasons, I limit the number of returned ports to 200 by
instead of all 433 ports. This can be overridden like this:
The same goes for tag-less queries:
But if you feel really adventurous,
will return all 13598 ports. Please note that "n" parameter does not
specify how many ports to return, it specifies the upper limit only, so
if that is exceeded, "E(too many)" is returned.
I hope this is useful enough - and the good part is that we can always
extend it further if we have good ideas. :-)
An undefined problem has an infinite number of solutions.
-- Robert A. Humphrey
More information about the freebsd-ports