Last active
August 29, 2015 14:06
-
-
Save TK009/1ae59fe5ee929d6e0bcf to your computer and use it in GitHub Desktop.
Generate monospace ascii html file from `remind` reminders.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/sh | |
| # author: Tuomas Kinnunen | |
| # last update: Mon 22 Sep 17:29:03 EEST 2014 | |
| # ------------------------------------------------------------------------------ | |
| # Generates monospace ascii html file from `remind` reminders. | |
| # usage: just call this script daily to update the static html file, $DESTINATION | |
| # Source of reminders | |
| REMINDERS=$HOME/.reminders | |
| # Destination | |
| DESTINATION=$HOME/www/cal/index.html | |
| # How many weeks is in the generated html calendar | |
| WEEKS=2 | |
| # Width of lines in the output, in chars | |
| WIDTH=110 | |
| # Generate html body | |
| # -m: monday is first day of week, -b1: 24-hour clock | |
| CAL=`remind -m -b1 -c+$WEEKS -w$WIDTH $REMINDERS` | |
| echo "<html> | |
| <head> | |
| <title>TKn kalenteri</title> | |
| <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"/> | |
| <meta charset=\"utf-8\"> | |
| </head> | |
| <body><pre>$CAL</pre></body> | |
| </html>" > $DESTINATION | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment