diff options
| author | Julie Lala <jules@okfoc.us> | 2014-06-24 18:52:07 -0400 |
|---|---|---|
| committer | Julie Lala <jules@okfoc.us> | 2014-06-24 18:52:07 -0400 |
| commit | 948926970571793e774ebf34c16e14ef8e694062 (patch) | |
| tree | 90250502c299fc130efbd4c54a62e3c158cb7acd /scripts/sort_faves.sh | |
| parent | 0e9eb8b4fc0ef43f91b69749f276cadf2d3bb3ad (diff) | |
| parent | c14e6d4356a2c4d9981a6808ef19edb66fc96e51 (diff) | |
Merge branch 'master' of dumpfm:/pichat/repo
Diffstat (limited to 'scripts/sort_faves.sh')
| -rwxr-xr-x | scripts/sort_faves.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/sort_faves.sh b/scripts/sort_faves.sh new file mode 100755 index 0000000..eb28a39 --- /dev/null +++ b/scripts/sort_faves.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +if [ ! -n "$1" ] +then + echo "Usage: `basename $0` fav_scores.csv" + exit +fi + +mkdir -p faves + +echo "Get the top 50 faves for the Hall of Fame" +sort -t, -k3,3 -rn $1 | head -50 > faves/hall.csv + +echo "Group faves by user for popular pages, total fave scores" +sort -t, -k1,1 -r -k3,3 -n faves/counts_sorted.csv > faves/by_user.csv + +echo "Group faves by date for daily tallies" +sort -t, -k4,4 -r -k3,3 -n faves/counts_sorted.csv > faves/by_date.csv + + |
