Skip to content

Commit

Permalink
added some handy scripts to convert some test data to ipynb/rmd
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyBRoswell committed Dec 15, 2024
1 parent 83fcf1b commit ef0b9f3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions vreapis/tests/extract-notebook.ps1
Original file line number Diff line number Diff line change
@@ -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' {

}
}
}

0 comments on commit ef0b9f3

Please sign in to comment.