Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 25 May 2018, 01:26
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Julian Assange's Raw Surfer Now on PuppyLinux
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
musher0


Joined: 04 Jan 2009
Posts: 12196
Location: Gatineau (Qc), Canada

PostPosted: Sat 21 Apr 2018, 06:59    Post subject:  Julian Assange's Raw Surfer Now on PuppyLinux
Subject description: All right, that's an overstatement, the "elvis" need updating!
 

Hi guys.

Please find attached as a pet archive. I tested it with limited results. It's
~ 15 years old, you see, and I suspect that

1) the helpers that Julian Assange calls "elvis" need some updating.

As proof, please see the compilation test report. These "elvis" (it's a play
on the letters of the word "evil", not a tribute to the initial rock star!)
contain search engine strings which, as you will see from the compilation
report, are not always efficient in this day and age;

2) the way the mind of this fellow works is way out there compared to
mine !

Anybody interested in participating in these updates, please chime in
below. I'll try updating a few, but there are lots and lots of these "elvis".

If I understood his doc correctly (yep, the documentation was written by
the man himself!), the theory of it is that, by bypassing a lot of the
useless html "slag", one gains a lot of time and much greater precision in
Internet searches.

I think no one can prove his statement wrong, in view of the graphic
clutter, the ads, etc., on web pages, plus the bulkiness of Internet
browsers these days.

For best results, Julian Assange suggests teaming his script up with a CLI
browser such as links2.

In any case, IMO, this is a tremendous artefact of Internet history, and it
is worth having a copy in one's software collection.

(Source of the attached compiled version:
https://gitlab.com/surfraw/Surfraw
Help page:
https://surfraw.alioth.debian.org/. The bottom line says:
Quote:
Last modified: Mon Feb 5 06:26:15 NZDT 2018
so it is still maintained.)

BFN.
surfraw-test.rpt.zip
Description  Test report from < make test >, after compilation. (Zipped)
zip

 Download 
Filename  surfraw-test.rpt.zip 
Filesize  2.04 KB 
Downloaded  28 Time(s) 
surfraw-mstr20180421_elf.pet
Description  Compiled on xenialPup-7.0.6. May not work on older Pups, but give it a try anyway:
it's made of python and bash scripts, not of C or C++ executables.
pet

 Download 
Filename  surfraw-mstr20180421_elf.pet 
Filesize  65.61 KB 
Downloaded  30 Time(s) 

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)

Last edited by musher0 on Tue 24 Apr 2018, 16:32; edited 2 times in total
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 12196
Location: Gatineau (Qc), Canada

PostPosted: Sat 21 Apr 2018, 08:46    Post subject:  

Hello again, people.

One-liner example, if you wish to get info about American composer
George Gershwin through the ask.com engine:
Code:
sr -g -browser=/usr/bin/xlinks2 ask Gershwin

Explanation:
Quote:
sr = short form for surfraw

-g = minimal graphics

-browser... Please do not forget to include the "browser" parm. You'll get
errors without it. Preferably < links > or other CLI browser, but
/path/to/palemoon is also ok, although graphic browsers are not as fast.

ask = the ask.com "elvi" helper

Gershwin = the info you are looking for.

Edit, in the afternoon:
The search engine ("elvi") has to come before the search item.


Similarly,
Code:
sr -g -browser=/usr/bin/xlinks2 cia Canada
will bring you directly to the CIA Factbook, at entry Canada.

IHTH
surfraw-Gershwin.jpg
 Description   Result of surfraw one-liner above.
 Filesize   189.46 KB
 Viewed   241 Time(s)

surfraw-Gershwin.jpg


_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)

Last edited by musher0 on Sun 22 Apr 2018, 00:05; edited 2 times in total
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 12196
Location: Gatineau (Qc), Canada

PostPosted: Sat 21 Apr 2018, 14:59    Post subject:
Subject description: Work in progress
 

Hi guys and gals.

I'm letting you have it as it is. I need a break! Back to it later.

I'm sure I could have been more logical, and my logic is not your logic, etc., etc.

IOW, if you're not satisfied with my listing, quit complaining, roll up your
sleeves and give me a hand !!! There are more than a couple of these I
don't know in which category they go.

We'll put the thematics in alphabetic order at the end, when all the
engines are in their proper category.

TWYL.
Quote:
Tentative Thematic Grouping of the "Elvis"

