#! /usr/bin/env bash
# TODO
#	fix untrusted_edits path problem first
#		note that the output format changed too
EXP_ARGS=1
if [ "$1" = "--help" -o "$1" = "-h" -o $# -lt $EXP_ARGS ]
then
  echo "Search for the last non trusted edits in PmWiki"
  echo "Usage: $0 PmWikiPath"
  echo "(uses untrusted_edits)"
  exit
fi
THA=$(($(date +"%s") - (60 * 60 * 24 * 2) ));
grep time= $( wiki_untrusted_edits "$1" ) | grep -v ctime |  sed -e "s/$/=$THA/" | awk 'BEGIN{FS="="} {if ($2 > $3) print $0}' | sed "s/:.*//"