diff --git a/shell_scripts/pmwiki_social_search b/shell_scripts/pmwiki_social_search new file mode 100755 index 0000000..a3cfcc3 --- /dev/null +++ b/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 +