music.dcgi - gophercgis - Collection of gopher CGI/DCGI for geomyidae
 (HTM) hg clone https://bitbucket.org/iamleot/gophercgis
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       music.dcgi
       ---
            1 #!/bin/sh
            2 
            3 . ../common/config.sh
            4 
            5 ALBUM_CGI="${CGI_BASEDIR}/bandcamp/album.dcgi"
            6 
            7 artist="$2"
            8 url="https://${artist}.bandcamp.com" 
            9 
           10 
           11 echo "t"
           12 echo "tBandcamp"
           13 echo "t"
           14 
           15 curl -Lgs -- "${url}/music" |
           16 { xmllint --html --xpath 'string(//ol/@data-initial-values)' - 2>/dev/null ; } |
           17 jq -r '
           18 .[] |
           19         "[1|\((.title + " - " + .band_name) | gsub("\\|"; "\\|"))|" +
           20             "'"${ALBUM_CGI}?${url}"'\(.page_url | gsub("\\|"; "\\|"))|server|port]",
           21         "[h|URL|'"${url}"'\(.page_url | gsub("\\|"; "\\|"))|server|port]",
           22         ""
           23 '