├── code └── .gitkeep ├── data └── .gitkeep ├── fig └── .gitkeep ├── _episodes ├── .gitkeep ├── 03-advanced.md ├── 02-markdown.md └── 01-mess.md ├── _extras ├── .gitkeep ├── about.md ├── figures.md ├── discuss.md ├── guide.md └── design.md ├── files └── .gitkeep ├── _episodes_rmd ├── .gitkeep └── data │ └── .gitkeep ├── _includes ├── all_figures.html ├── github-ribbon.html ├── episode_break.html ├── main_title.html ├── episode_keypoints.html ├── javascript.html ├── workshop_footer.html ├── all_keypoints.html ├── lesson_footer.html ├── head.html ├── header.html ├── workshop_ad.html ├── episode_overview.html ├── footer.html ├── carpentries.html ├── episode_title.html ├── syllabus.html └── navbar.html ├── requirements.txt ├── .update-copyright.conf ├── reference.md ├── _layouts ├── page.html ├── reference.html ├── lesson.html ├── break.html ├── episode.html ├── base.html └── workshop.html ├── favicon-dc.ico ├── .gitignore ├── favicon-swc.ico ├── setup.md ├── assets ├── img │ ├── swc-logo-blue.png │ ├── swc-logo-white.png │ ├── swc-icon-blue.svg │ ├── dc-icon-black.svg │ └── swc-logo-blue.svg ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── js │ └── lesson.js └── css │ └── lesson.scss ├── bin ├── check_knitr_version.R ├── knit_lessons.sh ├── markdown_ast.rb ├── test_lesson_check.py ├── filters │ ├── id4glossary.py │ └── blockquote2div.py ├── generate_md_episodes.R ├── chunk-options.R ├── setup-labels ├── extract_figures.py ├── repo_check.py ├── util.py ├── validation_helpers.py ├── lesson_initialize.py ├── workshop_check.py └── lesson_check.py ├── AUTHORS ├── README.md ├── index.md ├── .mailmap ├── CONDUCT.md ├── _config.yml ├── LICENSE.md ├── Makefile └── CONTRIBUTING.md /code/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fig/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_episodes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_extras/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /files/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_episodes_rmd/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_episodes_rmd/data/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_includes/all_figures.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | PyYAML 2 | -------------------------------------------------------------------------------- /.update-copyright.conf: -------------------------------------------------------------------------------- 1 | [project] 2 | vcs: Git 3 | 4 | [files] 5 | authors: yes 6 | files: no 7 | -------------------------------------------------------------------------------- /reference.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: reference 3 | permalink: /reference/ 4 | --- 5 | FIXME: fill in 6 | -------------------------------------------------------------------------------- /_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: base 3 | --- 4 | {% include main_title.html %} 5 | {{content}} 6 | -------------------------------------------------------------------------------- /favicon-dc.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swcarpentry/modern-scientific-authoring/HEAD/favicon-dc.ico -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *~ 3 | .DS_Store 4 | .ipynb_checkpoints 5 | .sass-cache 6 | __pycache__ 7 | _site 8 | -------------------------------------------------------------------------------- /favicon-swc.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swcarpentry/modern-scientific-authoring/HEAD/favicon-swc.ico -------------------------------------------------------------------------------- /setup.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Setup 4 | permalink: /setup/ 5 | --- 6 | FIXME: setup instructions. 7 | -------------------------------------------------------------------------------- /_includes/github-ribbon.html: -------------------------------------------------------------------------------- 1 | Find us on GitHub 2 | -------------------------------------------------------------------------------- /_extras/about.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: About 4 | permalink: /about/ 5 | --- 6 | {% include carpentries.html %} 7 | -------------------------------------------------------------------------------- /_extras/figures.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Figures 4 | permalink: /figures/ 5 | --- 6 | {% include all_figures.html %} 7 | -------------------------------------------------------------------------------- /_layouts/reference.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: "Reference" 4 | --- 5 | {% include all_keypoints.html %} 6 | {{content}} 7 | -------------------------------------------------------------------------------- /assets/img/swc-logo-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swcarpentry/modern-scientific-authoring/HEAD/assets/img/swc-logo-blue.png -------------------------------------------------------------------------------- /assets/img/swc-logo-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swcarpentry/modern-scientific-authoring/HEAD/assets/img/swc-logo-white.png -------------------------------------------------------------------------------- /_extras/discuss.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Discussion 4 | permalink: /discuss/ 5 | --- 6 | FIXME: links to other material. 7 | -------------------------------------------------------------------------------- /_layouts/lesson.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: base 3 | --- 4 | {% include main_title.html %} 5 | {{ content }} 6 | {% include syllabus.html %} 7 | -------------------------------------------------------------------------------- /_extras/guide.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: "Instructors' Guide" 4 | permalink: /guide/ 5 | --- 6 | FIXME: fill in instructors' guide. 7 | -------------------------------------------------------------------------------- /_layouts/break.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: base 3 | --- 4 | {% include episode_title.html %} 5 | {% include episode_break.html %} 6 | {{content}} 7 | -------------------------------------------------------------------------------- /_includes/episode_break.html: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Display information about a break. 3 | {% endcomment %} 4 |
Break: {{page.break}} min
5 | -------------------------------------------------------------------------------- /_includes/main_title.html: -------------------------------------------------------------------------------- 1 |2 |9 | -------------------------------------------------------------------------------- /bin/check_knitr_version.R: -------------------------------------------------------------------------------- 1 | if (require("knitr")) { 2 | if (packageVersion("knitr") < '1.9.19') { 3 | stop("knitr must be version 1.9.20 or higher") 4 | } 5 | } else stop("knitr 1.9.20 or above is needed to build the lessons.") 6 | -------------------------------------------------------------------------------- /bin/knit_lessons.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Only try running R to translate files if there are some files present. 4 | # The Makefile passes in the names of files. 5 | 6 | if [ $# -ne 0 ] ; then 7 | Rscript -e "source('bin/generate_md_episodes.R')" 8 | fi 9 | -------------------------------------------------------------------------------- /bin/markdown_ast.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | # Use Kramdown parser to produce AST for Markdown document. 4 | 5 | require "kramdown" 6 | require "json" 7 | 8 | markdown = STDIN.read() 9 | doc = Kramdown::Document.new(markdown) 10 | tree = doc.to_hash_a_s_t 11 | puts JSON.pretty_generate(tree) 12 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | James Allen 2 | Piotr Banaszkiewicz 3 | Trevor Bekolay 4 | John Blischak 5 | Andy Boughton 6 | Abigail Cabunoc Mayes 7 | Rémi Emonet 8 | Michael Hansen 9 | Mike Jackson 10 | W. Trevor King 11 | François Michonneau 12 | Bill Mills 13 | Aaron O'Leary 14 | Jon Pipitone 15 | Timothée Poisot 16 | Raniere Silva 17 | Greg Wilson 18 | -------------------------------------------------------------------------------- /_includes/javascript.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /_includes/workshop_footer.html: -------------------------------------------------------------------------------- 1 |Key Points
3 |4 | {% for keypoint in page.keypoints %} 5 |
8 |- {{ keypoint|markdownify }}
6 | {% endfor %} 7 |
| 10 | {{ episode.title }} 11 | | 12 |
13 |
|
19 |
{{page.humandate}}
8 |{% if page.humantime %}{{page.humantime}}{% endif %}
9 |12 | Instructors: 13 | {% if page.instructor %} 14 | {{page.instructor | join: ', ' %}} 15 | {% else %} 16 | to be announced. 17 | {% endif %} 18 |
19 | {% if page.helper %} 20 |21 | Helpers: 22 | {{page.helper | join: ', ' %}} 23 |
24 | {% endif %} 25 |5 |37 | -------------------------------------------------------------------------------- /bin/filters/id4glossary.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Pandoc filter to convert add ids to glossary entries. 3 | 4 | Usage: 5 | 6 | pandoc source.md --filter=id4glossary.py --output=output.html 7 | """ 8 | import pandocfilters as pf 9 | 10 | def normalize_keyword(keyword): 11 | """Normalize keyword for became id 12 | 13 | - Replace white space with '-' 14 | - Convert to lowercase""" 15 | return keyword.lower().replace(' ', '-') 16 | 17 | def keyword2html(keyword_node): 18 | """Return HTML version of keyword with id.""" 19 | keyword = pf.stringify(keyword_node) 20 | id = normalize_keyword(keyword) 21 | return [{"t": "Span", 22 | "c": [[id, [],[]], 23 | keyword_node]}] 24 | 25 | def id4glossary(key, value, format, meta): 26 | """Add id to keywords at glossary.""" 27 | if key == "DefinitionList": 28 | for definition in value: 29 | definition[0] = keyword2html(definition[0]) 30 | return {"t": key, 31 | "c": value} 32 | 33 | if __name__ == '__main__': 34 | pf.toJSONFilter(id4glossary) 35 | -------------------------------------------------------------------------------- /assets/js/lesson.js: -------------------------------------------------------------------------------- 1 | // Make all tables striped by default. 2 | $("table").addClass("table table-striped"); 3 | 4 | 5 | // Handle foldable challenges and solutions (on click and at start). 6 | $(".challenge,.discussion,.solution").click(function(event) { 7 | var trigger = $(event.target).has(".fold-unfold").size() > 0 8 | || $(event.target).filter(".fold-unfold").size() > 0; 9 | if (trigger) { 10 | $(">*:not(h2)", this).toggle(400); 11 | $(">h2>span.fold-unfold", this).toggleClass("glyphicon-collapse-down glyphicon-collapse-up"); 12 | event.stopPropagation(); 13 | } 14 | }); 15 | $(".challenge,.discussion,.solution").each(function() { 16 | $(">*:not(h2)", this).toggle(); 17 | var h2 = $("h2:first", this); 18 | h2.append(""); 19 | }); 20 | 21 | 22 | // Handle searches. 23 | // Relies on document having 'meta' element with name 'search-domain'. 24 | function google_search() { 25 | var query = document.getElementById("google-search").value; 26 | var domain = $("meta[name=search-domain]").attr("value"); 27 | window.open("https://www.google.com/search?q=" + query + "+site:" + domain); 28 | } 29 | -------------------------------------------------------------------------------- /_includes/footer.html: -------------------------------------------------------------------------------- 1 |Overview
6 | 7 |8 |22 | 23 |9 | Teaching: {{ page.teaching }} min 10 | 11 | Exercises: {{ page.exercises }} min 12 |13 |14 | Questions 15 |21 |16 | {% for question in page.questions %} 17 |
20 |- {{ question|markdownify }}
18 | {% endfor %} 19 |24 |35 | 36 |25 |26 |27 | Objectives 28 |34 |29 | {% for objective in page.objectives %} 30 |
33 |- {{ objective|markdownify }}
31 | {% endfor %} 32 |
| {% endif %} 24 | | {% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }} | 25 |Finish | 26 |27 | |
| {% if episode.start %}Day {{ day }}{% endif %} | {% endif %} 35 |{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }} | 36 |37 | {{ episode.title }} 38 | | 39 |
40 | {% if episode.break %}
41 | Break
42 | {% else %}
43 | {% if episode.questions %}
44 | {% for question in episode.questions %}
45 | {{question|markdownify|strip_html}}
46 | {% unless forloop.last %}
47 | 48 | {% endunless %} 49 | {% endfor %} 50 | {% endif %} 51 | {% endif %} 52 | |
53 |
| {% endif %} 60 | | {% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }} | 61 |Finish | 62 |63 | |