Skip to content

Commit

Permalink
Update to version 2.0.0
Browse files Browse the repository at this point in the history
Update to version 2.0.0
  • Loading branch information
twibiral authored Nov 10, 2024
2 parents 99190a4 + 16d5442 commit 95b8eaf
Show file tree
Hide file tree
Showing 28 changed files with 900 additions and 1,840 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),



## [2.0.0]
### Added
- Persistent output blocks (Thanks to @chlohal and @twibiral)
- Support for PHP (Thanks to @tlwt)


## [1.12.0]
### Added
- Dynamic path changes by adding %USERNAME% to the path (usable for python) (Thanks to @raffy8361)
Expand Down
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Python, Rust, and Octave support embedded plots. All languages support ["magic"

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

New: You can [persistent output](#persistent-output-experimental) to store the output of a code block in the note and export it to PDF.

Take a look at the [changelog](CHANGELOG.md) to see what has changed in recent versions.

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

<details>
<summary>PHP</summary>

- Requirements: PHP is installed and the correct path is set in the settings.

```php
<?php
echo "Hello, World!";
?>
```
</details>

<details>
<summary>Octave</summary>

Expand Down Expand Up @@ -670,6 +684,20 @@ undefined
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)**


### Persistent Output \[Experimental\]

Since version 2.0.0, the plugin supports persistent output. This means that the output of a code block is
stored in the note and will be displayed when you open the note again. This is useful for long-running code blocks or
code blocks that produce a lot of output. The output is stored in the note as a comment and will be displayed in the
preview mode.

To enable this feature, you have to enable the setting `Persistent Output` in the plugin settings.
We recommend reopening open notes that contain code blocks after enabling this feature.

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


## Misc 📦
### Style Settings 🎨

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

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


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

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

## Future Work 📑

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

Expand Down
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"id": "execute-code",
"name": "Execute Code",
"version": "1.12.0",
"minAppVersion": "1.2.8",
"version": "2.0.0",
"minAppVersion": "1.7.2",
"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.",
"author": "twibiral",
"authorUrl": "https://www.github.com/twibiral",
Expand Down
Loading

0 comments on commit 95b8eaf

Please sign in to comment.