Skip to content

Commit f7de1b6

Browse files
authored
Merge branch 'develop' into master
2 parents 5662076 + a72bb0b commit f7de1b6

27 files changed

Lines changed: 860 additions & 1844 deletions

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: [twibiral]
2+
buy_me_a_coffee: timwibiral

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1010
- Support for PHP (Thanks to @tlwt)
1111

1212

13+
14+
## [2.0.0]
15+
### Added
16+
- Persistent output blocks (Thanks to @chlohal and @twibiral)
17+
18+
1319
## [1.12.0]
1420
### Added
1521
- Dynamic path changes by adding %USERNAME% to the path (usable for python) (Thanks to @raffy8361)

README.md

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,48 @@ The result is shown only after the execution is finished. It is not possible to
1414
![Video that shows how the plugin works.](https://github.com/twibiral/obsidian-execute-code/blob/master/images/execute_code_example.gif?raw=true)
1515

1616

17-
The following [languages are supported](#supported-programming-languages-): C, CPP, Dart, Golang, Groovy, Kotlin, Java, JavaScript, TypeScript, Lean, Lua, CSharp, Prolog, Rust, PHP, Python, R, Ruby, Wolfram Mathematica, Haskell, Scala, Racket, F#, Batch, Shell & Powershell, Octave, Maxima, Zig and OCaml.
17+
<hr>
18+
19+
> [!NOTE]
20+
> Advertisement on my behalf:
21+
> I am working on my master's thesis and looking for a PhD position in explainable AI or foundations of learning - if you have or know about an open position in that field, I would love to hear about it 😄
22+
23+
24+
<hr></div>
25+
26+
27+
The following [languages are supported](#supported-programming-languages-): C, CPP, Dart, Golang, Groovy, Kotlin, Java, JavaScript, TypeScript, Lean, Lua, CSharp, Prolog, Rust, Python, R, Ruby, Wolfram Mathematica, Haskell, Scala, Racket, F#, Batch, Shell & Powershell, Octave, Maxima, Zig and OCaml.
1828

1929

2030
Python, Rust, and Octave support embedded plots. All languages support ["magic" commands](#magic-commands-) that help you to access paths in obsidian or show images in your notes.
2131

2232
You can create code blocks that are executed before or after each code block of the same language and define [global code injections](#global-code-injection-and-reusing-code-blocks-).
2333

34+
New: You can [persistent output](#persistent-output-experimental) to store the output of a code block in the note and export it to PDF.
35+
2436
Take a look at the [changelog](CHANGELOG.md) to see what has changed in recent versions.
2537

26-
[Here](#misc-) you can find some other tools and plugins that might are compatible with this plugin and might be useful for you.
38+
[Here](#misc-) you can find some other tools and plugins that are compatible with this plugin and might be useful for you.
2739

40+
<br>
2841
<div align='center'>
2942

30-
[![Buy us a coffee](https://img.shields.io/badge/-buy_us_a%C2%A0coffee-gray?logo=buy-me-a-coffee)](https://www.buymeacoffee.com/timwibiral)
43+
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.
44+
45+
[![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)
46+
3147
</div>
3248

3349

3450
## Featured In
3551

36-
| [![Video by I Versus AI](https://img.youtube.com/vi/eQz4eAW3ZDk/0.jpg)](https://www.youtube.com/watch?v=eQz4eAW3ZDk) | ![![Video by Michel's Science Speedrun](https://www.youtube.com/watch?v=w7vyavrMYqw)](https://img.youtube.com/vi/w7vyavrMYqw/0.jpg) |
37-
|---|---|
38-
| "Escape ChatGPT. Make your own Code Interpreter EASY" by _I Versus AI_ | "Obsidian & quarto integration" by _Michel's Science Speedrun_ |
52+
| [![Video by I Versus AI](https://img.youtube.com/vi/eQz4eAW3ZDk/0.jpg)](https://www.youtube.com/watch?v=eQz4eAW3ZDk) | ![![Video by Michel's Science Speedrun](https://www.youtube.com/watch?v=w7vyavrMYqw)](https://img.youtube.com/vi/w7vyavrMYqw/0.jpg) | ![![Video by GlareDB](https://www.youtube.com/watch?v=lRq3mlvcyJw)](https://img.youtube.com/vi/lRq3mlvcyJw/0.jpg) | ![![Video by 노마드 코더 Nomad Coders](https://www.youtube.com/watch?v=qY1P_CmL8aQ)](https://img.youtube.com/vi/qY1P_CmL8aQ/0.jpg) |
53+
|---|---|---|---|
54+
| "Escape ChatGPT. Make your own Code Interpreter EASY" by _I Versus AI_ | "Obsidian & quarto integration" by _Michel's Science Speedrun_ | "Write SQL Queries in...Obsidian?" by _GlareDB_ | "인생 노트앱...드디어 찾았습니다..!" by _노마드 코더 Nomad Coders_|
3955

4056
In blogs:
4157
- ["Using Obsidian: Coding Notes" by _Kera Cudmore_](https://www.codu.co/articles/using-obsidian-coding-notes-pqjyljkh)
58+
- ["Obsidian and Jupyter Notebooks" by _Brian Carey_](https://medium.com/@biscotty666/obsidian-and-jupyter-notebooks-5d90ab3eab4c)
4259

4360
<small>Are you featuring this plugin in your content? Let me know and I will add it here.</small>
4461

@@ -667,6 +684,20 @@ undefined
667684
To manage the open runtimes for Notebook Mode, you can use the `Open Code Runtime Management` command in the command palette. From this sidebar window, you can stop kernels. **Note: force-stopping requires `taskkill` on Windows and `pkill` on Unix. 99% of systems should have these preinstalled: if yours doesn't, please [file an issue](https://github.com/twibiral/obsidian-execute-code/issues/new/choose)**
668685

669686

687+
### Persistent Output \[Experimental\]
688+
689+
Since version 2.0.0, the plugin supports persistent output. This means that the output of a code block is
690+
stored in the note and will be displayed when you open the note again. This is useful for long-running code blocks or
691+
code blocks that produce a lot of output. The output is stored in the note as a comment and will be displayed in the
692+
preview mode.
693+
694+
To enable this feature, you have to enable the setting `Persistent Output` in the plugin settings.
695+
We recommend reopening open notes that contain code blocks after enabling this feature.
696+
697+
This feature is still experimental and may not work as expected in all cases.
698+
We recommend that you disable this feature if you encounter any problems.
699+
700+
670701
## Misc 📦
671702
### Style Settings 🎨
672703

@@ -686,7 +717,7 @@ In your vault go to Settings > Community plugins > Browse and search for "Execut
686717
or
687718

688719
Follow [this link](https://obsidian.md/plugins?search=execute%20code#) and click "Open in Obsidian".
689-
720+
690721

691722
## Locating Path Settings ( ex. JavaScript | Node )
692723

@@ -714,7 +745,6 @@ Do not execute code from sources you don't know or code you don't understand. Ex
714745

715746
## Future Work 📑
716747

717-
- Notebook Mode similar to Jupyter
718748
- Error warning when the execution fails (e.g. when python isn't installed)
719749
- Test if this plugin works in combination with dataview.
720750

manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"id": "execute-code",
33
"name": "Execute Code",
4-
"version": "1.12.0",
5-
"minAppVersion": "1.2.8",
4+
"version": "2.0.0",
5+
"minAppVersion": "1.7.2",
66
"description": "Allows to execute code snippets within a note. Supported programming languages: C, CPP, Dart, Golang, Groovy, Kotlin, Java, JavaScript, TypeScript, Lean, Lua, CSharp, Prolog, Rust, Python, R, Ruby, Wolfram Mathematica, Haskell, Scala, Racket, F#, Batch, Shell & Powershell.",
77
"author": "twibiral",
88
"authorUrl": "https://www.github.com/twibiral",

0 commit comments

Comments
 (0)