Skip to content

Commit 68cba60

Browse files
committed
docs: improve readme
1 parent 0ebeb53 commit 68cba60

1 file changed

Lines changed: 12 additions & 17 deletions

File tree

README.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
</div>
99

10-
This plugin allows you to execute code snippets in code blocks in your notes. The plugin adds a 'run' button for code blocks in supported languages. Clicking them results in the code of the block being executed locally. After the execution the result of the execution is showed. An interactive input element is created when your code snippets reads expects user input.
10+
This plugin allows you to execute code snippets in code blocks in your notes. The plugin adds a 'run' button for code blocks in supported languages. Clicking them results in the code of the block being executed locally. After the execution the result of the execution is shown. An interactive input element is created when your code snippets reads expects user input.
1111

1212
The result is shown only after the execution is finished. It is not possible to enter text on the command line into the executed program now.
1313

@@ -33,7 +33,7 @@ Take a look at the [changelog](CHANGELOG.md) to see what has changed in recent v
3333
<br>
3434
<div align='center'>
3535

36-
If you like this plugin and use it a lot, please consider supporting me in continuing the development of this plugin. You can also sponsor a new feature or language integration directly, if you want to speed-up the development for a specific feature you need.
36+
If you like this plugin and use it a lot, please consider supporting me in continuing the development of this plugin. You can also sponsor a new feature or language integration directly, if you want to speed up the development for a specific feature you need.
3737

3838
[![GitHub Sponsors](https://img.shields.io/badge/sponsor-30363D?style=for-the-badge&logo=GitHub-Sponsors&logoColor=white)](https://github.com/sponsors/twibiral) [![Buy me a coffee](https://img.shields.io/badge/Buy_Me_A_Coffee-FFDD00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/timwibiral)
3939

@@ -76,8 +76,8 @@ hello("Bob")
7676
<details>
7777
<summary>TypeScript</summary>
7878

79-
- Requirements: Node.js installed then run in command line `npm install typescript -g` and `npm install ts-node -g`. (`-g` means global install)
80-
- Problems: If you use your global node.js installation and it doesn't work try to set your `ts-node` path in the settings to `npx ts-node` instead of `ts-node`.
79+
- Requirements: Node.js installed then run in command line `npm install typescript -g` and `npm install ts-node -g`. (`-g` means global installation)
80+
- Problems: If you use your global node.js installation, and it doesn't work try to set your `ts-node` path in the settings to `npx ts-node` instead of `ts-node`.
8181

8282
```ts
8383
let message: string = 'Hello, World!';
@@ -373,7 +373,7 @@ ls -la
373373
<summary>Powershell</summary>
374374

375375
- Requirements: Used to execute shell commands on Windows. Default is Powershell but can be set to your preferred shell in the settings.
376-
- On MacOS: You probably need to change the command to use from `powershell` to `pwsh` in the plugin settings. Make sure you set the right path.
376+
- On macOS: You probably need to change the command to use from `powershell` to `pwsh` in the plugin settings. Make sure you set the right path.
377377

378378
```powershell
379379
echo "Hello World!"
@@ -713,17 +713,17 @@ This code block is added before each python block you define below in the note a
713713

714714
`post` blocks work the same way, but the code in post blocks is executed _after_ your other code blocks.
715715

716-
Pre/Post blocks will only apply to code blocks defined below them, and will only apply to code blocks from the same language.
716+
Pre-/post-blocks will only apply to code blocks defined below them, and will only apply to code blocks from the same language.
717717

718-
You can also have a pre and post block at the same time by specifying `{pre, post}`
718+
You can also have a pre- and post-block at the same time by specifying `{pre, post}`
719719

720720
Note, the `pre`/`post` arguments are special in that you don't need to explicitly state a key/value pair, however you can do so if you wish:
721721

722722
`{pre}` is equivalent to `{export='pre'}`, `{pre, post}` is equivalent to `{export=['pre', 'post']}`.
723723

724724
### Labelled Code Blocks
725725

726-
You can label specific code blocks with the `label='string'` argument, then import them explicitly in other blocks with the `import='string'` or `import=['string1', 'string2', ...]` argument so they aren't automatically imported as with pre / post blocks:
726+
You can label specific code blocks with the `label='string'` argument, then import them explicitly in other blocks with the `import='string'` or `import=['string1', 'string2', ...]` argument so they aren't automatically imported as with pre-/post-blocks:
727727

728728
`````
729729
```python {label='block 1'}
@@ -791,7 +791,7 @@ preview mode.
791791
To enable this feature, you have to enable the setting `Persistent Output` in the plugin settings.
792792
We recommend reopening open notes that contain code blocks after enabling this feature.
793793

794-
This feature is still experimental and may not work as expected in all cases.
794+
This feature is still experimental and may not work as expected in all cases!
795795
We recommend that you disable this feature if you encounter any problems.
796796

797797

@@ -848,19 +848,14 @@ Do not execute code from sources you don't know or code you don't understand. Ex
848848

849849
- On Linux, Snap/Flatpak/AppImage installations of Obsidian run in an isolated environment. As such, they will not have access to any of your installed programs. If you are on Linux, make sure to install the `.deb` version of Obsidian. If your distro isn't compatible with `.deb` files, you may see issues.
850850
- Missing when `run` button after switching the theme: Try to close and reopen your notes and wait for a few minutes. It seems like obsidian doesn't call the postprocessors after the theme switch.
851-
- Pre- / Post-blocks may not be executed if the file contains duplicate code blocks.
851+
- Pre-/Post-blocks may not be executed if the file contains duplicate code blocks.
852852
- In Python, Embed Plots may not be off while Notebook Mode is on
853853

854-
## Future Work 📑
855-
856-
- Error warning when the execution fails (e.g. when python isn't installed)
857-
- Test if this plugin works in combination with dataview.
858-
859854
## Contribution 🤝
860855

861-
All contributions are welcome. Just create a merge request or email me: tim.wibiral(at)uni-ulm.de
856+
All contributions are welcome. Just create a merge request or email me: contact(at)tim-wibiral.de
862857

863-
The bullet points in Future Work are a good starting point if you want to help.
858+
The [open issues](https://github.com/twibiral/obsidian-execute-code/issues) are a good starting point to find something to work on. Some are marked as ["good first issue"](https://github.com/twibiral/obsidian-execute-code/labels/good%20first%20issue) and are easier to solve.
864859

865860
## Contributors ♥
866861

0 commit comments

Comments
 (0)