From 14b234dcacf20883f4935dc0418fc777d248f68e Mon Sep 17 00:00:00 2001 From: CristianoMafraJunior Date: Fri, 8 Mar 2024 09:37:29 -0300 Subject: [PATCH 1/2] Update Project --- .github/workflows/tests.yml | 2 +- {PyFiscalReport => brazilfiscalreport}/pdf_docs.py | 8 ++++---- {PyFiscalReport => brazilfiscalreport}/xfpdf.py | 0 setup.py | 9 ++++----- ...st_PyFiscalReport.py => test_brazil_fiscal_report.py} | 4 ++-- 5 files changed, 11 insertions(+), 12 deletions(-) rename {PyFiscalReport => brazilfiscalreport}/pdf_docs.py (96%) rename {PyFiscalReport => brazilfiscalreport}/xfpdf.py (100%) rename test/{test_PyFiscalReport.py => test_brazil_fiscal_report.py} (91%) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 297fe14..38c2e9e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,6 +29,6 @@ jobs: python -m pip install --upgrade pip setuptools fpdf2 - name: Test run: | - python3 -m unittest test/test_PyFiscalReport.py + python3 -m unittest test/test_brazil_fiscal_report.py - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 diff --git a/PyFiscalReport/pdf_docs.py b/brazilfiscalreport/pdf_docs.py similarity index 96% rename from PyFiscalReport/pdf_docs.py rename to brazilfiscalreport/pdf_docs.py index 6ae14fb..9c4be9b 100644 --- a/PyFiscalReport/pdf_docs.py +++ b/brazilfiscalreport/pdf_docs.py @@ -52,7 +52,7 @@ import re import xml.etree.ElementTree as ET -from PyFiscalReport.xfpdf import xFPDF +from brazilfiscalreport.xfpdf import xFPDF def getdateUTC(date_utc): @@ -613,9 +613,9 @@ def __init__(self, xmls=None, image=None, cfg_layout="ICMS_ST", receipt_pos="top def recibo_p(self): if self.receipt_pos == "top": lin = 10 - self.dashed_line( - 10, lin + 19, 200, lin + 19, dash_length=0.5, space_length=1 - ) + self.set_line_width(0.5) + self.line(10, 10, 100, 10) + self.set_line_width(width=0.2) else: lin = self.lin_adic + self.height_adic + 2 self.dashed_line(10, lin, 200, lin, dash_length=0.5, space_length=1) diff --git a/PyFiscalReport/xfpdf.py b/brazilfiscalreport/xfpdf.py similarity index 100% rename from PyFiscalReport/xfpdf.py rename to brazilfiscalreport/xfpdf.py diff --git a/setup.py b/setup.py index affcf8b..647aee3 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,13 @@ from setuptools import setup setup( - name="PyFiscalReport", + name="BrazilFiscalReport", version="0.0.1", - description="Python converter for Brazilian Electronic Invoice", long_description=""" - Python converter for Brazilian Electronic Invoice (NFe) - XMLs to Brazilian Auxiliary Electronic Invoice Document (DANFE) + Python library for generating Brazilian auxiliary + fiscal documents in PDF from XML documents. """, - url="https://github.com/Engenere/PyFiscalReport", + url="https://github.com/Engenere/BrazilFiscalReport", author="Cristiano Mafra Junior", license="AGPL-3.0", ) diff --git a/test/test_PyFiscalReport.py b/test/test_brazil_fiscal_report.py similarity index 91% rename from test/test_PyFiscalReport.py rename to test/test_brazil_fiscal_report.py index d42e859..a06f3e4 100644 --- a/test/test_PyFiscalReport.py +++ b/test/test_brazil_fiscal_report.py @@ -1,10 +1,10 @@ import os import unittest -from PyFiscalReport import pdf_docs +from brazilfiscalreport import pdf_docs -class TestPynfedance(unittest.TestCase): +class TestBrazilFiscalReport(unittest.TestCase): def setUp(self): super().setUp() From 08e390a9f64107a0396721d7e2ef0d828167a6df Mon Sep 17 00:00:00 2001 From: CristianoMafraJunior Date: Fri, 8 Mar 2024 09:40:25 -0300 Subject: [PATCH 2/2] Update README --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 204262a..7e1d24d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,12 @@ -# PyFiscalReport +# BrazilFiscalReport -Library to generate DANFE PDFs (portrait and landscape), DACCe from xml's. +Python library for generating Brazilian auxiliary fiscal documents in PDF from XML documents. + +## Supported Documents + +DANFE - Documento Auxiliar da Nota Fiscal Eletrônica (NF-e) + +DACCe - Documento Auxiliar da Carta de Correção Eletrônica (CC-e ) Dependencies: