Empty commit.

This commit is contained in:
Trey Blancher 2017-12-27 10:09:51 -05:00
parent 8b7c4fb319
commit e6234010e5
2 changed files with 0 additions and 81 deletions

23
chug
View File

@ -1,23 +0,0 @@
#!/bin/bash
WK_OFFSET=$1
[[ -z ${WK_OFFSET} ]] && WK_OFFSET=0
DATE=$(gdate -d "last Monday - ${WK_OFFSET} weeks")
for date in $(gdate +%F -d "${DATE}") \
$(gdate +%F -d "${DATE} + 1 day") \
$(gdate +%F -d "${DATE} + 2 day") \
$(gdate +%F -d "${DATE} + 3 day") \
$(gdate +%F -d "${DATE} + 4 day") \
$(gdate +%F -d "${DATE} + 5 day") \
$(gdate +%F -d "${DATE} + 6 day"); do
echo $date
./do_process $date
echo
echo -n Press ENTER for ${date}...
read
done

View File

@ -1,58 +0,0 @@
#!/bin/bash
ORGS=()
if [[ "x${1}" == "x" ]]; then
DATE=$(date +%F)
else
DATE=$1
fi
if [[ -f ${DATE}.log ]]; then
get_list_of_orgs () {
orgs=$( grep -Po "\s+\[.*\]" | tr -d '[][]' )
for org in ${orgs}; do
org="${org##*( )}" # trim leading whitespace
org="${org%%*( )}" # trim trailing whitespace
[[ "${ORGS[@]}" =~ "${org}" ]] || ORGS+=("${org}")
done
}
get_list_of_orgs < ${DATE}.log
for (( i=0; i < ${#ORGS[@]}; i++ )); do
echo "ORGS[$i]=${ORGS[$i]}"
done
#for org in "${ORGS[@]}"; do
# echo ${org}
#done
echo "--"
echo ${DATE}
echo
echo
echo
WHOLE=""
for pattern in "${ORGS[@]}" meeting; do
#echo "pattern=${pattern}" >&2
if [[ "${pattern}" == "meeting" ]]; then
grep "${pattern}" ${DATE}.log | grep -Ev "${WHOLE}" | timetracker
else
grep "${pattern}" ${DATE}.log | timetracker
fi
echo
if [[ "${WHOLE}x" == "x" ]]; then
WHOLE="${pattern}"
else
WHOLE="${WHOLE}|${pattern}"
fi
echo
done
grep -Ev "${WHOLE}" ${DATE}.log | timetracker
echo
timetracker ${DATE}.log | grep "Section" | sed 's/Section/Grand/'
else
echo "${DATE}.log does not exist" >&2
fi