General:
acronym -- Look for acronyms definitions (www.acronymfinder.com)
arxiv -- Search arXiv E-Print Archive for articles
cia -- Search CIA documents at www.cia.gov
etym -- Look up word origins at www.etymonline.com
wayback -- Search The Internet Archive's Wayback Machine for a URL (archive.org)

~~~~~~~~~~~~~~
Science:
ads -- Search SAO/NASA Astrophysics Data System
mathworld -- Search Wolfram MathWorld

Medecine:
pubmed -- Search medical/molbio databases (www.ncbi.nlm.nih.gov)

nlab -- Search the nLab Wiki (http://ncatlab.org)
ntrs -- Search the NASA Technical Report Server
scholar -- Search Google Scholar (scholar.google.com)
worldwidescience -- Search for science with www.worldwidescience.org
~~~~~~~~~~~~~~


Books:
amazon -- Search the amazon.com bookstore
bookfinder -- Search for books using www.bookfinder.com
gutenberg -- Search for books on Project Gutenberg (gutenberg.org)
springer -- Search Springer for Books and Articles


Search Engines:
ask -- Question the web using Ask Jeeves (www.ask.com)
bing -- Search the web using Microsoft's Bing (www.bing.com)
duckduckgo -- Securely search the web using duckduckgo (duckduckgo.com)
excite -- Search on Excite (www.excite.com)
google -- Search the web using Google (www.google.com)
gcache -- Search the web using Google cache (www.google.com)
ixquick -- Search the web using ixquick [HTTPS] (www.ixquick.com)
yahoo -- Search Yahoo categories (www.yahoo.com)
yandex -- Search the web using Yandex (yandex.ru)


Law:
austlii -- Search Australian Law docs (www.austlii.edu.au)
comlaw -- Search Australian Law using Comlaw (www.comlaw.gov.au)


News:
bbcnews -- Search BBC News (news.bbc.co.uk)
cnn -- Search on CNN (cnn.com)

~~~~~~~~~~~~~~
Computer Science, Programming, Scripting:
alioth -- Search Alioth (alioth.debian.org)
bugmenot -- Bypass compulsory web registration with bugmenot.com
bugzilla -- Search for bugs on Bugzilla bugtrackers
cite -- Search computer science papers (citeseerx.ist.psu.edu)
cliki -- Search the common lisp wiki
commandlinefu -- search on www.commandlinefu.com
foldoc -- The Free On-Line Dictionary Of Computing (foldoc.org)
freebsd -- Search FreeBSD related information (www.freebsd.org)
github -- Search GitHub (https://github.com)
javasun -- Search Java API docs (java.sun.com)
jquery -- Search the jQuery documentation (api.jquery.com)
l1sp -- Search lisp documentation
lsm -- Search the Linux Software Map
macports -- Search macports packages (macports.org)
mdn -- Search the mozilla developer network (developer.mozilla.org)
netbsd -- Search NetBSD related information (www.netbsd.org)
openbsd -- Search OpenBSD related information (www.openbsd.org)
oraclesearch -- Search Oracle (search.oracle.com)
phpdoc -- Search PHP documentation (php.net)
scpan -- Search the Comprehensive Perl Archive Network (metacpan.org)
slashdot -- Search stories on Slashdot (www.slashdot.org)
slinuxdoc -- Search entries in LDP (www.linuxdoc.org)
sourceforge -- Search SourceForge (www.sourceforge.net)
stack -- Search Stack Overflow
wolfram -- Ask questions of the computational knowledge engine

FOSS:
freshmeat -- Search Freshmeat (www.freshmeat.net)
fsfdir -- Search the FSF/UNESCO Free Software Directory (directory.fsf.org)

Hardware:
cisco -- Search Cisco documentation (www.cisco.com)

Linux Distributions:
ArchLinux:
archpkg -- Search Arch Linux Packages (www.archlinux.org/packages/)
archwiki -- Search the Arch Linux Wiki
aur -- Search aur.archlinux.org for PKGBUILDs

Debian:
debbugs -- Search the debian BTS (bugs.debian.org)
debcodesearch -- Search debian source code
debcontents -- Search contents of debian/ubuntu packages (packages.debian.org/packages.ubuntu.com)
deblists -- Search debian mailing lists (lists.debian.org/search.html)
deblogs -- Show changelogs for a package in Debian main (changelogs.debian.net)
debpackages -- Search debian/ubuntu packages (packages.debian.org/packages.ubuntu.com)
debpkghome -- Visit the home page for a Debian package
debpts -- Search the Debian Package Tracking System (packages.qa.debian.org)
debsec -- Search the Debian Security Tracker for CVE ids or package names
debvcsbrowse -- Browse the VCS repository for a Debian package
debwiki -- Search the Debian Wikis (wiki.debian.org & women.debian.org/wiki)

Gentoo:
genbugs -- Search the Gentoo bug tracker (bugs.gentoo.org)
genportage -- Search gentoo-portage.com for packages
gmane -- Search mailing list with gmane (gmane.org)

~~~~~~~~~~~~~~

Misc.:
cve -- Search for CAN assignments in CVE


TeX:
ctan -- Search the Comprehensive TeX Archive Network (ctan.org)


Money:
currency -- Convert currencies with the Universal Currency Converter (www.xe.net/ucc)
stockquote -- Get a single stock quote (multiple providers)


Auctions:
ebay -- Search the Ebay auction site


Movies & Videos:
imdb -- Search the Internet Movie Database (www.imdb.com)
youtube -- Search YouTube (www.youtube.com)


Newsgroups:
deja -- Search usenet using Google Groups (groups.google.com)


Music:
discogs -- Search the Discogs database of music information (www.discogs.com)
freedb -- Search for cd track listings in FreeDB (www.freedb.org)
jamendo -- Search Jamendo: free music with Creative Commons licenses (www.jamendo.com)
lastfm -- Search last.fm
musicbrainz -- Search MusicBrainz (musicbrainz.org)


f5 -- Search F5 related information (www.f5.com)
finkpkg -- Search Fink packages (pdb.finkproject.org)


Human Languages:
leodict -- Search Leo's German <-> English dictionary (dict.leo.org)
rae -- Busca en el diccionario de la Real Academia de la Lengua Española (Spanish Dictionary)
thesaurus -- Look up a synonym in Oxford's thesaurus (en.oxforddictionaries.com)
translate -- Translate human languages
urban -- Search urbandictionary.com for a definition
webster -- Look up word in Merriam-Webster's Dictionary (www.m-w.com)
wikipedia -- Search the free encyclopedia wikipedia
wiktionary -- Search the free dictionary wiktionary


Torrents:
mininova -- Search the mininova bittorent source.


Databases:
mysqldoc -- Search mysql documentation (dev.mysql.com)
pgdoc -- Search postgres documentation (www.pgdoc.com)
pgpkeys -- Search the PGP key database


???????????

pin -- Search Pinboard bookmarks (https://pinboard.in)
piratebay -- Search The Pirate Bay (https://thepiratebay.org)
priberam -- Look up word in Priberam online dictionary (www.priberam.pt/dlpo)

rfc -- Search RFCs (internet standards documents)

searx -- Search using searx metasearch engine instances (https://searx.me and others) [sounds like "serx-us" (circ-us)! I'm sure it's not.]

~~~~~~~~~~~~~
surfraw related:
S -- Search using custom search provider
W -- Activate Surfraw defined web-browser
~~~~~~~~~~~~~

WWW:
w3css -- Validate a CSS URL with the w3c CSS validator (jigsaw.w3.org/css-validator)
w3html -- Validate a web page URL with the w3c validator (validator.w3.org)
w3link -- Check web page links with the w3c linkchecker (validator.w3.org/checklink)
w3rdf -- Validate a RDF URL with the w3c RDF validator (validator.w3.org)
woffle -- Search the web using Woffle (localhost:8080)

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 12196
Location: Gatineau (Qc), Canada

PostPosted: Sun 22 Apr 2018, 00:32    Post subject:  

You could use something like this:
Code:
surfraw -elvi | awk '/music|listings/ { print $1 }' > list
while read line;do
     surfraw.sh $line Gershwin # or the name of any musician
done < list
The above will search for "Gershwin" using any music-related "elvi"
helper and show the results in successive browser windows.

surfraw.sh being:(use the one in next post, please.)

Do not enjoy, do not pass Go, do not collect $200. Wink

BFN.

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 12196
Location: Gatineau (Qc), Canada

PostPosted: Tue 24 Apr 2018, 04:20    Post subject:  

Hello all.

This script is more logical, I think.

Polite, precise and constructive feedback by
polite, precise and constructive people will be appreciated.

BFN.
Code:
# Please use new version below. Thanks.

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)

Last edited by musher0 on Tue 24 Apr 2018, 16:40; edited 1 time in total
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 12196
Location: Gatineau (Qc), Canada

PostPosted: Tue 24 Apr 2018, 16:38    Post subject:  

Hello all.

Latest take on this wrapper.

Changes:
- competely bilingual, FR and EN say the same thing.
- new error check
- ampersand at very end frees console
- improved layout

Feedback welcome. BFN.

Code:
#!/bin/ash
# /opt/local/bin/surfraw.sh # OR | OU # /root/my-applications/bin/surfraw.sh
#
# Careful!
# DO NOT symlink this script to the name "surfraw", as < surfraw > is the name
# of the executable driving this script. |
#
# Attention !
# NE PAS faire de lien symbolique de ce script sous le nom surfraw. Le nom est déjà pris.
#
####
# Usage: surfraw.sh elvi item-to-search
# ............... surfraw.sh elvi terme-à-chercher
#
# Example: | Exemple : surfraw.sh freedb Gershwin
# (To find CDs from American composer George Gershwin on the freedb site.) |
# (Pour trouver des CD du compositeur américain George Gershwin sur le site freedb.)
#
####
# © Christian L'Écuyer, Gatineau (Qc), Canada, GPL3.
# (Alias musher0 [forum Puppy] ### Rév. 2018-04-23, 2018-04-24.
######## EN: See https://opensource.org/licenses/GPL-3.0.
#   Ce programme est libre : vous pouvez le redistribuer ou modifier selon les termes de la
#   Licence Publique Générale GNU publiée par la Free Software Foundation (v. 3 ou toute
#   version ultérieure choisie par vous).
#         Ce programme est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE
#   GARANTIE, ni explicite ni implicite, y compris des garanties de commercialisation ou
#   d'adaptation à un but spécifique. Pour obtenir plus de détails, veuillez vous reporter au
#   texte de cette licence à https://opensource.org/licenses/GPL-3.0 pour le texte officiel, à
#    http://www.linux-france.org/article/these/gpl.html pour une traduction et à
#    https://fr.wikipedia.org/wiki/Licence_publique_générale_GNU pour une explication en français.
#### # set -xe
A="$1";B="$2";C="$3"

if [ "$A" = "" -a "$B" = "" -a "$C" = "" ];then # Gestion des erreurs | Error handling.
     case "${LANG:0:2}" in fr)echo -e "\n\tVous avez oublié les paramètres.\n" ;;
          en|*)echo -e "\n\tYou forgot the parameters.\n" ;;
     esac;exit
else
     if [ "$3" = "" ];then C="/usr/local/bin/defaulthtmlviewer" # Careful. This string
          # makes this script Puppy-specific.
          # Attention ! La ligne ci-dessus  limite le présent script à Puppy.
          # More general: | Plus général : C="/usr/bin/xlinks2"
     else
          if [ -x "$3" ];then C="$3"
               # The bigger the browser, the more time it will take to display the search.
               # Plus le navigateur est gros, plus la recherche prend de temps à s'afficher.
          else # Navigateur ?...
               case "${LANG:0:2}" in fr)echo -e "\n\tCe navigateur n'existe pas.
       Veuillez en choisir un autre.\n" ;;
                    en|*)echo -e "\n\tThat browser does not exist.
       Please choose another one.\n" ;;
               esac;exit
          fi
     fi
fi

# Examen des chaînes de contenu | Check of the content strings
if [ "$2" = "" ];then
     B="$1";A="ask" # With this line, default "elvi" helper becomes "ask".
          # Avec cette ligne, le moteur de recherche par défaut devient « ask ».
else
     A="$1";B="$2" # Otherwise, unchanged. |
          # Si on a spécifié un moteur de recherche et un terme, rien ne change.
fi

# Action
surfraw $A $B -browser=$C & # L'éperluette libère la console pour autre chose.
# The ampersand frees the console for other things. # set +xe
surfraw.sh.zip
Description 
zip

 Download 
Filename  surfraw.sh.zip 
Filesize  1.78 KB 
Downloaded  16 Time(s) 

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1085s ][ Queries: 12 (0.0206s) ][ GZIP on ]