made less specific for project and research patterns.
[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 # notes are individual files of tasks, usually, although some are combined.
14 note_depth=$(calculate_depth ~/quartz/grunty_notes)
15 #$(find ~/quartz/grunty_notes/ -type f -exec echo \"{}\" ';' | grep -v "\.svn" | grep -v "\.git" | wc -l | tr -d ' ')
16
17 # projects are slightly more productive, ongoing things that are very active.
18 project_depth=$(calculate_depth ~/quartz/projects)
19 #$(find ~/quartz/projects/ -type f -exec echo \"{}\" ';' | grep -v "\.svn" | grep -v "\.git" | wc -l | tr -d ' ')
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 #$(find ~/quartz/example_source_code/ -type f -exec echo \"{}\" ';' | grep -v "\.svn" | grep -v "\.git" | wc -l | tr -d ' ')
25
26 # the list files are web documents with to-do lists.  individual items are marked with <li>.
27 item_depth=$(find ~/quartz/grunty_notes/ -type f -iname "*.html" -exec grep "<li" "{}" ';' | wc -l | tr -d ' ')
28
29 # scan across all appropriately named folders in our folders that live in the "cloud".
30 cloud_depth=0
31 for i in ~/cloud/*project* ~/cloud/*research*; do
32   temp_depth=$(calculate_depth $i)
33   cloud_depth=$(($cloud_depth + $temp_depth))
34 done
35
36 total_overload=$(($note_depth + $item_depth + $project_depth + $source_example_depth + $cloud_depth))
37
38 report="\
39 \n\
40 Current information overload consists of:\n\
41 \n\
42   $note_depth\tnote files\n\
43   $item_depth\tto-do list items\n\
44   $project_depth\tproject files\n\
45   $source_example_depth\tsource examples\n\
46   $cloud_depth\tcloud notes\n\
47   -------\n\
48   $total_overload\ttotal items\n\
49 \n\
50 Gathered On: $(date)\n\
51 \n\
52 ##############"
53
54 echo -e "$report" | tee -a "$REPORT_FILE"
55