This is a script that generate a card with a name and a role from a json file. The output image will be in assets/imgs/output
folder
- Add your json file into
utils/input
folder. Each data should be in this format
interface DataInput {
name: string;
role?: string;
}
and import in input_data
variable
-
Add your input image into
assets/imgs/input
and write the file name ininput_image
variable -
Feel free to add you custom fonts in
assets/fonts
folder, and register them inmain.ts
file -
Start the script typing
npm start
in your terminal -
The output image will be in
assets/imgs/output
folder -
The output folder will named after the input_image file name, and images will named after the
name
property in your json file. If it's duplicated, it will be added a number at the end of the name