-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
108 lines (95 loc) · 3.46 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
---
output: github_document
---
# R Lille Meetup Posters <a href="https://github.com/RLille/"><img src="https://avatars1.githubusercontent.com/u/60702180" align="right" width="120" /></a>
<!-- badges: start -->
[![License](https://img.shields.io/github/license/RLille/meetup-poster)](LICENSE)
<!-- badges: end -->
```{r, echo = FALSE, message = FALSE}
source("assets/create_meetup.R")
rscript <- list.files(path = "R", pattern = "^20.*\\.R$", full.names = TRUE)
meetup <- sub("\\.R$", "", basename(rscript))
base_ads <- lapply(
X = sprintf("meetups/%s/ads/%s", meetup, meetup),
FUN = paste0,
c(".png", "-email.md", "-blogpost.md")
)
check_outdated <- function(r, a) {
mapply(
FUN = function(r, a) {
!all(sapply(a, file.exists)) ||
(
min(sapply(a, file.mtime)) < max(
sapply(
X = c(
r,
"assets/create_meetup.R",
"assets/poster.Rmd",
"assets/announcement.Rmd",
"assets/blogpost.Rmd"
),
FUN = file.mtime
)
) &
as.Date(sub("\\.R$", "", basename(r))) > Sys.Date()
)
},
r,
a
)
}
outdated <- check_outdated(rscript, base_ads)
invisible(lapply(rscript[which(outdated)], source, encoding = "UTF-8"))
```
```{r, results = "asis", echo = FALSE}
cell <- sprintf(
paste0(
'<td align = "center">',
'<a href="meetups/%s/materials/README.md">',
'<img alt="Affiche du Meetup du %s" src="%s" width="100%%" height="auto" />',
"<br/>",
"%s",
"</a>",
"</td>"
),
meetup, meetup, grep("\\.png$", unlist(base_ads), value = TRUE), meetup
)
cols <- 4
rows <- ceiling(length(cell) / cols)
row_id <- rep(seq_len(rows), each = cols, length.out = length(cell))
row_cells <- split(cell, row_id)
cat("<table>\n")
cat(paste0("<tr>", sapply(row_cells, paste, collapse = ""), "</tr>"), sep = "")
cat("</table>\n")
```
*Note:* Poster/slides based on a template
by [Mickaël Canouil](https://mickael.canouil.fr/)
(<https://github.com/mcanouil/xaringan-template/>).
## Submit A Meetup Proposal
To submit a meetup proposal, make a pull request (PR) which add a new R script (in `./R`) as described below.
The script must be named `20YY-MM-DD.R` where `YY` is the year,
`MM` is the month and `DD` is the day of the proposed meetup.
The PR will be reviewed, modified (if needed), and validated by the R Lille organisers.
Once the PR is validated and merged,
the MeetUp will be scheduled and published on [rlille.fr](https://rlille.fr)
and [meetup.rlille.fr](http://meetup.rlille.fr).
```{r, eval = FALSE, echo = TRUE}
# `R/20YY-MM-DD.R`
create_meetup(
output = here::here("meetups/20YY-MM-DD"),
rmd_params = list(
title = "Title Of The Meetup", # title of the meetup
author = "Firstname Lastname", # speaker
institute = "", # speaker's institute/affiliation
date = 'Thursday, the DD<sup><i style="font-size:0.5em;">th</i></sup> of MM, 20YY - 18:00 CET', # date of the meetup
date_short = "20YY-MM-DD", # date of the meetup using YYYY-MM-DD format
picture = "none", # URL of the speaker's picture, or "none"
website = "", # URL of the speaker's website
abstract = "", # abstract of the talk using Markdown syntax
biography = "", # biography of the speaker using Markdown syntax
language = "en", # language of the talk
meetup_id = "" # to be filled by R Lille organisers
)
)
```
*Note:* The date can be changed/updated after the PR is made.