Skip to content

Commit 78bbcaa

Browse files
authored
Initial commit
0 parents  commit 78bbcaa

14 files changed

+975
-0
lines changed

.github/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/render-readme.yaml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
on:
2+
workflow_dispatch:
3+
inputs:
4+
turma:
5+
description: 'turma: codigo da turma. ex: 202110-r4ds-1'
6+
required: true
7+
default: '202110-r4ds-1'
8+
nome_curso:
9+
description: 'nome_curso: Nome do curso'
10+
required: true
11+
default: 'R para Ciência de Dados 1'
12+
download_material:
13+
description: 'download_material: TRUE ou FALSE, se o curso tem zip para baixar'
14+
required: true
15+
default: 'TRUE'
16+
17+
name: render-readme
18+
19+
jobs:
20+
render-readme:
21+
runs-on: ubuntu-latest
22+
env:
23+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
24+
25+
steps:
26+
- uses: actions/checkout@v3
27+
- uses: r-lib/actions/setup-r@v2
28+
with:
29+
use-public-rspm: true
30+
- uses: r-lib/actions/setup-pandoc@v2
31+
- uses: r-lib/actions/setup-r-dependencies@v2
32+
with:
33+
cache-version: 2
34+
packages:
35+
any::knitr
36+
any::rmarkdown
37+
any::fs
38+
any::tibble
39+
any::dplyr
40+
any::glue
41+
any::readr
42+
github::curso-r/CursoRopen
43+
44+
- name: Execute Script
45+
env:
46+
TURMA: ${{ github.event.inputs.turma }}
47+
NOME_CURSO: ${{ github.event.inputs.nome_curso }}
48+
DOWNLOAD_MATERIAL: ${{ github.event.inputs.download_material }}
49+
run: |
50+
Rscript "assets/render_readme.R"
51+
52+
- name: Commit results
53+
run: |
54+
git config --local user.name "$GITHUB_ACTOR"
55+
git config --local user.email "[email protected]"
56+
git add README.Rmd
57+
git add README.md
58+
git add _config.yml
59+
git commit -m "Atualizando README" || echo "No changes to commit"
60+
git push origin || echo "No changes to commit"

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.Rproj.user
2+
.Rhistory
3+
.RData
4+
.Ruserdata
5+
README.html

README.Rmd

+148
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
---
2+
output: github_document
3+
params:
4+
turma: 202102-intro-programacao
5+
nome_curso: ATUALIZANDO....
6+
download_material: 'TRUE'
7+
---
8+
9+
<!-- README.md is generated from README.Rmd. Please edit that file -->
10+
11+
```{r, include = FALSE}
12+
knitr::opts_chunk$set(collapse = TRUE, comment = "#>", echo = FALSE,
13+
warning = FALSE, message = FALSE)
14+
15+
path_to_url <- function(path) {
16+
path |>
17+
tibble::tibble(file = _) |>
18+
dplyr::mutate(
19+
url = file |>
20+
paste0("https://curso-r.github.io/", params$turma, "/", ... = _) |>
21+
paste0("[", fs::path_file(file), "](", ... = _, ")")
22+
) |>
23+
dplyr::select(url)
24+
}
25+
```
26+
27+
## Informações importantes
28+
29+
```{r results = 'asis'}
30+
# Baixar o ZIP do repo da turma (o repo principal não vai ter os scripts feitos em aula)
31+
if (params$download_material == "TRUE") {
32+
glue::glue("- [Clique aqui](https://github.com/curso-r/{params$turma}/archive/refs/heads/main.zip) para baixar o material do curso.")
33+
}
34+
```
35+
36+
- Nosso blog: [https://curso-r.com/blog/](https://curso-r.com/blog/)
37+
38+
- Nosso fórum: [https://discourse.curso-r.com/](https://discourse.curso-r.com/)
39+
40+
- Nossos livros:
41+
- [Ciência de Dados em R](https://livro.curso-r.com/)
42+
- [Zen do R](https://curso-r.github.io/zen-do-r/)
43+
- [Programando em Shiny](https://programando-em-shiny.curso-r.com/)
44+
- [Beautiful R](https://curso-r.github.io/beautiful-r/) (em inglês)
45+
46+
47+
48+
## Dúvidas
49+
50+
Fora do horário de aula ou monitoria:
51+
52+
- Perguntas gerais sobre o curso deverão ser feitas no Classroom.
53+
54+
- Perguntas sobre R, principalmente as que envolverem código, deverão ser enviadas no [nosso fórum](https://discourse.curso-r.com/).
55+
56+
## Slides
57+
58+
```{r}
59+
"slides/" |>
60+
fs::dir_ls(glob = "*.html", fail = FALSE) |>
61+
path_to_url() |>
62+
dplyr::select(Slide = url) |>
63+
knitr::kable()
64+
```
65+
66+
67+
## Scripts utilizados em aula
68+
69+
```{r}
70+
"exemplos_de_aula/" |>
71+
fs::dir_ls(fail = FALSE) |>
72+
path_to_url() |>
73+
dplyr::select(Exemplo = url) |>
74+
knitr::kable()
75+
```
76+
## Práticas
77+
78+
```{r}
79+
"praticas/" |>
80+
fs::dir_ls(fail = FALSE) |>
81+
path_to_url() |>
82+
dplyr::select(Exemplo = url) |>
83+
knitr::kable()
84+
```
85+
86+
## Lição de casa
87+
88+
```{r}
89+
"exercicios/" |>
90+
fs::dir_ls(fail = FALSE) |>
91+
path_to_url() |>
92+
dplyr::select(Exercício = url) |>
93+
knitr::kable()
94+
```
95+
96+
97+
## Material extra
98+
99+
Referências extras relacionadas com o conteúdos das aulas, ou materiais que
100+
comentamos quando tiramos dúvidas (não necessariamente são relacionadas com o
101+
conteúdo da aula).
102+
103+
104+
```{r echo=FALSE, message=FALSE, warning=FALSE}
105+
arquivo_csv_materiais <- "extras.csv"
106+
if (file.exists(arquivo_csv_materiais)) {
107+
arquivo_csv_materiais |>
108+
readr::read_csv2(show_col_types = FALSE) |>
109+
knitr::kable()
110+
} else {
111+
cat("Em breve!")
112+
}
113+
```
114+
115+
## Redes sociais da Curso-R
116+
117+
- Youtube: https://www.youtube.com/c/CursoR6/featured
118+
119+
- Instagram: https://www.instagram.com/cursoo_r/
120+
121+
- Twitter: https://twitter.com/curso_r
122+
123+
- Linkedin: https://www.linkedin.com/company/curso-r/
124+
125+
- Facebook: https://www.facebook.com/cursodeR
126+
127+
```{r include = FALSE}
128+
# Criar arquivo _config.yml
129+
if (params$download_material == TRUE) {
130+
content <- glue::glue(
131+
"theme: jekyll-theme-minimal", "\n",
132+
"logo: assets/logo.png", "\n",
133+
"title: {params$nome_curso}", "\n",
134+
"show_downloads: true", "\n",
135+
"link_material: 'https://github.com/curso-r/{params$turma}/archive/refs/heads/main.zip'",
136+
"\n"
137+
)
138+
} else {
139+
content <- glue::glue(
140+
"theme: jekyll-theme-minimal", "\n",
141+
"logo: assets/logo.png", "\n",
142+
"title: {params$nome_curso}", "\n",
143+
"show_downloads: false", "\n"
144+
)
145+
}
146+
147+
readr::write_lines(content, "_config.yml")
148+
```

README.md

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
2+
<!-- README.md is generated from README.Rmd. Please edit that file -->
3+
4+
## Informações importantes
5+
6+
- [Clique
7+
aqui](https://github.com/curso-r/202102-intro-programacao/archive/refs/heads/main.zip)
8+
para baixar o material do curso.
9+
10+
- Nosso blog: <https://curso-r.com/blog/>
11+
12+
- Nosso fórum: <https://discourse.curso-r.com/>
13+
14+
- Nossos livros:
15+
16+
- [Ciência de Dados em R](https://livro.curso-r.com/)
17+
- [Zen do R](https://curso-r.github.io/zen-do-r/)
18+
- [Programando em
19+
Shiny](https://programando-em-shiny.curso-r.com/)
20+
- [Beautiful R](https://curso-r.github.io/beautiful-r/) (em
21+
inglês)
22+
23+
## Dúvidas
24+
25+
Fora do horário de aula ou monitoria:
26+
27+
- Perguntas gerais sobre o curso deverão ser feitas no Classroom.
28+
29+
- Perguntas sobre R, principalmente as que envolverem código, deverão
30+
ser enviadas no [nosso fórum](https://discourse.curso-r.com/).
31+
32+
## Slides
33+
34+
| Slide |
35+
|:------|
36+
37+
## Scripts utilizados em aula
38+
39+
| Exemplo |
40+
|:--------|
41+
42+
## Práticas
43+
44+
| Exemplo |
45+
|:--------|
46+
47+
## Lição de casa
48+
49+
| Exercício |
50+
|:----------|
51+
52+
## Material extra
53+
54+
Referências extras relacionadas com o conteúdos das aulas, ou materiais
55+
que comentamos quando tiramos dúvidas (não necessariamente são
56+
relacionadas com o conteúdo da aula).
57+
58+
#> Em breve!
59+
60+
## Redes sociais da Curso-R
61+
62+
- Youtube: <https://www.youtube.com/c/CursoR6/featured>
63+
64+
- Instagram: <https://www.instagram.com/cursoo_r/>
65+
66+
- Twitter: <https://twitter.com/curso_r>
67+
68+
- Linkedin: <https://www.linkedin.com/company/curso-r/>
69+
70+
- Facebook: <https://www.facebook.com/cursodeR>

_config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
theme: jekyll-theme-minimal
2+
logo: assets/logo.png
3+
title: ATUALIZANDO....
4+
show_downloads: true
5+
link_material: 'https://github.com/curso-r/202102-intro-programacao/archive/refs/heads/main.zip'

_layouts/default.html

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!DOCTYPE html>
2+
<html lang="{{ site.lang | default: "en-US" }}">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
8+
{% seo %}
9+
<link rel="stylesheet" href="{{ "/assets/css/style.css" | relative_url }}">
10+
<script src="https://code.jquery.com/jquery-3.3.0.min.js" integrity="sha256-RTQy8VOmNlT6b2PIRur37p6JEBZUE7o8wPgMvu18MC4=" crossorigin="anonymous"></script>
11+
<script src="{{ '/assets/js/main.js' | relative_url }}"></script>
12+
</head>
13+
<body>
14+
<div class="wrapper">
15+
<header>
16+
{% if site.logo %}
17+
<img src="{{site.logo | relative_url}}" alt="Logo" />
18+
{% endif %}
19+
20+
<p>{{ site.description | default: site.github.project_tagline }}</p>
21+
22+
{% if site.show_downloads %}
23+
<ul class="downloads">
24+
<li><a href="{{ site.link_material }}">Baixe o <strong>MATERIAL</strong></a></li>
25+
<li><a href="{{ site.github.repository_url }}">Veja no <strong>GitHub</strong></a></li>
26+
<li><a href="https://www.curso-r.com/cursos">Mais <strong>CURSOS</strong></a></li>
27+
</ul>
28+
{% endif %}
29+
30+
<div class = "toc">
31+
<nav>
32+
<ul></ul>
33+
</nav>
34+
</div>
35+
36+
37+
</header>
38+
<section>
39+
40+
<h1><a href="{{ "/" | absolute_url }}">{{ site.title | default: site.github.repository_name }}</a></h1>
41+
42+
{{ content }}
43+
44+
</section>
45+
<footer>
46+
<p><small>Hosted on GitHub Pages &mdash; Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
47+
</footer>
48+
</div>
49+
<script src="{{ "/assets/js/scale.fix.js" | relative_url }}"></script>
50+
{% if site.google_analytics %}
51+
<script>
52+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
53+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
54+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
55+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
56+
ga('create', '{{ site.google_analytics }}', 'auto');
57+
ga('send', 'pageview');
58+
</script>
59+
{% endif %}
60+
</body>
61+
</html>

0 commit comments

Comments
 (0)