Skip to content

Commit cd71322

Browse files
committed
Adds more examples to the CLI
1 parent 45c8997 commit cd71322

4 files changed

Lines changed: 226 additions & 115 deletions

File tree

docs/notebook/correct_nbconvert.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
with open('tutorial.rst', 'r') as file:
2+
contents: str = file.read()
3+
4+
contents: str = contents.replace('ipython3', 'python3')
5+
contents: str = contents.replace('python3\n\n !', 'none\n\n !')
6+
contents: str = contents.replace('! ', '% ')
7+
8+
with open('tutorial.rst', 'w') as file:
9+
file.write(contents)
10+

docs/notebook/to-rst.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Note this will only work if pandoc is installed separately via "sudo dnf install pandoc"
22
jupyter nbconvert --to rst tutorial.ipynb
3-
sed -i -e 's/! /% /g' tutorial.rst
3+
python3 correct_nbconvert.py
44
mv tutorial.rst ../tutorial.rst

0 commit comments

Comments
 (0)