Skip to content
This repository was archived by the owner on Mar 20, 2025. It is now read-only.

synaptic-cl/SII-Beautify

Repository files navigation

SII Beautify

Convert XML file from SII (http://home.sii.cl) to PDF, HTML or JSON.

Page: https://us-central1-slack-services.cloudfunctions.net/sii_beautify

How to use

Options:

  • xml: file path you want to convert
  • format:
    • html
    • pdf
    • json

Example HTML

curl --request POST \
-F format=html \
-F xml=@/xml/file.xml \
https://us-central1-slack-services.cloudfunctions.net/sii_beautify

**Example PDF **

curl --request POST \
-F format=pdf \
-F xml=@/xml/file.xml \
-o file.pdf
https://us-central1-slack-services.cloudfunctions.net/sii_beautify

Example JSON

curl --request POST \
-F format=json \
-F xml=@/xml/file.xml \
https://us-central1-slack-services.cloudfunctions.net/sii_beautify

Development

pre requirements

You need install pre-commit

  • MacOs brew install pre-commit

Install

docker-compose build
pre-commit install

Test

docker-compose run --rm app pipenv run pytest

Coverage

# coverage 100%
docker-compose run --rm app pipenv run pytest --cov --cov-fail-under=100

# Report HTML
docker-compose run --rm app pipenv run pytest --cov --cov-report=html

How install packages

docker-compose run --rm app pipenv install flask

Deploy in GCP functions

Quickstart https://cloud.google.com/functions/docs/quickstart-python

gcloud functions deploy sii_beautify --runtime python37 --trigger-http --memory 128MB

Credits

This package was created with Cookiecutter and the sourceryai/python-best-practices-cookiecutter project template.

About

Convert XML file from SII (http://home.sii.cl) to PDF, HTML or JSON.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •