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.
|
|
|
#! /usr/bin/env bash
|
|
|
|
# motivated by http://fabien.benetou.fr/MemoryRecalls/ImprovingPIM#SocialPIM
|
|
|
|
# example
|
|
|
|
# test1 for friend1, test2 for friend2 and test for friend1 and friend2
|
|
|
|
|
|
|
|
# TODO
|
|
|
|
# support some sort of caching
|
|
|
|
# support auth
|
|
|
|
# note that by default PmWiki does so, thus one should be able to authentificate
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|