An Obsidian plugin that adds a sidebar panel of buttons for running Python scripts located in your vault.
Done. ... summary line if the script prints one--- Group Name headingspython3, python, then py)reflow_prose_selection.py (or reflow-prose-selection.py) receive the current editor selection and replace it with the script outputPATHDownload main.js, manifest.json, and styles.css from the latest release and copy them into your vault's plugin folder:
<your vault>/.obsidian/plugins/python-panel/
Create the python-panel folder if it doesn't exist. Then enable the plugin:
Go to Settings → Python Panel to add, edit, reorder, and remove scripts. Script paths are relative to your vault root.
Use separators to visually group scripts in the sidebar:
--- renders as a horizontal line--- Group Name to render a labeled group headingSeparator entries are stored right in the scripts list, so you can also edit data.json directly:
"scripts": [
"software/python/obsidian-scripts/script-a.py",
"--- Review",
"software/python/obsidian-scripts/script-b.py",
"---",
"software/python/obsidian-scripts/script-c.py"
]
Scripts run with the vault root as the working directory. The active note's absolute path is passed to the script in the OBSIDIAN_ACTIVE_FILE environment variable.
For reflow-style tools (e.g. reflow_prose_selection.py), select text in the open note first, then click the button. The plugin passes the selection to Python and replaces it in the editor — no clipboard shortcuts involved. The selection is passed via the OBSIDIAN_SELECTION_IN / OBSIDIAN_SELECTION_OUT file paths in the environment.
With Node.js installed:
npm install
npm run build # writes main.js to this folder (repo root)
For development with watch mode:
npm run dev
On Windows without Node/npm, use the standalone build script (downloads tools/esbuild.exe on first run):
.\build.ps1
The script builds main.js in the repo root and copies main.js, manifest.json, and styles.css into ../../../.obsidian/plugins/python-panel (relative to this folder), ready to reload in Obsidian.