forked from I2P_Developers/i2p.www
updates to the meeting log processing scripts
This commit is contained in:
@@ -1,3 +1,24 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
sed -i 's/^[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T//' $1
|
sed -e 's/^[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T//g' -e '/^[0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}\s\+\*\*\*/d' "${1}" > "${1}.nodate"
|
||||||
sed -i '/\*\*\*/d' $1
|
##
|
||||||
|
# The dumb parser will try to extract meetings from the following pattern:
|
||||||
|
# <nickname> 0. Hi or <nickname> 0) Hi
|
||||||
|
# --meeting takes place---
|
||||||
|
# * nickname bafs the meeting closed
|
||||||
|
#
|
||||||
|
# If that format is not found we'll just strip off the date, modes, joins, etc., and advise that the
|
||||||
|
# log file is manually trimmed.
|
||||||
|
##
|
||||||
|
sed -n '/^[0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}\s\+<.\+>\s\+0[).].\+[Hh]i.*/,/^[0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}\s\+.*baf.\?s the meeting.*/p' < "${1}.nodate" > "${1}.out"
|
||||||
|
|
||||||
|
echo "========================================================================================================"
|
||||||
|
if [ ! -s ${1}.out ]; then
|
||||||
|
echo "Please trim the file ${1}.out so that it contains the logs of the meeting."
|
||||||
|
mv ${1}.nodate ${1}.out
|
||||||
|
else
|
||||||
|
echo "The files ${1}.nodate and ${1}.out were created."
|
||||||
|
echo
|
||||||
|
printf "If lucky, ${1}.out just contains the logs of the meeting\nand requires little to no editing.\n\n"
|
||||||
|
printf "Otherwise, if this script made a mistake, you'll need to pare down ${1}.nodate.\n"
|
||||||
|
fi
|
||||||
|
echo "========================================================================================================"
|
||||||
|
@@ -1,2 +1,92 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cat $1 | sed 's/..\:..\(\:..\)\?\s*//' | grep ^\< | sed 's/^<\([^>]*\)>.*/\1/' | sed 's/^[@+ ]//' | sort | uniq | grep -v iRelay
|
|
||||||
|
# This script is meant to be used on logs created by Limnoria's/Supybot's
|
||||||
|
# ChannelLogger plugin, but it may work with other IRC log formats.
|
||||||
|
|
||||||
|
|
||||||
|
LOGFILE="$1"
|
||||||
|
getmonth() {
|
||||||
|
case ${1} in
|
||||||
|
01)
|
||||||
|
echo "January"
|
||||||
|
;;
|
||||||
|
02)
|
||||||
|
echo "February"
|
||||||
|
;;
|
||||||
|
03)
|
||||||
|
echo "March"
|
||||||
|
;;
|
||||||
|
04)
|
||||||
|
echo "April"
|
||||||
|
;;
|
||||||
|
05)
|
||||||
|
echo "May"
|
||||||
|
;;
|
||||||
|
06)
|
||||||
|
echo "June"
|
||||||
|
;;
|
||||||
|
07)
|
||||||
|
echo "July"
|
||||||
|
;;
|
||||||
|
08)
|
||||||
|
echo "August"
|
||||||
|
;;
|
||||||
|
09)
|
||||||
|
echo "September"
|
||||||
|
;;
|
||||||
|
10)
|
||||||
|
echo "October"
|
||||||
|
;;
|
||||||
|
11)
|
||||||
|
echo "November"
|
||||||
|
;;
|
||||||
|
12)
|
||||||
|
echo "December"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Error"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
error() {
|
||||||
|
echo "Usage: $0 [logfile]"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
print_rst() {
|
||||||
|
HEADER="I2P dev meeting, $DATE @ 20:00 UTC"
|
||||||
|
echo $HEADER
|
||||||
|
LEN=$(expr length "${HEADER}")
|
||||||
|
for I in $(seq $LEN); do printf '='; done
|
||||||
|
printf '\n\nQuick recap\n-----------\n\n* **Present:**\n\n'
|
||||||
|
}
|
||||||
|
|
||||||
|
print_present(){
|
||||||
|
# These regexes extract nicknames from current logs (created by Limnoria/Supybot) and the "historical" #i2p-dev logs
|
||||||
|
sed -e '/^.*[0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}\s\+\*\*\*/d' \
|
||||||
|
-e '/<.\+>/!d' \
|
||||||
|
-e 's/.*<+fox>\s\+<\([^<>]\+\).*/\1/' \
|
||||||
|
-e 's/^<\([^<>]\+\).*/\1,/' \
|
||||||
|
-e 's/^\[[0-9]\{2\}:[0-9]\{2\}\(:[0-9]\{2\}\]\)\?\s\+<\([^<>]\+\)>.*/\2,/' \
|
||||||
|
-e 's/^[0-9]\{2\}:[0-9]\{2\}\(:[0-9]\{2\}\)\?\s\+<\([^<>]\+\)>.*/\2,/' -e 's/^[@+ ]//g' "$LOGFILE" \
|
||||||
|
| grep -wv 'fox\|iRelay\|feed\|travis-ci\|jenkins\|RSS\|MTN\|BigBrother' | sort | uniq
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ ! -e $LOGFILE ]; then
|
||||||
|
error
|
||||||
|
fi
|
||||||
|
set -- $(echo "$LOGFILE" |sed 's/^.\+i2p-dev\.\([0-9]\{4\}\)-\([0-9]\{2\}\)-\([0-9]\{2\}\).*/\1 \2 \3/')
|
||||||
|
MONTH=$(getmonth $2)
|
||||||
|
YEAR=$1
|
||||||
|
DAY=$3
|
||||||
|
DATE="${MONTH} ${DAY}, ${YEAR}"
|
||||||
|
|
||||||
|
# If the file passed to this script is named in the format *i2p-dev.YYYY-MM-DD*,
|
||||||
|
# this script will attempt to print a usable .rst file for the meeting.
|
||||||
|
# Otherwise just the "attendees" will be printed.
|
||||||
|
|
||||||
|
if [ $MONTH = 'Error' ]; then :; else
|
||||||
|
print_rst
|
||||||
|
fi
|
||||||
|
print_present
|
||||||
|
Reference in New Issue
Block a user