Skip to content

Commit a4eada9

Browse files
committed
Add section on creating a PS NB using the DSL
1 parent 0a7da2d commit a4eada9

File tree

2 files changed

+9
-38
lines changed

2 files changed

+9
-38
lines changed

README.md

Lines changed: 9 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ It creates two code blocks and a markdown block, and saves it to a file `C:\Temp
3333

3434
```powershell
3535
New-PSNotebook -NoteBookName c:\temp\test.ipynb {
36-
Add-NotebookCode "8+12"
37-
Add-NotebookCode "8+3"
36+
Add-NotebookCode '$a=8'
37+
Add-NotebookCode '$a+12'
38+
Add-NotebookCode '$a+3'
3839
Add-NotebookMarkdown @'
3940
## Math
4041
@@ -45,39 +46,9 @@ New-PSNotebook -NoteBookName c:\temp\test.ipynb {
4546
4647
```
4748

48-
## Result - A PowerShell Notebook
49-
50-
You can do a `Get-Content c:\temp\test.ipynb`, here is the result.
51-
52-
```json
53-
{
54-
"metadata": {
55-
"kernelspec": {
56-
"name": "powershell",
57-
"display_name": "PowerShell"
58-
},
59-
"language_info": {
60-
"name": "powershell",
61-
"codemirror_mode": "shell",
62-
"mimetype": "text/x-sh",
63-
"file_extension": ".ps1"
64-
}
65-
},
66-
"nbformat_minor": 2,
67-
"nbformat": 4,
68-
"cells": [
69-
{
70-
"cell_type": "code",
71-
"source": "8+12"
72-
},
73-
{
74-
"cell_type": "code",
75-
"source": "8+3"
76-
},
77-
{
78-
"cell_type": "markdown",
79-
"source": "## Math\n\n- show addition\n- show other"
80-
}
81-
]
82-
}
83-
```
49+
### Open the PowerShell Notebook in Azure Data Studio
50+
51+
You can open `c:\temp\test.ipynb` in Azure Data Studio and click `Run Cells`
52+
53+
![image](./media/CreateNotebookUsingTheDSL.png)
54+
22.2 KB
Loading

0 commit comments

Comments
 (0)