tscircuit / cli

Command line interface for developing circuits with tscircuit
1 stars 8 forks source link

Introduce `tsci render image` #112

Closed seveibar closed 1 month ago

seveibar commented 1 month ago

Can use tscircuit/soup-to-svg

This feature will enable:

Illustrative Usage

tsci render image --input ./examples/MyCircuit.tsx --pcb --output MyCircuit.png

tsci render image --input ./examples/MyCircuit.tsx --schematic --output MyCircuit.svg

# renders to ./examples/MyCircuit.png
tsci render image --input ./examples/MyCircuit.tsx --pcb -t png
imrishabh18 commented 1 month ago

@seveibar If I am getting the path to the .tsx file, but that won't return me the soup which I can use for the circuit-to-png lib. So, how to approach this to get the soup from a .tsx file, I am confused.

seveibar commented 1 month ago

@imrishabh18 there should be a function that converts tsx into soup, i would search for the term "soupify" or follow the codepath for "tsci soupify"