Add embedding docs and LTspice engine to llms.txt
This commit is contained in:
parent
fb70b39173
commit
c86bb6e9f0
@ -1,6 +1,6 @@
|
||||
# SpiceBook
|
||||
|
||||
> Notebook interface for SPICE circuit simulation. Create, edit, and run SPICE netlists in a cell-based notebook UI with waveform visualization and schematic generation. Powered by ngspice.
|
||||
> Notebook interface for SPICE circuit simulation. Create, edit, and run SPICE netlists in a cell-based notebook UI with waveform visualization and schematic generation. Supports ngspice and LTspice engines.
|
||||
|
||||
Base URL: `https://spicebook.warehack.ing`
|
||||
|
||||
@ -46,7 +46,7 @@ POST /api/notebooks
|
||||
}
|
||||
```
|
||||
|
||||
Both fields are optional. Defaults: title = `"Untitled Notebook"`, engine = `"ngspice"`.
|
||||
Both fields are optional. Defaults: title = `"Untitled Notebook"`, engine = `"ngspice"`. Supported engines: `"ngspice"`, `"ltspice"`.
|
||||
|
||||
**Response** `201`
|
||||
```json
|
||||
@ -419,7 +419,7 @@ For AC analysis (`is_complex: true`), `y_magnitude_db` and `y_phase_deg` contain
|
||||
|
||||
## SPICE Netlist Primer
|
||||
|
||||
SpiceBook uses **ngspice** as its simulation engine. Netlists are plain text describing a circuit and the analysis to perform.
|
||||
SpiceBook supports **ngspice** and **LTspice** as simulation engines. Netlists are plain text describing a circuit and the analysis to perform.
|
||||
|
||||
### Basic structure
|
||||
|
||||
@ -555,3 +555,49 @@ GET /health
|
||||
```json
|
||||
{"status": "ok", "version": "2026.02.13"}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Embedding
|
||||
|
||||
Any notebook can be embedded on a third-party page via iframe. No API key or authentication is required.
|
||||
|
||||
### Embed URL
|
||||
|
||||
```
|
||||
https://spicebook.warehack.ing/embed/{notebook_id}?theme=dark
|
||||
```
|
||||
|
||||
| Parameter | Values | Default | Description |
|
||||
|-----------|--------|---------|-------------|
|
||||
| theme | `dark`, `light` | `dark` | Initial color theme |
|
||||
|
||||
### iframe snippet
|
||||
|
||||
```html
|
||||
<iframe
|
||||
src="https://spicebook.warehack.ing/embed/{notebook_id}?theme=dark"
|
||||
width="100%" height="600"
|
||||
style="border: 1px solid #334155; border-radius: 8px;"
|
||||
allow="clipboard-write"
|
||||
></iframe>
|
||||
```
|
||||
|
||||
The embed renders the notebook read-only with working simulation — viewers can run SPICE cells and see waveform results.
|
||||
|
||||
### Theme control via postMessage
|
||||
|
||||
The parent page can switch the embed's theme at runtime:
|
||||
|
||||
```javascript
|
||||
iframe.contentWindow.postMessage(
|
||||
{ type: 'spicebook-theme', theme: 'light' },
|
||||
'*'
|
||||
);
|
||||
```
|
||||
|
||||
Accepted values for `theme`: `"dark"`, `"light"`. Other messages are ignored.
|
||||
|
||||
### Discovering the embed snippet
|
||||
|
||||
In the notebook editor UI, the **Embed** button in the toolbar opens a popover with a ready-to-copy iframe snippet and a theme toggle.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user