Skip to content

Commit 95b8eaf

Browse files
authored
Update to version 2.0.0
Update to version 2.0.0
2 parents 99190a4 + 16d5442 commit 95b8eaf

28 files changed

Lines changed: 900 additions & 1840 deletions

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77

8+
9+
## [2.0.0]
10+
### Added
11+
- Persistent output blocks (Thanks to @chlohal and @twibiral)
12+
- Support for PHP (Thanks to @tlwt)
13+
14+
815
## [1.12.0]
916
### Added
1017
- Dynamic path changes by adding %USERNAME% to the path (usable for python) (Thanks to @raffy8361)

README.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Python, Rust, and Octave support embedded plots. All languages support ["magic"
3131

3232
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-).
3333

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+
3436
Take a look at the [changelog](CHANGELOG.md) to see what has changed in recent versions.
3537

3638
[Here](#misc-) you can find some other tools and plugins that are compatible with this plugin and might be useful for you.
@@ -435,6 +437,18 @@ puts "Hello, World!"
435437
```
436438
</details>
437439

440+
<details>
441+
<summary>PHP</summary>
442+
443+
- Requirements: PHP is installed and the correct path is set in the settings.
444+
445+
```php
446+
<?php
447+
echo "Hello, World!";
448+
?>
449+
```
450+
</details>
451+
438452
<details>
439453
<summary>Octave</summary>
440454

@@ -670,6 +684,20 @@ undefined
670684
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)**
671685

672686

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+
673701
## Misc 📦
674702
### Style Settings 🎨
675703

@@ -689,7 +717,7 @@ In your vault go to Settings > Community plugins > Browse and search for "Execut
689717
or
690718

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

694722
## Locating Path Settings ( ex. JavaScript | Node )
695723

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

718746
## Future Work 📑
719747

720-
- Notebook Mode similar to Jupyter
721748
- Error warning when the execution fails (e.g. when python isn't installed)
722749
- Test if this plugin works in combination with dataview.
723750

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)