You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
misc/shell_scripts/pmwiki_social_search

19 lines
611 B

#! /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