updated for new locations.
[feisty_meow.git] / scripts / notes / info_overload_report.sh
1
2 # these metrics are how bogged down we are in to-do type items.
3
4 REPORT_FILE="$HOME/quartz/history_info_overload.txt"
5
6 # given a path, this will find how many items are under it, ignoring svn and git files.
7 function calculate_depth()
8 {
9   local dir="$1"; shift
10   find "$dir" -type f -exec echo \"{}\" ';' | grep -v "\.svn" | grep -v "\.git" | wc -l | tr -d ' '
11 }
12
13 ##############
14
15 # notes are individual files of tasks, usually, although some are combined.
16 note_depth=$(calculate_depth ~/cloud/grunty_notes)
17
18 # projects are slightly more productive, ongoing things that are very active.
19 project_depth=$(calculate_depth ~/quartz/projects)
20
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)
24
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 ' ')
27
28 # scan across all appropriately named folders in our folders that live in the "cloud".
29 cloud_depth=0
30 for i in ~/cloud/*project* ~/cloud/*research*; do
31   temp_depth=$(calculate_depth $i)
32   cloud_depth=$(($cloud_depth + $temp_depth))
33 done
34
35 ##############
36
37 total_overload=$(($note_depth + $item_depth + $project_depth + $source_example_depth + $cloud_depth))
38
39 report="\
40 \n\
41 Current information overload consists of:\n\
42 \n\
43   $note_depth\tnote files\n\
44   $item_depth\tto-do list items\n\
45   $project_depth\tproject files\n\
46   $source_example_depth\tsource examples\n\
47   $cloud_depth\tcloud notes\n\
48   -------\n\
49   $total_overload\ttotal items\n\
50 \n\
51 Gathered On: $(date)\n\
52 \n\
53 ##############"
54
55 echo -e "$report" | tee -a "$REPORT_FILE"
56