Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Enter-tainer/wavy
Run wavedrom in typst
https://github.com/Enter-tainer/wavy
Last synced: about 8 hours ago
JSON representation
Run wavedrom in typst
- Host: GitHub
- URL: https://github.com/Enter-tainer/wavy
- Owner: Enter-tainer
- License: mit
- Created: 2023-11-05T14:00:42.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-02T05:32:15.000Z (11 months ago)
- Last Synced: 2024-11-09T09:38:59.457Z (about 20 hours ago)
- Language: JavaScript
- Homepage:
- Size: 148 KB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [Wavy](https://github.com/Enter-tainer/wavy)
Draw digital timing diagram in Typst using [Wavedrom](https://wavedrom.com/).
![](wavy.svg)
````typ
#import "@preview/wavy:0.1.1"#set page(height: auto, width: auto, fill: black, margin: 2em)
#set text(fill: white)#show raw.where(lang: "wavy"): it => wavy.render(it.text)
= Wavy
Typst, now with waves.
```wavy
{
signal:
[
{name:'clk',wave:'p......'},
{name:'bus',wave:'x.34.5x',data:'head body tail'},
{name:'wire',wave:'0.1..0.'}
]
}
``````js
{
signal:
[
{name:'clk',wave:'p......'},
{name:'bus',wave:'x.34.5x',data:'head body tail'},
{name:'wire',wave:'0.1..0.'}
]
}
```````
## Documentation
### `render`
Render a wavedrom json5 string to an image
#### Arguments
* `src`: `str` - wavedrom json5 string
* All other arguments are passed to `image.decode` so you can customize the image size#### Returns
The image, of type `content`