diff options
| author | Lexi Winter <lexi@le-fay.org> | 2025-06-29 19:25:29 +0100 |
|---|---|---|
| committer | Lexi Winter <lexi@le-fay.org> | 2025-06-29 19:25:29 +0100 |
| commit | bc524d70253a4ab2fe40c3ca3e5666e267c0a4d1 (patch) | |
| tree | 1e629e7b46b1d9972a973bc93fd100bcebd395be /tools/scripts/updateDocumentSnippets.py | |
| download | nihil-548ea226e1944e077d3ff305df43ef6b366b03f4.tar.gz nihil-548ea226e1944e077d3ff305df43ef6b366b03f4.tar.bz2 | |
import catch2 3.8.1vendor/catch2/3.8.1vendor/catch2
Diffstat (limited to 'tools/scripts/updateDocumentSnippets.py')
| -rwxr-xr-x | tools/scripts/updateDocumentSnippets.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/scripts/updateDocumentSnippets.py b/tools/scripts/updateDocumentSnippets.py new file mode 100755 index 0000000..a070eea --- /dev/null +++ b/tools/scripts/updateDocumentSnippets.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 + +from scriptCommon import catchPath +import os +import subprocess + +# --------------------------------------------------- +# Update code examples +# --------------------------------------------------- +# For info on mdsnippets, see https://github.com/SimonCropp/MarkdownSnippets + +# install dotnet SDK from http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409 +# Then install MarkdownSnippets.Tool with +# dotnet tool install -g MarkdownSnippets.Tool +# To update: +# dotnet tool update -g MarkdownSnippets.Tool +# To uninstall (e.g. to downgrade to a lower version) +# dotnet tool uninstall -g MarkdownSnippets.Tool + +os.chdir(catchPath) + +subprocess.run('dotnet tool update -g MarkdownSnippets.Tool --version 21.2.0', shell=True, check=True) +subprocess.run('mdsnippets', shell=True, check=True) |
