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
.txt
file with whatever file name was specified in the.env
file. - Does not require an installed/global node. Uses everything it needs from the
bin/
diretory - Provide the
node_binaries.zip
binaries 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.zip
from the releases page, extract, and place the contents inbin/nodejs
cd
into the/scripts
andpreview-gui
directories and runnpm i
in each of them- Provide a valid GST JSON template with pre filled seller details, and other static information in the
/scripts/assets
directory - Provide the appropriate values and file names in
.env
- Provide the bills to be parsed, as a
.txt
file with whatever file name was specified in the.env
file. - Double click
Generate JSON.bat
to run if using a node binary, or by runningnode index.js
inside the/scripts
directory
- Grab the latest release
- Provide the bills to be parsed, as a
Bills.txt
file on the desktop. - Use
Generate JSON.bat
to run