2
# elvis: openports -- search openports for OpenBSD packages
3
# coder@kyleisom.net 20110105
7
def SURFRAW_openports_search "http://openports.se/search.php?"
8
def SURFRAW_openports_stype ""
13
Usage: $w3_argv0 [options] [search words]...
15
Search openports for OpenBSD packages / ports. Only one search is active
16
at a time. Feel free to n00b it up and use more than one flag. Go ahead,
19
-m,-maintainer search by maintainer
20
-c,-comment search by comment
21
-b,-builddeps search by build dependencies
22
-r,-rundeps search by run dependencies
23
-s,-mastersite search by master site
24
-d,-description search by description
25
-l,-commitlogs search by commit logs
30
w3_parse_option_hook () {
34
-m|-mai*) setopt SURFRAW_openports_stype "maintainer" ;;
35
-c|-comme*) setopt SURFRAW_openports_stype "comment" ;;
36
-b|-bu*) setopt SURFRAW_openports_stype "dependbuild" ;;
37
-r|-ru*) setopt SURFRAW_openports_stype "dependrun" ;;
38
-s|-mas*) setopt SURFRAW_openports_stype "MASTER_SITES" ;;
39
-d|-de*) setopt SURFRAW_openports_stype "description" ;;
40
-l|-commi*) setopt SURFRAW_openports_stype "commitlog" ;;
48
# w3_args now contains a list of arguments
50
escaped_args=`w3_url_of_arg $w3_args`
52
if test -z $SURFRAW_openports_stype ; then
53
url="${SURFRAW_openports_search}so=${escaped_args}"
55
url="${SURFRAW_openports_search}stype=${SURFRAW_openports_stype}&so=${escaped_args}"