Add summary pages for hosted notebooks

This commit is contained in:
Wataru Otsubo 2025-01-26 10:37:42 +01:00
parent 2bab455089
commit d1ff3aed23
10 changed files with 30 additions and 5 deletions

View file

@ -53,7 +53,7 @@ pages:
- mv docs/build public/dev - mv docs/build public/dev
- ls docs/src -R - ls docs/src -R
- mkdir -p public/notebooks - mkdir -p public/notebooks
- mv docs/src/assets/*.html public/notebooks - cp docs/src/notebooks/* public/notebooks
artifacts: artifacts:
paths: paths:
- public - public

View file

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
- `create_database`(formally `create_database_from_exported_csvs`) now can save a JLD2 cache to store parsed slave logs. - `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 ### Changed

View file

@ -9,7 +9,4 @@ PS Boardに関する(特にQAQCの結果に関する)データベース。
PS Board QAQCに関しては[こちら](https://gitlab.cern.ch/dhashimo/PS_Board_QAQC) PS Board QAQCに関しては[こちら](https://gitlab.cern.ch/dhashimo/PS_Board_QAQC)
解析結果の例 解析結果の例は[notebooks](https://psboard-database.docs.cern.ch/notebooks)を参照。
- 結果一覧閲覧用簡易アプリケーション: 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

View file

@ -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

1
docs/src/notebooks/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
index.html