[Surfraw-devel] The elvi list isn't a config file, and shouldn't be treated as such.

James Rowe jnrowe at ukfsn.org
Sat Apr 29 06:44:28 UTC 2006


* James Rowe (jnrowe at ukfsn.org) wrote:
>   I suppose some argument could be made for creating a new target category,
> if you're installing elvi in to /usr/lib so the list file is installed in to
> /usr/share.  I'll rework it if there is some consensus this way, but
> honestly I don't believe elvi should be in /usr/lib in the first place
> and it would add needless complexity.

  Or of course it could be just be generated when it is needed, I don't
really think the time to create is much of an issue.  Even on my low powered
ARM box it only takes 0.6 seconds to display, and on my Desktop there is not
really any difference between this and just cat'ing the file.

Thanks for your time


Jay

--------------------------------%<--------------------------------

Generate the elvi list when it is required, instead of storing it.

  Generate the elvi list when it is displayed, this opens the door for
fully supporting per user elvis.


Index: surfraw/elvi/Makefile.am
===================================================================
--- surfraw/elvi/Makefile.am	{cset 736135e3-4378-4422-8c60-e2df424e7d45}
+++ surfraw/elvi/Makefile.am	{local clone}
@@ -71,13 +71,3 @@ elvi_SCRIPTS	= \
 		  xxx \
 		  yahoo \
           yubnub
-
-sysconf_DATA	= surfraw_elvi.list
-
-EXTRA_DIST	= $(elvi_SCRIPTS)
-
-CLEANFILES = surfraw_elvi.list
-
-surfraw_elvi.list: $(elvi_SCRIPTS)
-	cat $(elvi_SCRIPTS:%=$(srcdir)/%)|egrep '^#.*elvis:'|sed 's/^.*elvis: *//'|sort > $@
-
Index: surfraw/HACKING
===================================================================
--- surfraw/HACKING	{cset 790be22f-e8ba-4028-b505-3b1db5320736}
+++ surfraw/HACKING	{local clone}
@@ -138,7 +138,7 @@ Or... How to Eat The CHEESE
     6: rebuild the package (eg fakeroot debian/rules binary)
        (this recreates elvi/surfraw.list)
 
-    7: update the elvi list in README from elvi/surfraw_elvi.list
+    7: update the elvi list in README
 
     8: add an entry to the changelog.
 
Index: surfraw/surfraw.1.IN
===================================================================
--- surfraw/surfraw.1.IN	{cset 2018d881-4fa4-43f7-a746-14ff1265b98a}
+++ surfraw/surfraw.1.IN	{local clone}
@@ -303,15 +303,6 @@ Default:
 
  defyn SURFRAW_escape_url_args yes
 
-.TP
-.B SURFRAW_elvi_list
-File containing list of elvi
-
-Default:
-
- def SURFRAW_elvi_list @sysconfdir@/surfraw_elvi.list
-
-
 .SH FILES
 
 .TP
@@ -335,10 +326,6 @@ System wide bookmarks file.
 .B $HOME/.surfraw.bookmarks
 Per-user bookmarks file.
 
-.TP
-.B @sysconfdir@/surfraw_elvi.list
-List of all elvi.
-
 .SH BUGS
 
 Please report any bugs found (or any web sites in need of surfrawizing)
Index: surfraw/surfraw.conf.IN
===================================================================
--- surfraw/surfraw.conf.IN	{cset b9aeec63-e869-428e-982d-e866c465d606}
+++ surfraw/surfraw.conf.IN	{local clone}
@@ -81,6 +81,3 @@ def   SURFRAW_results		30
 # escape [% "@$%&+,/:;<=>?@@[\^{|}~'] characters in command line arguments
 # subsequently used to construct a url
 defyn SURFRAW_escape_url_args	yes
-
-# file containing list of elvi
-def   SURFRAW_elvi_list		@sysconfdir@/surfraw_elvi.list
Index: surfraw/surfraw.IN
===================================================================
--- surfraw/surfraw.IN	{cset 8956dc0e-12bd-4f11-853e-e6573900601f}
+++ surfraw/surfraw.IN	{local clone}
@@ -246,7 +246,7 @@ w3_parse_option () {
     
     case "$opt" in
 	-browser=*)	    setopt   SURFRAW_browser		$optarg	;;
-	-elvi)		    cat "$SURFRAW_elvi_list"; exit 0            ;;
+	-elvi)		    sed -n 's/^.*elvis: \(.*\)$/\1/p' $elvidir/*; exit 0            ;;
 	-escape-url-args=*) setoptyn SURFRAW_escape_url_args	$optarg ;;
 	-g | -graphical)    setoptyn SURFRAW_graphical		yes	;;
 	-help | --help)     do_help=1					;;




More information about the Surfraw-devel mailing list