Skip to content

Commit d53409b

Browse files
committed
added useful features to getting started section
1 parent 0f8cc75 commit d53409b

22 files changed

Lines changed: 84 additions & 6 deletions

.DS_Store

0 Bytes
Binary file not shown.

celbridge-docs.celbridge

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ dependencies = [
1313
]
1414

1515
[celbridge]
16-
version = "0.1.4.0"
16+
celbridge-version = "0.2.0"

celbridge/.DS_Store

6 KB
Binary file not shown.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"_entityVersion": 1,
3+
"_components": [
4+
{
5+
"editorMode": "Editor",
6+
"_type": "Markdown.Markdown#1"
7+
}
8+
]
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"_entityVersion": 1,
3+
"_components": [
4+
{
5+
"editorMode": "Editor",
6+
"_type": "Markdown.Markdown#1"
7+
}
8+
]
9+
}

docs/.DS_Store

0 Bytes
Binary file not shown.

docs/02_setup/.DS_Store

0 Bytes
Binary file not shown.

docs/03_getting_started/.DS_Store

0 Bytes
Binary file not shown.

docs/03_getting_started/console.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ It also offers a range of commands for running CLI programs, available using the
7575
7676
### IPython built-in "magic" `%` commands
7777
78-
IPython offers a range of commands for running CLI programs, available using the percent "`%`" character. Examples including:
78+
IPython offers a range of commands for running CLI programs, available using the percent "`%`" character. Automagic mode is switched on by default, so in almost all cases you can omit the percent "`%`" character, since IPython will saerch its list of magic commands to match against what you have typed.
7979
80-
1. Print Working Direcotry (`pwd`):
80+
Examples including:
81+
82+
1. Print Working Direcotry (`%pwd` or `pwd`):
8183
8284
> ```
8385
> >>> %pwd
@@ -87,7 +89,7 @@ IPython offers a range of commands for running CLI programs, available using the
8789
> ```
8890
8991
90-
1. Change Direcotry (`cd`):
92+
1. Change Direcotry (`%cd` or `cd`):
9193
9294
> ```
9395
> >>> %pwd
@@ -102,10 +104,38 @@ IPython offers a range of commands for running CLI programs, available using the
102104
> >>>
103105
> ```
104106
107+
1. History of terminal commands (`%history` or `history`)
108+
109+
> ```
110+
> >>> history
111+
> pwd
112+
> cd docs
113+
> !make clean
114+
> !make html
115+
> !python3 -m http.server 8000 --directory _build\html
116+
> history
117+
> ```
105118
106119
The IPython documentation pages provide
107120
a [full list of the magic commands](https://ipython.readthedocs.io/en/stable/interactive/magics.html)
108121
122+
### IPython `.ipy` files
123+
124+
If there are several commands you often type in the same sequence, or have commands with many arguments, you can type those commands into a text file with the `.ipy` extension, and then run the sequence of commands in that file at the terminal with:
125+
126+
> ```
127+
> >>> run <filename>.ipy
128+
> ```
129+
130+
For example, when working with Sphinx I often wish to run `!make clean` immediately before running `!make html`. So I could create a file `make.ipy` containing these commands:
131+
132+
> ```
133+
> !make clean
134+
> !make html
135+
> ```
136+
137+
And then I can run them by entering `run make.ipy` in the console.
138+
109139
110140
Learn more about REPLs and this console at:
111141

docs/03_getting_started/examples.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
Each Celbridge release includes an example project that demonstrates the core features of Celbridge. Access this example project as follows:
44

55
1. Launch Celbridge.
6-
2. From the home menu, click `New example project`.
6+
2. From the home menu, click `New project`.
7+
3. Select eh Examples template.
8+
4. Choose a suitable folder and project name.
9+
5. Click Create.
710

811
:::{note}
912
If an existing project opens instead of the home menu, click the home button in the navigation bar to the left of the explorer panel.
@@ -13,7 +16,14 @@ If an existing project opens instead of the home menu, click the home button in
1316
4. Celbridge will generate a new example project. Each folder in this project contains an example of a core feature of Celbridge. For example, the `01_markdown` folder demonstrates how to work with Markdown files.
1417
5. To get started with each feature, see the `readme.md` files contained in the example folders.
1518

16-
```{image} /images/new_examples_project.png
19+
```{image} /03_getting_started/images/examples.png
1720
:alt: Screenshot showing Python version and extensions in .celbridge configuration
1821
: file
1922
```
23+
24+
You should now have a proejct with several examples, each in their own directories:
25+
```{image} /03_getting_started/images/new_examples_project.png
26+
:alt: Screenshot showing Celbridge project containing examples
27+
: file
28+
```
29+

0 commit comments

Comments
 (0)