[Surfraw-commits] [SCM] surfraw - a fast unix command line interface to WWW branch, 2.2.9_release_candidate, updated. surfraw_2-2-5_1-278-ga8a550c

Ian Beckwith ianb at erislabs.net
Sat May 4 17:59:39 UTC 2013


The following commit has been merged in the 2.2.9_release_candidate branch:
commit a8a550c3bc383f06b4e84a21c9fc90f060c2a2f2
Author: Ian Beckwith <ianb at erislabs.net>
Date:   Sat May 4 18:59:36 2013 +0100

    jamendo: fix url, disable test

diff --git a/ChangeLog b/ChangeLog
index 30181f6..ee254cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2013-05-04  Ian Beckwith  <ianb at erislabs.net>
 
+	* bump version to 2.2.9
 	* rae: fixed, at least as far as the test passing.
 	  Could really do with some love from someone who
 	  actually speaks spanish.
@@ -7,6 +8,7 @@
 	  Note command-line options have changed.
 	* genportage: switch to gpo.zugaina.org
 	* debcodesearch: new (trivial) elvi for codesearch.debian.net
+	* jamendo: fix url, disable test (search now javascript)
 
 2013-04-28  Ian Beckwith  <ianb at erislabs.net>
 
diff --git a/elvi/jamendo b/elvi/jamendo
index f8b11cd..ebc9a67 100755
--- a/elvi/jamendo
+++ b/elvi/jamendo
@@ -1,27 +1,18 @@
 #!/bin/sh
-# $Id$
 # elvis: jamendo		-- Search Jamendo: free music with Creative Commons licenses (www.jamendo.com)
 . surfraw || exit 1
 
 
+w3_config_hook () {
+    def   SURFRAW_jamendo_lang "$SURFRAW_lang"
+}
+
 w3_usage_hook () {
     cat <<EOF
 Usage: $w3_argv0 [options] [search words]...
 Description:
   Surfraw search the web using Jamendo: free music with Creative Commons licenses (www.jamendo.com)
 Local options:
-  -t=     |  -type=		Type of search (Default All types)
-	artist 			Artists
-	album			Albums
-	xartist			External artists
-	lyrics			Lyrics
-	user			Members
-	tag			Tags
-	playlist		Playlists 
-	  
-	 
-                                Environment: SURFRAW_jamendo_results
-
   -l=     |  -lang=             Search with this l10n
         en|english
         fr|french
@@ -41,7 +32,6 @@ w3_parse_option_hook () {
     opt="$1"
     optarg="$2"
     case "$opt" in
-    -t=*|-type=*)     setopt   SURFRAW_jamendo_type	$optarg ;;
     -l=*|-lang=*)     setopt   SURFRAW_jamendo_lang	$optarg ;;
     *) return 1 ;;
     esac
@@ -52,17 +42,14 @@ w3_config
 w3_parse_args "$@"
 # w3_args now contains a list of arguments
 
-	
 # Use SURFRAW_lang if present
 if [ -z $SURFRAW_jamendo_lang ]; then
-    SURFRAW_jamendo_lang="$SURFRAW_lang";
+    SURFRAW_jamendo_lang="en";
 fi
 
 
 if test -z "$w3_args"; then
-
-
-    w3_browse_url "http://www.jamendo.com/${SURFRAW_jamendo_lang}/about"
+    w3_browse_url "http://www.jamendo.com/${SURFRAW_jamendo_lang}/search"
 else
     case "$SURFRAW_jamendo_lang" in
         en|english) setopt   SURFRAW_jamendo_lang en  ;;
@@ -75,17 +62,7 @@ else
         es|spanish) setopt   SURFRAW_jamendo_lang es  ;;
 	*)          setopt   SURFRAW_jamendo_lang en  ;;
     esac
-    case "$SURFRAW_jamendo_type" in
-	artist) ;;
-        album)  ;;
-        xartist) ;;
-        lyrics)  ;;
-        user)  ;;
-        tag)  ;;
-        playlist) ;;
-	*)          setopt   SURFRAW_jamendo_type ""  ;;
-    esac
     escaped_args=`w3_url_of_arg $w3_args`
-    w3_browse_url "http://www.jamendo.com/${SURFRAW_jamendo_lang}/search/${SURFRAW_jamendo_type}/search?search_string=${escaped_args}"
+    w3_browse_url "http://www.jamendo.com/${SURFRAW_jamendo_lang}/search?qs=q=${escaped_args}"
 
 fi
diff --git a/test/jamendo.test b/test/jamendo.test
index cd8704f..0698a36 100644
--- a/test/jamendo.test
+++ b/test/jamendo.test
@@ -1,2 +1 @@
-jamendo helios salah
-Meditative Synestetik
+SKIP javascript

-- 
surfraw -  a fast unix command line interface to WWW



More information about the Surfraw-commits mailing list