Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

automatically take file modification time as rmarkdown date #139

Open
maxheld83 opened this issue Apr 10, 2019 · 1 comment
Open

automatically take file modification time as rmarkdown date #139

maxheld83 opened this issue Apr 10, 2019 · 1 comment
Labels
graded-3 graded task, roughly worth 3 story points graded-4 graded task, roughly worth 4 story points graded-5 graded task, roughly worth 5 story points technical & scientific writing pandoc, LaTeX, rmarkdown, references and friends

Comments

@maxheld83
Copy link
Member

this works by placing in the yaml:

date: "`r format(file.info('setup_bibliography.Rmd')$mtime, '%d %B, %Y')`"

But that's a mouthful and you have to add the file name manually, which seems unecessary.

Would be a small nice thing to have a shortcut R function that does this instead.
It basically just needs to figure out what "this" file currently is, and then run the above for it.

Would be nice to add this as a feature to knitr or rmarkdown, or it may already exist therein.

Might also take different kinds of dates such as releases or whatever.

@maxheld83 maxheld83 added graded-3 graded task, roughly worth 3 story points technical & scientific writing pandoc, LaTeX, rmarkdown, references and friends labels Apr 10, 2019
@maxheld83 maxheld83 added graded-5 graded task, roughly worth 5 story points graded-4 graded task, roughly worth 4 story points labels May 30, 2019
@maxheld83
Copy link
Member Author

if this were an actual PR to knitr or rmarkdown it'd be graded-5, for sure.

@t-rop t-rop assigned t-rop and unassigned t-rop May 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
graded-3 graded task, roughly worth 3 story points graded-4 graded task, roughly worth 4 story points graded-5 graded task, roughly worth 5 story points technical & scientific writing pandoc, LaTeX, rmarkdown, references and friends
Projects
None yet
Development

No branches or pull requests

2 participants