The goal of journalr is to create markdown templates for journalling
You can install the development version from GitHub with:
# install.packages("devtools")
devtools::install_github("andrewjpfeiffer/journalr")
journalr consists of two primary functions journal_freeform()
and
journal_tactics()
.
journal_freeform()
is used to create simple freeform journalling
templates:
example_freeform <- journalr::journal_freeform(as.Date("2019-01-01"),
as.Date("2019-02-28"))
example_freeform$filename[1]
#> [1] "2019-01-freeform.md"
writeLines(substr(example_freeform$file_contents[1], 1, 64))
#> # January 2019
#>
#> ## Tue 01 Jan 2019
#>
#> *
#>
#> ## Wed 02 Jan 2019
#>
#> *
example_freeform$filename[3]
#> [1] "monthly_freeform.md"
writeLines(example_freeform$file_contents[3])
#> # Monthly reflections: January 2019 to February 2019
#>
#> ## January 2019
#>
#> *
#>
#>
#> ## February 2019
#>
#> *
journal_tactics()
is used to create journalling templates for tactics.
This terminology is taken from 12 Week Year by Brian Moran, who
recommends keeping score of how well you perform at tactics that
contribute to higher-level goals.
journal_tactics()
has three arguments:
*
, -
or +
) is read as a tactic.Each row of the output is a template file for each week, and the last row is a template file for weekly reflections.
template_in <- "* Walk 10K steps each day\n* Read 30 minutes each day"
example_tactics <- journalr::journal_tactics(template_in, as.Date("2019-10-13"),
as.Date("2019-10-26"))
example_tactics$filename[1]
#> [1] "~w1-tactics.md"
writeLines(substr(example_tactics$file_contents[1], 1, 155))
#> # Week 1: Sun 13 Oct 2019 to Sat 19 Oct 2019
#>
#> ## Walk 10K steps each day
#>
#> ### Sun 13 Oct 2019 (<YES/NO/SKIP>)
#>
#> *
#>
#> ### Mon 14 Oct 2019 (<YES/NO/SKIP>)
#>
#> *
example_tactics$filename[3]
#> [1] "!weekly_tactics.md"
writeLines(substr(example_tactics$file_contents[3], 1, 242))
#> # Weekly reflections: Sun 13 Oct 2019 to Sat 26 Oct 2019
#>
#> ## Walk 10K steps each day
#>
#> ### Week 1: Sun 13 Oct 2019 to Sat 19 Oct 2019 - <YES/NO/SKIP> (<SCORE>)
#>
#> *
#>
#> ### Week 2: Sun 20 Oct 2019 to Sat 26 Oct 2019 - <YES/NO/SKIP> (<SCORE>)
#>
#> *
The shiny application for this package can be found at https://andrewjpfeiffer.shinyapps.io/journals. To use the application:
Freeform
or Tactics
)Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.