From ef0b9f37f65993c6ba41fda52dd4b91861281943 Mon Sep 17 00:00:00 2001 From: Andy Bayer Roswell Date: Sun, 15 Dec 2024 15:50:29 +0100 Subject: [PATCH] added some handy scripts to convert some test data to ipynb/rmd --- vreapis/tests/extract-notebook.ps1 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 vreapis/tests/extract-notebook.ps1 diff --git a/vreapis/tests/extract-notebook.ps1 b/vreapis/tests/extract-notebook.ps1 new file mode 100644 index 0000000..d9e5fd2 --- /dev/null +++ b/vreapis/tests/extract-notebook.ps1 @@ -0,0 +1,15 @@ +param( + [System.IO.FileInfo[]]$input_files, + [System.IO.FileInfo]$output_dir +) +New-Item -i Directory -f $output_dir +foreach ($input_file in $input_files) { + $root = ConvertFrom-Json (Get-Content -raw $input_file) -d 100 + ConvertTo-Json $root.data.notebook -d 100 > $output_dir/$($input_file.BaseName).ipynb + switch ($root.data.kernel) { + 'ipython' {} + 'IRkernel' { + + } + } +}