Extract the required data from an SVG file and write it to a JavaScript file.
-
Ensure the input file (
input.svg
) is located in the root directory of the project. -
Project structure:
myproject/ ├── cmd/ │ └── main.go ├── input.svg # Your input SVG file ├── Makefile # Makefile (optional) └── go.mod # Go module file
If you have make
installed, you can run the following command:
make run
If you don't have make
installed, you can run the program directly with Go:
go run cmd/main.go
The program will read the input.svg
file, extract the required data, and write the output to a JavaScript file.