Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • generic-software-skills/lecture-materials
  • m301114/lecture-materials
2 results
Show changes
Commits on Source (9)
...@@ -2,4 +2,6 @@ ...@@ -2,4 +2,6 @@
index.html index.html
index_files/ index_files/
.jupyter_cache .jupyter_cache
public/ public/
\ No newline at end of file /.quarto/
/summary.qmd
...@@ -3,7 +3,7 @@ variables: ...@@ -3,7 +3,7 @@ variables:
BASENAME: index # name of main .qmd file BASENAME: index # name of main .qmd file
before_script: before_script:
- python -V # Print out python version for debugging - python3 -V # Print out python version for debugging
pages: pages:
tags: tags:
...@@ -15,10 +15,9 @@ pages: ...@@ -15,10 +15,9 @@ pages:
script: script:
- wget "https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.deb" - wget "https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.deb"
- dpkg -i quarto-${QUARTO_VERSION}-linux-amd64.deb - dpkg -i quarto-${QUARTO_VERSION}-linux-amd64.deb
- pip install jupyter - python3 -m pip install -r requirements.txt
- quarto check install - quarto check install
- quarto check jupyter - quarto check jupyter
- pip install -r requirements.txt
- ./make_presentations - ./make_presentations
artifacts: artifacts:
paths: paths:
......
project:
type: website
pre-render: scripts/prepare.py
output-dir: public
website:
title: "Generic Software Skills"
navbar:
left:
- href: index.qmd
text: Home
- summary.qmd
sidebar:
search: true
contents:
- section: "Lectures"
contents: "lectures/*/index.qmd"
format:
html:
theme: cosmo
css: styles.css
toc: true
name: software-skills
channels:
- conda-forge
dependencies:
- python=3.12
- quarto
- pip
- pip:
- -r requirements.txt
---
title: "Generic Software Skills"
---
format:
revealjs:
transition: slide
slide-number: true
code-background: true
logo: ../../static/logos.png
footer: "Generic software Skills"
theme: [default, custom.scss]
chalkboard:
buttons: true
navigation-mode: linear
auto-stretch: true
center: true
mermaid:
theme: default
jupyter: python3
execute:
cache: true
File moved
--- ---
title: "Example lecture" title: "Example lecture"
author: "Tobias Kölling, Florian Ziemen, and the teams at MPI-M and DKRZ" author: "Tobias Kölling, Florian Ziemen, and the teams at MPI-M and DKRZ"
format:
revealjs:
transition: slide
slide-number: true
code-background: true
logo: static/logos.png
footer: "Generic software Skills"
theme: [default, custom.scss]
chalkboard:
buttons: true
navigation-mode: linear
auto-stretch: true
center: true
mermaid:
theme: default
jupyter: python3
execute:
cache: true
--- ---
# Preface # Preface
......
#!/bin/bash #!/bin/bash
quarto render
for filename in */index.qmd ; do
folder=$(dirname "${filename}")
quarto render "${filename}"
outdir=public/"${folder}"
mkdir -p "${outdir}"
cp "${filename/.qmd/.html}" "${outdir}"
cp -R ${filename/.qmd/}_files "${outdir}"
cp -R ${folder}/static ${outdir}/
done
import glob
import logging
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)
# But you can use your content.
def parse_file(filename):
logging.debug(f'opening {filename}')
with open(filename) as f:
lines = f.readlines()
titles = [ f"# {x[6:].strip()[1:-1]}\n" for x in lines if x.startswith("title:")]
entries = titles + [ f"#{x}" for x in lines if x[0] == "#" ]
entries = [ f'* {x[4:]}' if x[:4]=="###" else x for x in entries ]
return entries
summery_header = """---
title: "Lecture Overview"
---
"""
def generate_summary():
files = glob.glob("lectures/*/index.qmd")
all_entries = [ ]
for x in files:
all_entries.extend(parse_file(x))
with open("summary.qmd", "w") as outfile:
outfile.write(summery_header)
outfile.writelines(all_entries)
def main():
generate_summary()
if __name__ == "__main__":
exit(main())
File moved
/* css styles */