From e49d0ded681cf09c8b44d9172886e4ae1f1ef5e7 Mon Sep 17 00:00:00 2001 From: Bart Schilperoort Date: Tue, 8 Aug 2023 08:40:46 +0200 Subject: [PATCH] Update docs, add syntax highlighting --- docs/index.md | 10 ++++++++++ docs/using_zampy.md | 14 ++++++++------ mkdocs.yml | 17 ++++++++++++++++- 3 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 docs/index.md diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..f919fef --- /dev/null +++ b/docs/index.md @@ -0,0 +1,10 @@ +# Zampy + +A tool for downloading Land Surface Model input data. + +### Name origin + +Named after *Zam*; [the Avestan language term for the Zoroastrian concept of "earth"](https://en.wikipedia.org/wiki/Zam). + +## How to use Zampy +See the section ["using Zampy"](using_zampy.md). diff --git a/docs/using_zampy.md b/docs/using_zampy.md index f6d5bcc..ca297b7 100644 --- a/docs/using_zampy.md +++ b/docs/using_zampy.md @@ -2,7 +2,7 @@ ## Installing Zampy Zampy can be installed by doing: -```sh +```bash pip install zampy git+https://github.com/EcoExtreML/zampy ``` @@ -13,19 +13,18 @@ This file is created under your -*user's home*-/.config directory: `~/.config/zampy/zampy_config.yml` -```yml +```yaml working_directory: /home/bart/Zampy - ``` ## Formulating a recipe Recipes have the following structure: -```yml +```yaml name: "test_recipe" download: - years: [2019, 2020] + years: [2020, 2020] bbox: [54, 6, 50, 3] # NESW datasets: @@ -33,6 +32,9 @@ download: variables: - 10m_v_component_of_wind - surface_pressure + eth_canopy_height: + variables: + - height_of_vegetation convert: convention: ALMA @@ -45,7 +47,7 @@ You can specify multiple datasets and multiple variables per dataset. ## Running a recipe Save this recipe to disk and run the following code in your shell: -```sh +```bash zampy --filename /home/username/path_to_file/simple_recipe.yml ``` diff --git a/mkdocs.yml b/mkdocs.yml index f54197d..17d0134 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,11 +2,17 @@ site_name: Zampy Documentation theme: name: material + highlightjs: true + hljs_languages: + - yaml + - python + - bash features: - navigation.instant - navigation.tabs - navigation.tabs.sticky - + - content.code.copy + palette: # Palette toggle for light mode - scheme: default @@ -38,5 +44,14 @@ plugins: merge_init_into_class: yes show_submodules: no +markdown_extensions: + - pymdownx.highlight: + anchor_linenums: true + line_spans: __span + pygments_lang_class: true + - pymdownx.inlinehilite + - pymdownx.snippets + - pymdownx.superfences + extra: generator: false