Skip to content

Commit

Permalink
basic, simple functionality, bit of a kludge.
Browse files Browse the repository at this point in the history
  • Loading branch information
schvin committed Jun 17, 2012
1 parent b78445b commit 3adbb70
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions bin/112-photos-2012-status.csh
@@ -0,0 +1,29 @@
#!/bin/csh
#
# gives brief status of status in 112 photos of 2012. recomend calling from cron periodically, for example:
#
# ./112-photos-2012-status.csh | mailx -s '112 photos in 2012 - status' schvin@schvin.net
#
# for more info on the 112 photos in 2012 project, check out these urls:
#
# http://www.flickr.com/groups/1843711@N21/
# http://www.flickr.com/photos/schvin/sets/72157629486826649/
#
###

set DATA=~/projects/scallop/art/112.md
set TODODATA=$TMPDIR/$$-list
set IDEA=$TMPDIR/$$-idea

set DONE=`egrep '^\* [0-9]+\.' $DATA | wc -l`
egrep '^[0-9]+\.' $DATA > $TODODATA
set TODO=`cat $TODODATA | wc -l`

echo "You have completed $DONE photos, leaving $TODO to go!"
echo
echo "Here are a few ideas:"
foreach idea (1 2 3)
set R=`perl -le "print int(rand($TODO))"`
cat $TODODATA | perl -slane 'if($. == $r) { print " $_"; }' -- -r=$R >> $IDEA
end
cat $IDEA | sort -g | uniq

0 comments on commit 3adbb70

Please sign in to comment.