From 68177745d8405f152d0355e1194032c35c3625bc Mon Sep 17 00:00:00 2001 From: Louis-Claude Canon Date: Thu, 10 Apr 2014 11:45:59 +0200 Subject: [PATCH] Update indicators --- hn/.gitignore | 5 +++++ hn/script.sh | 9 +++++++++ resrc/.gitignore | 3 +++ resrc/script.sh | 8 ++++++++ trends.md | 2 +- 5 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 hn/.gitignore create mode 100755 hn/script.sh create mode 100644 resrc/.gitignore create mode 100755 resrc/script.sh diff --git a/hn/.gitignore b/hn/.gitignore new file mode 100644 index 0000000..4f97db7 --- /dev/null +++ b/hn/.gitignore @@ -0,0 +1,5 @@ +www.daemonology.net +hn-daily +words* +2010.html +statistic diff --git a/hn/script.sh b/hn/script.sh new file mode 100755 index 0000000..6a113ec --- /dev/null +++ b/hn/script.sh @@ -0,0 +1,9 @@ +# !/bin/sh + +wget -c -r -l 1 http://www.daemonology.net/hn-daily/ +ln -s -f www.daemonology.net/hn-daily +cat hn-daily/[0-9][0-9][0-9][0-9]-[0-9][0-9].html | tr [:upper:] [:lower:] | tr [:punct:] ' ' | tr ' ' '\n' | grep -v ^$ | sort > words +wget -c http://www.daemonology.net/hn-daily/2010.html +cat 2010.html | tr [:upper:] [:lower:] | tr [:punct:] ' ' | tr ' ' '\n' | grep -v ^$ | sort | uniq > words_default +fgrep -v -w -f words_default words > words_remaining +grep -v ^[0-9] words_remaining | uniq -c | sort -n -r > statistic diff --git a/resrc/.gitignore b/resrc/.gitignore new file mode 100644 index 0000000..bcd0e7b --- /dev/null +++ b/resrc/.gitignore @@ -0,0 +1,3 @@ +free-programming-books.md +xx* +statistic diff --git a/resrc/script.sh b/resrc/script.sh new file mode 100755 index 0000000..28dfd7d --- /dev/null +++ b/resrc/script.sh @@ -0,0 +1,8 @@ +# !/bin/sh + +wget -c https://raw.githubusercontent.com/vhf/free-programming-books/master/free-programming-books.md +csplit -s free-programming-books.md "/###/" {*} +for i in $(ls xx*) +do + echo $(grep -c "^ *" $i) $(head -n 1 $i | sed "s/#//g") +done | sort -n -r > statistic diff --git a/trends.md b/trends.md index 39ce364..bfb02fc 100644 --- a/trends.md +++ b/trends.md @@ -21,7 +21,7 @@ - Popularité des cours/ressources associés sur [coursetalk](http://coursetalk.org) - - - - + - , ## Usage réel -- 1.7.10.4