2 # these metrics are how bogged down we are in to-do type items.
4 REPORT_FILE="$HOME/quartz/history_info_overload.txt"
6 # given a path, this will find how many items are under it, ignoring svn and git files.
7 function calculate_depth()
10 find "$dir" -type f -exec echo \"{}\" ';' | grep -v "\.svn" | grep -v "\.git" | wc -l | tr -d ' '
15 # notes are individual files of tasks, usually, although some are combined.
16 note_depth=$(calculate_depth ~/cloud/grunty_notes)
18 # unsorted files haven't been categorized yet.
19 unsorted_depth=$(calculate_depth ~/cloud/unsorted)
21 # source examples need to be sucked into other places, other codebases. they are not
22 # supposed to pile up here.
23 source_example_depth=$(calculate_depth ~/quartz/example_source_code)
25 # the list files are web documents with to-do lists. individual items are marked with <li>.
26 item_depth=$(find ~/cloud/grunty_notes/ -type f -iname "*.html" -exec grep "<li" "{}" ';' | wc -l | tr -d ' ')
28 # scan across all appropriately named folders in our folders that live in the "cloud".
30 for i in ~/cloud/*project* ~/cloud/*research*; do
31 temp_depth=$(calculate_depth $i)
32 cloud_depth=$(($cloud_depth + $temp_depth))
37 total_overload=$(($note_depth + $item_depth + $unsorted_depth + $source_example_depth + $cloud_depth))
41 Current information overload consists of:\n\
43 $note_depth\tnote files\n\
44 $item_depth\tto-do list items\n\
45 $unsorted_depth\tunsorted files\n\
46 $source_example_depth\tsource examples\n\
47 $cloud_depth\tcloud notes\n\
49 $total_overload\ttotal items\n\
51 Gathered On: $(date)\n\
55 echo -e "$report" | tee -a "$REPORT_FILE"