Closed Bamban closed 4 years ago
Hi @Bamban . Thank you for the kind words. Here is CLI version of wavedrom https://github.com/wavedrom/cli Please try.
CLI is really a great idea!
Any chance to get it implemented directly into the standalone waveformeditor, since the editor has all needed options already implemented and especially since PhantomJS project has been suspended?
Thanks a lot spending your time!
Yes, It is possible since chromium
has headless
mode now: https://developers.google.com/web/updates/2017/04/headless-chrome
And if NWJS
supports it I will implement CLI for it.
https://github.com/nwjs/nw.js/issues/769
I am waiting this feature to be able to create svg for documentations
I have created CLI version of wavedrom here: https://github.com/wavedrom/wavedrom/releases/tag/v2.1.2
For help:
node wavedrom.js --help
To generate SVG file from JSON5 file.
node wavedrom.js -i mysignal.json5 > mysignal.svg
Please try.
In general these command line interfaces work fine. I have tested on armhf and aarch64. The main concern is the performance; suppose we have a long waveform to render, it can takes 6 seconds to render something like:
clock = {'signal': [{'name': 'clock_0', 'wave': 'hlhlhlhlhlhlhlhl'*20}]*4,
'foot': {'tock': 1},
'head': {'text': 'Clock Signal'}}
This is only 320 samples with 4 channels. I did some extensive tests; it may take 15 seconds to render 1000 samples.
I was hoping that we could get something even faster - not sure if we could do this with chromium browser or other technologies.
wavedrom was not designed for the rendering of long simulation traces. I have started another project for that https://github.com/wavedrom/zoom
@drom This is awesome. Do you have any example/ instructions on how to use zoom?
Hi ! First of all thanks a lot for this awesome tool. I'm using it to generate waveforms for some documentation. I currently have some json wave files in a directory. In order to process them with latex, I need pdf. I can easily go from svg to pdf (which is great because everything is vector) with inkscape. The only thing I can't automate is the export of json to svg. I currently open the editor and click "export svg".
Hence my question : would it be possible to imagine a command line interface doing something like this ?
./wavedrom --in wave.json --export-svg --out wave.svg
Thanks for your time !