This is a script written in NodeJs to generate the JSON required for GST E-Invoice download. Preview UI implemented in ReactJS.
It uses extremely specific regexes to extract the required information from an unformatted bill.
Update the regexes at scripts\bill-specifics\bill-regex.js for your own use.
- Currently only supports Windows
- Provide the bills to be parsed, as a
.txtfile with whatever file name was specified in the.envfile. - Does not require an installed/global node. Uses everything it needs from the
bin/diretory - Provide the
node_binaries.zipbinaries grabbed from releases page, and place them in thebin\nodejs\location. - Provide a sample E-Invoice JSON file as a template at
scripts\assets
- Clone the repository
- Grab the
node_binaries.zipfrom the releases page, extract, and place the contents inbin/nodejs cdinto the/scriptsandpreview-guidirectories and runnpm iin each of them- Provide a valid GST JSON template with pre filled seller details, and other static information in the
/scripts/assetsdirectory - Provide the appropriate values and file names in
.env - Provide the bills to be parsed, as a
.txtfile with whatever file name was specified in the.envfile. - Double click
Generate JSON.batto run if using a node binary, or by runningnode index.jsinside the/scriptsdirectory
- Grab the latest release
- Provide the bills to be parsed, as a
Bills.txtfile on the desktop. - Use
Generate JSON.batto run