Skip to content

Commit 739813c

Browse files
committed
doc(mkdocs): use mkdocs-github-admonitions-plugin
1 parent 0be4ab2 commit 739813c

4 files changed

Lines changed: 25 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ jobs:
2020
path: .cache
2121
restore-keys: |
2222
mkdocs-material-
23-
- run: pip install mkdocs-material
23+
- run: pip install mkdocs-material mkdocs-github-admonitions-plugin
2424
- run: mkdocs gh-deploy --force

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: docker check experiments coverage docker-test install depends install-make install-shell
1+
.PHONY: docker check experiments coverage docker-test install depends install-make install-shell mkdocs
22
check: .make/check
33
docker-test: .make/docker-test
44
docker: .make/docker
@@ -39,6 +39,9 @@ dryrun.exe: src/dryrun.c
3939
.make/:
4040
mkdir -p $@
4141

42+
mkdocs:
43+
uv tool run --with mkdocs-material --with mkdocs-github-admonitions-plugin mkdocs serve
44+
4245
## make install
4346
# move all exec files in top level to install directory (/usr/bin)
4447
# exclude those not useful outside of lncd server rhea

docs/tat2.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ Imagine a somewhat pathological file organization like
7171

7272
```
7373
sub_ses="sub-01/ses-01"
74-
censor_regex='s/.*func\/(.*)-preproc_bold.nii.gz/censor_files\/\1\/preproc_censor-fd0.3.1D/'
74+
censor_regex='s/.*func\/(.*)_desc-preproc_bold.nii.gz/censor_files\/\1\/preproc_censor-fd0.3.1D/'
7575
tat2 \
7676
-output "deriv/$sub_ses/func/${sub_ses//\//_}_space-MNI152NLin2009cAsym_tat2.nii.gz" \
77-
-mask_rel 's/preproc_bold.nii.gz/brain_mask.nii.gz/' \
77+
-mask_rel 's/desc-preproc_bold.nii.gz/brain_mask.nii.gz/' \
7878
-censor_rel "$censor_regex" \
7979
-median_time \
8080
-median_vol \
@@ -83,14 +83,22 @@ tat2 \
8383
deriv/$sub_ses/func/*space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
8484
```
8585

86-
* sibling mask files are matched using `-mask_rel 's/preproc_bold.nii.gz/brain_mask.nii.gz/'`
87-
1. searches each input file for `preproc_bold.nii.gz`
88-
2. and replaces that with `brain_maks.nii.gz`
89-
* to match censor files across directories, `censor_regex` uses `s/.*func\/(.*)-preproc_bold.nii.gz/censor_files\/\1\/preproc_censor-fd0.3.1D/`). Also see https://regex101.com/r/bM6p7X/1
90-
1. searches each input file for `.*func\/(.*)-preproc_bold.nii.gz`, where
91-
* `\/` "escapes" the directory slash, escape to distinguish it from the search-replace deliminator in `s///`
92-
* where `(.*)` captures the matching part to reuse as `\\1` in
93-
3. the replacement like `censor_files\/\1\/preproc_censor-fd0.3.1D`
86+
* sibling mask files are matched using `-mask_rel 's/desc-preproc_bold.nii.gz/brain_mask.nii.gz/'`
87+
```
88+
func/sub-1_ses-2_run-1_desc-preproc_bold.nii.gz # becomes
89+
func/sub-1_ses-2_run-1_desc-brain_mask.nii.gz
90+
```
91+
1. searches each input file for `desc-preproc_bold.nii.gz`
92+
2. and replaces that with `brain_maks.nii.gz`
93+
* to match censor files across directories, `censor_regex` uses `s/.*func\/(.*)_desc-preproc_bold.nii.gz/censor_files\/\1\/preproc_censor-fd0.3.1D/`). Also see https://regex101.com/r/bM6p7X/1
94+
```
95+
func/sub-1_ses-2_run-1_desc-preproc_bold.nii.gz # becomes
96+
censor_files/sub-1_ses-2_run-1/preproc_censor-fd0.3.1D
97+
```
98+
1. searches each input file for `.*func\/(.*)_desc-preproc_bold.nii.gz`, where
99+
* `\/` "escapes" the directory slash, escape to distinguish it from the search-replace deliminator in `s///`
100+
* where `(.*)` captures the matching part to reuse as `\\1` in
101+
3. the replacement like `censor_files\/\1\/preproc_censor-fd0.3.1D`
94102

95103
Also see [issue#5](https://github.com/lncd/lncdtools/issues/5).
96104

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ markdown_extensions:
1717
pygments_lang_class: true
1818
- pymdownx.inlinehilite
1919

20+
plugins:
21+
- gh-admonitions

0 commit comments

Comments
 (0)