The {daily} package converts “daily files” into various calendar formats. The primary use case is preparing a calendar to accompany a course built from a file that can include, in addition to the information displayed on the calendar, other notes for the intstructor.
See the package vignette for details about daily file syntax and various rendering options.
You can install from GitHub with:
# install.packages("devtools")
devtools::install_github("rpruim/daily")
library(daily)
library(dplyr)
calendar_css() %>% cat()
span.headerColor {
color: #906;
color: #966;
background: #fff;
}
span.bigger {font-size: larger}
span.smaller {font-size: smaller}
span.topic, span.Topic {
color: black;
font-size: medium;
font-weight: bold;
/* # font-variant: small-caps; */
}
span.topic a:link, span.topic a:visited{
color: blue;
}
span.lab, span.Lab {
color: purple;
font-size: medium;
font-style: oblique;
}
span.reading, span.Reading, span.Read, span.reading {
font-style: italic;
color: #36c;
}
span.reading a:link, span.reading a:visited{
color: blue;
}
span.Reading a:link, span.Reading a:visited{
color: blue;
}
span.read a:link, span.read a:visited{
color: blue;
}
span.Read a:link, span.Read a:visited{
color: blue;
}
span.vocab, span.Vocab {
color: purple;
}
span.notes, span.Notes {
color: green;
}
span.R {
color: purple;
font-family: "Lucida Console", "Courier New", Monospace;
}
span.Note, span.note {
color: green;
}
span.activity, span.Activity {
color: #c63;
}
span.activity a:link, span.activity a:visited{
color: brown;
}
span.Activity a:link, span.Activity a:visited{
color: brown;
}
span.due, span.Due {
/* color: #969; */
color: red;
}
span.due a:link, span.due a:visited{
color: red;
}
span.Due a:link, span.Due a:visited{
color: red;
}
span.hw, span.HW {
color: green;
}
span.hw a:link, span.hw a:visited{
color: green;
}
span.HW a:link, span.HW a:visited{
color: green;
}
body, td{
color: #000;
/* background: #fff; */
font-family: sans-serif, arial, helvetica, verdana;
}
body td{
color: #000;
background: #ccc;
font-family: sans-serif, arial, helvetica, verdana;
}
body td.odd{
color: #000;
background: #fff;
font-family: sans-serif, arial, helvetica, verdana;
}
body td.even{
color: #000;
background: #ccc;
font-family: sans-serif, arial, helvetica, verdana;
}
td {
padding: 10px;
text-align: left;
vertical-align: top;
}
th{
color: #000;
/* background: #fff; */
font-family: sans-serif, arial, helvetica, verdana;
}
/*hr {text-align: center; margin-left: 25%; width: 50%; margin-right: 25%}*/
hr {
color: #906;
color: #966;
background: #fff;
}
h1, h2, h3, h4{
color: #906;
color: #336;
background: #fff;
}
h1 a:link, h1 a:visited, h2 a:link, h2 a:visited, h3 a:link, h3 a:visited {
color: #36c;
color: #66c;
color: #339;
background: #fff;
text-decoration: none;
}
h1 { font-size: x-large;
}
h1 span.smaller{
color: #000;
background: #fff;
font-size: large;
}
h1 span.smallest{
color: #000;
background: #fff;
font-size: medium;
}
h2 { font-size: large;
font-style: normal;
}
h2 span.smaller, h2 span.smallest{
color: #000;
background: #fff;
font-size: medium;
}
h3 { font-size: medium;
font-style: normal;
}
h3 span.smaller, h3 span.smallest{
color: #000;
background: #fff;
}
h4 { font-size: medium;
font-style: italic;
}
a:link {
color: #36c; /* #06c */
color: #06c; /* #06c */
background: #fff;
text-decoration: none;
}
a:visited {
/*color: #09c; color: #96c; #936 ; #939
background: #fff;*/
color: #969;
background: #fff;
}
strong {
color: #906;
background: #fff;
}
cal <-
daily2cal(
path = system.file("daily.txt", package = "daily")
)
cal %>%
html_calendar(show = 2:6) %>% cat()
Mon
Tue
Wed
Thu
Fri
1/28
1/29
1/30Day 1:
IntroductionSyllabus
1/31
2/1Day 2: Let’s Get
StartedChapter
1This is a
note
2/4Day 3: Time to
WorkChapter
2Assignment
1
daily2html(
path = system.file("daily.txt", package = "daily"),
show = 2:6
) %>%
cat()
span.headerColor {
color: #906;
color: #966;
background: #fff;
}
span.bigger {font-size: larger}
span.smaller {font-size: smaller}
span.topic, span.Topic {
color: black;
font-size: medium;
font-weight: bold;
/* # font-variant: small-caps; */
}
span.topic a:link, span.topic a:visited{
color: blue;
}
span.lab, span.Lab {
color: purple;
font-size: medium;
font-style: oblique;
}
span.reading, span.Reading, span.Read, span.reading {
font-style: italic;
color: #36c;
}
span.reading a:link, span.reading a:visited{
color: blue;
}
span.Reading a:link, span.Reading a:visited{
color: blue;
}
span.read a:link, span.read a:visited{
color: blue;
}
span.Read a:link, span.Read a:visited{
color: blue;
}
span.vocab, span.Vocab {
color: purple;
}
span.notes, span.Notes {
color: green;
}
span.R {
color: purple;
font-family: "Lucida Console", "Courier New", Monospace;
}
span.Note, span.note {
color: green;
}
span.activity, span.Activity {
color: #c63;
}
span.activity a:link, span.activity a:visited{
color: brown;
}
span.Activity a:link, span.Activity a:visited{
color: brown;
}
span.due, span.Due {
/* color: #969; */
color: red;
}
span.due a:link, span.due a:visited{
color: red;
}
span.Due a:link, span.Due a:visited{
color: red;
}
span.hw, span.HW {
color: green;
}
span.hw a:link, span.hw a:visited{
color: green;
}
span.HW a:link, span.HW a:visited{
color: green;
}
body, td{
color: #000;
/* background: #fff; */
font-family: sans-serif, arial, helvetica, verdana;
}
body td{
color: #000;
background: #ccc;
font-family: sans-serif, arial, helvetica, verdana;
}
body td.odd{
color: #000;
background: #fff;
font-family: sans-serif, arial, helvetica, verdana;
}
body td.even{
color: #000;
background: #ccc;
font-family: sans-serif, arial, helvetica, verdana;
}
td {
padding: 10px;
text-align: left;
vertical-align: top;
}
th{
color: #000;
/* background: #fff; */
font-family: sans-serif, arial, helvetica, verdana;
}
/*hr {text-align: center; margin-left: 25%; width: 50%; margin-right: 25%}*/
hr {
color: #906;
color: #966;
background: #fff;
}
h1, h2, h3, h4{
color: #906;
color: #336;
background: #fff;
}
h1 a:link, h1 a:visited, h2 a:link, h2 a:visited, h3 a:link, h3 a:visited {
color: #36c;
color: #66c;
color: #339;
background: #fff;
text-decoration: none;
}
h1 { font-size: x-large;
}
h1 span.smaller{
color: #000;
background: #fff;
font-size: large;
}
h1 span.smallest{
color: #000;
background: #fff;
font-size: medium;
}
h2 { font-size: large;
font-style: normal;
}
h2 span.smaller, h2 span.smallest{
color: #000;
background: #fff;
font-size: medium;
}
h3 { font-size: medium;
font-style: normal;
}
h3 span.smaller, h3 span.smallest{
color: #000;
background: #fff;
}
h4 { font-size: medium;
font-style: italic;
}
a:link {
color: #36c; /* #06c */
color: #06c; /* #06c */
background: #fff;
text-decoration: none;
}
a:visited {
/*color: #09c; color: #96c; #936 ; #939
background: #fff;*/
color: #969;
background: #fff;
}
strong {
color: #906;
background: #fff;
}
Mon
Tue
Wed
Thu
Fri
1/28
1/29
1/30Day 1:
IntroductionSyllabus
1/31
2/1Day 2: Let’s Get
StartedChapter
1This is a
note
2/4Day 3: Time to
WorkChapter
2Assignment
1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.