initial crude test

master
Fabien Benetou 13 years ago
parent e9d7cc25bf
commit f6de5fff49
  1. 19
      shell_scripts/pmwiki_social_search

@ -0,0 +1,19 @@
#! /usr/bin/env bash
# motivated by
# TODO
# upport some sort of caching
# example test1 for friend1, test2 for friend2 and test for friend1 and friend2
QUERY="?action=search&q=fmt%3D%23simple+"
# PmWiki format
KEYWORD=$1
URList=("http://nicolas.bigand.free.fr/pmwiki/index.php5" "http://notes.franck-brignoli.fr/")
# all Pmwiki instances
for URL in "${URList[@]}"
# this should be limited to people with expertize in the topic
do
curl "${URL}${QUERY}${KEYWORD}" | awk /wikisearch/,/searchinfostart/ | grep wikilink | sed "s/.*href='\(.*\)'.*/\1/" | sort | uniq
# parsing is only done for PmWiki now
done
Loading…
Cancel
Save