This file is indexed.

/usr/lib/surfraw/bookfinder is in surfraw 2.2.8-1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#!/bin/sh
# $Id$
# elvis: bookfinder 	-- Search for books using www.bookfinder.com
. surfraw || exit 1

w3_config_hook () {
    def   SURFRAW_bookfinder_binding     "any"
    defyn SURFRAW_bookfinder_classic     0
    def   SURFRAW_bookfinder_currency    "USD"
    def   SURFRAW_bookfinder_destination "us"
    defyn SURFRAW_bookfinder_first       0
    def   SURFRAW_bookfinder_language    "en"
    def   SURFRAW_bookfinder_search      "title"
    defyn SURFRAW_bookfinder_signed      0
    def   SURFRAW_bookfinder_type        "any"
}

w3_usage_hook () {
    cat <<EOF
Usage: $w3_argv0 [options] [search terms]...
Description:
  Surfraw: Search for books using www.bookfinder.com
Example:
Local Options:
  -author="..."                 Search for an author.
                                Complements -search=title
  -binding=                     Search for copies with a particular binding
           any          |       Any
           hard         |       Hardbacks only
           soft         |       Softcovers/paperbacks only
                                Default: $SURFRAW_bookfinder_binding
                                Environment: SURFRAW_bookfinder_binding
  -classic                      Use classic search display
                                Default: no
                                Environment: SURFRAW_bookfinder_classic
  -currency=                    Display prices in the given currency
                                (ISO currency code)
                                Default: $SURFRAW_bookfinder_currency
                                Environment: SURFRAW_bookfinder_destination
  -destination=                 Shipping destination
                                (Two-digit ISO country code)
                                Default: $SURFRAW_bookfinder_destination
                                Environment: SURFRAW_bookfinder_destination
  -first                        Search first editions
  -keywords="..."               Search for keywords
  -language=                    Search for books in...
            de          |       German
            en          |       English
            es          |       Spanish
            fr          |       French
            it          |       Italian
            nl          |       Dutch
                                Default: $SURFRAW_bookfinder_language
                                Environment: SURFRAW_bookfinder_language
  -maxprice=                    Set the maximum acceptable price
  -minprice=                    Set the minimum acceptable price
  -search=                      Search by...
          title
          author
          isbn
                                Default: $SURFRAW_bookfinder_search
                                Environment: SURFRAW_bookfinder_search
  -signed                       Search for signed copies
  -title="..."                  Search for a title.
                                Complements -search=author
  -type=                        Search books that are...
        any             |       Any
        new             |       New
        used            |       Used and/or out of print
                                Default: $SURFRAW_bookfinder_type
                                Environment: SURFRAW_bookfinder_type
EOF
    w3_global_usage
}

w3_parse_option_hook () {
    opt="$1"
    optarg="$2"
    case "$opt" in
    -author=*)
	setopt   SURFRAW_bookfinder_author      `w3_url_of_arg "$optarg"` ;;
    -binding=any)   setopt   SURFRAW_bookfinder_binding     '*'           ;;
    -binding=*)     setopt   SURFRAW_bookfinder_binding     "$optarg"     ;;
    -classic)       setoptyn SURFRAW_bookfinder_classic     1             ;;
    -currency=*)    setopt   SURFRAW_bookfinder_currency    "$optarg"     ;;
    -destination=*) setopt   SURFRAW_bookfinder_destination "$optarg"     ;;
    -first)         setoptyn SURFRAW_bookfinder_first       1             ;;
    -keywords=*)
	setopt   SURFRAW_bookfinder_keywords    `w3_url_of_arg "$optarg"` ;;
    -language=*)    setopt   SURFRAW_bookfinder_language    "$optarg"     ;;
    -maxprice=*)    setopt   SURFRAW_bookfinder_maxprice    "$optarg"     ;;
    -minprice=*)    setopt   SURFRAW_bookfinder_minprice    "$optarg"     ;;
    -search=*)      setopt   SURFRAW_bookfinder_search      "$optarg"     ;;
    -signed)        setoptyn SURFRAW_bookfinder_signed      1             ;;
    -title=*)
	setopt   SURFRAW_bookfinder_title       `w3_url_of_arg "$optarg"` ;;
    -type=any)      setopt   SURFRAW_bookfinder_type        '*'           ;;
    -type=*)        setopt   SURFRAW_bookfinder_type        "$optarg"     ;;
    *) return 1 ;;
    esac
    return 0
}

w3_config
w3_parse_args "$@"
# w3_args now contains a list of arguments

if test -z "$w3_args"; then
    url="http://www.bookfinder.com/"
else
    escaped_args=`w3_url_of_arg $w3_args`
    case "$SURFRAW_bookfinder_search" in
        author) setopt SURFRAW_bookfinder_author "$escaped_args" ;;
        isbn) setopt SURFRAW_bookfinder_isbn   "$escaped_args" ;;
        title)  setopt SURFRAW_bookfinder_title  "$escaped_args" ;;
        *) return 1 ;;
    esac
    url="http://www.bookfinder.com/search/?author=${SURFRAW_bookfinder_author}&title=${SURFRAW_bookfinder_title}&lang=${SURFRAW_bookfinder_language}&submit=Begin%20search&new_used=${SURFRAW_bookfinder_type}&destination=${SURFRAW_bookfinder_destination}&currency=${SURFRAW_bookfinder_currency}&binding=${SURFRAW_bookfinder_binding}&isbn=${SURFRAW_bookfinder_isbn}&keywords=${SURFRAW_bookfinder_keywords}&minprice=${SURFRAW_bookfinder_minprice}&maxprice=${SURFRAW_bookfinder_maxprice}&mode=advanced&st=sr&ac=qr"
    if [ "$SURFRAW_bookfinder_classic" = 1 ]; then
        url="${url}&classic=on"
    fi
    if [ "$SURFRAW_bookfinder_first" = 1 ]; then
        url="${url}&first=on"
    fi
    if [ "$SURFRAW_bookfinder_signed" = 1 ]; then
        url="${url}&signed=on"
    fi
fi
w3_browse_url "$url"

# End of file