- Docker
- Docker Compose
- Sendgrid Valid API Token For Email Sendings (It's free for up to 100 emails per day)
foo@bar:~$ git clone [email protected]:lacf95/automatic-sat.git
foo@bar:~$ cd automatic-sat
foo@bar:automatic-sat$ docker-compose build
foo@bar:automatic-sat$ docker-compose pull
By default Automatic SAT has a directory called user-credentials
to store all the credentials.
You'll need to add your credentials inside a directory called the same as your RFC.
foo@bar:automatic-sat$ mkdir -p user-credentials/your_rfc
You need these credentials inside that directory:
.cer
Certificate File.key
Private Key File.pass
Password File (Plain Text File With The Password Inside)
You only need to add your API Key and the email you want to use for sending the emails inside the sendgrid.env
file
SENDGRID_API_KEY=your_api_key
SENDGRID_FROM_EMAIL=your_email
You can use the invoices/sample.yml
as template for your invoices
foo@bar:automatic-sat$ cp invoices/sample.yml invoices/2019_july.yml
Then configure as needed.
Once configured your invoices file you can execute the invoice generate script
foo@bar:automatic-sat$ docker-compose run client ruby generate_invoices.rb invoices/2019_july.yml
You can pass as many files as required
foo@bar:automatic-sat$ docker-compose run client ruby generate_invoices.rb invoices/2019_july.yml invoices/2019_august.yml