here are some potential ideas for modules:
- [ ] syntax highlight for code blocks
-- [ ] blog average time to read
+- [x] blog average time to read
## pinopress flavored markdown
$!d
}
x
-/(^$|^\s+$)/ !{
+/^\s*$/ !{
s/^/\n<p>/
s/$/\n<\/p>/
}
block
```
+hello,
+
+Many of you are probably feeling a little sad. This is ok. Sadness is a normal human emotion. I encourage you to watch the movie Inside Out - one of the best movies of all time.
+
+Try not to take your performance in this course as a barometer by which you should measure yourself. This is true for any course at any time but is especially true for this particular term where both the school and the students are learning to adjust to this new format.
+There is also the written part to to this midterm which will likely boost everyone's average (if previous Crowdmark assessments are to be believed). As it stands at the moment, the grades so far are not out of line with previous years.
+Specific to this course is the fact that the second half is generally easier to understand than the first half so hopefully this will give everyone a moral if not quantitative boost.
+At the end of it all try hard to look at your effort and be proud of the work you put in. University in general requires a big adjustment and unfortunately for everyone starting new this year will likely require a few more adjustments over the coming years. One of the biggest, most important and rarely talked about benefits of university as a whole is just a general growth of the individual regardless of what discipline they ultimately decided to study.
+A reflection for you.
+- Math 137
--- /dev/null
+#!/bin/sh
+
+## module for getting estimated time to read an article
+## usage:
+## readingtime [file]
+## exports:
+## READING_TIME in minutes
+
+## config vars
+wordsPerMinute=250
+
+# first clean special symbols and lines with whitespace
+wordcount=`sed -e 's/[^A-Za-z0-9 ]//g' -e '/^\s*$/d' "$1" | wc -w`
+export READING_TIME=$(expr $(expr $wordcount + $wordsPerMinute) / $wordsPerMinute)
cat $(TEMPLATE_DIR)/head.template.html > "$@"
# module pipeline starts here
./$(MODULE_DIR)/md "$^" >> "$@"
+ . ./$(MODULE_DIR)/readingtime "$^"
# module pipeline ends here
cat $(TEMPLATE_DIR)/foot.template.html >> "$@"
envsubst < "$@" | sponge "$@"