diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ec491cc..af10342 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -53,7 +53,7 @@ pages: - mv docs/build public/dev - ls docs/src -R - mkdir -p public/notebooks - - mv docs/src/assets/*.html public/notebooks + - cp docs/src/notebooks/* public/notebooks artifacts: paths: - public diff --git a/CHANGELOG.md b/CHANGELOG.md index bbc0b16..9d95a03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - `create_database`(formally `create_database_from_exported_csvs`) now can save a JLD2 cache to store parsed slave logs. +- Docs: add index page for published notebooks ### Changed diff --git a/README.md b/README.md index 1338cd7..f0db0f4 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,4 @@ PS Boardに関する(特にQAQCの結果に関する)データベース。 PS Board QAQCに関しては[こちら](https://gitlab.cern.ch/dhashimo/PS_Board_QAQC) -解析結果の例 -- 結果一覧閲覧用簡易アプリケーション: https://psboard-database.docs.cern.ch/notebooks/get_results.html -- skewに関する統計調査: https://psboard-database.docs.cern.ch/notebooks/skew_stats.html -- power試験に関する統計: https://psboard-database.docs.cern.ch/notebooks/power_stats.html +解析結果の例は[notebooks](https://psboard-database.docs.cern.ch/notebooks)を参照。 diff --git a/docs/make_notebook_index.jl b/docs/make_notebook_index.jl new file mode 100644 index 0000000..0e65dda --- /dev/null +++ b/docs/make_notebook_index.jl @@ -0,0 +1,26 @@ +using Markdown + +cd("src/notebooks/") do + contents = + map(readdir() |> filter(!=(".gitignore")) |> filter(!=("index.html"))) do file + last_updated = let + cmdout = + read(`git log $file`, String) |> + IOBuffer |> + eachline |> + Iterators.Stateful + @assert popfirst!(cmdout) |> startswith("commit") + @assert popfirst!(cmdout) |> startswith("Author") + dateline = popfirst!(cmdout) + chopprefix(dateline, "Date:") |> strip + end + "- [`$file`]($file) (last updated: $last_updated)" + end |> (v -> join(v, '\n')) + index_content = Markdown.parse(""" + # notebooks + $(contents) + """) + open("index.html", "w") do f + show(f, MIME"text/html"(), index_content) + end +end diff --git a/docs/src/notebooks/.gitignore b/docs/src/notebooks/.gitignore new file mode 100644 index 0000000..dcaf716 --- /dev/null +++ b/docs/src/notebooks/.gitignore @@ -0,0 +1 @@ +index.html diff --git a/docs/src/assets/get_results.html b/docs/src/notebooks/get_results.html similarity index 100% rename from docs/src/assets/get_results.html rename to docs/src/notebooks/get_results.html diff --git a/docs/src/assets/pllld_count.html b/docs/src/notebooks/pllld_count.html similarity index 100% rename from docs/src/assets/pllld_count.html rename to docs/src/notebooks/pllld_count.html diff --git a/docs/src/assets/power_stats.html b/docs/src/notebooks/power_stats.html similarity index 100% rename from docs/src/assets/power_stats.html rename to docs/src/notebooks/power_stats.html diff --git a/docs/src/assets/ppconfig_error_analysis.html b/docs/src/notebooks/ppconfig_error_analysis.html similarity index 100% rename from docs/src/assets/ppconfig_error_analysis.html rename to docs/src/notebooks/ppconfig_error_analysis.html diff --git a/docs/src/assets/skew_stats.html b/docs/src/notebooks/skew_stats.html similarity index 100% rename from docs/src/assets/skew_stats.html rename to docs/src/notebooks/skew_stats.html