diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-31 08:20:13 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-31 08:20:13 +0000 |
commit | da29e408a8feda9606d93515d995229df8b9393f (patch) | |
tree | b6b5fe9e92da7c518edc93dc32c7c724c73e280e | |
parent | 842a8822eecbddec8812336d9ec1e388b9816cf9 (diff) |
automatic import of python-sat-gt-fel-invoices-downloader
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-sat-gt-fel-invoices-downloader.spec | 306 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 308 insertions, 0 deletions
@@ -0,0 +1 @@ +/sat_gt_fel_invoices_downloader-0.5.13.tar.gz diff --git a/python-sat-gt-fel-invoices-downloader.spec b/python-sat-gt-fel-invoices-downloader.spec new file mode 100644 index 0000000..1cf8004 --- /dev/null +++ b/python-sat-gt-fel-invoices-downloader.spec @@ -0,0 +1,306 @@ +%global _empty_manifest_terminate_build 0 +Name: python-sat-gt-fel-invoices-downloader +Version: 0.5.13 +Release: 1 +Summary: please add a summary manually as the author left a blank one +License: GNU General Public License v3 (GPLv3) +URL: https://github.com/gt-banks-parser/banks-parser-base +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/c8/fc/b97285def6c3bbfd6d518df66824bfae846858a5b3c2ebb7d606bcf75e51/sat_gt_fel_invoices_downloader-0.5.13.tar.gz +BuildArch: noarch + +Requires: python3-requests +Requires: python3-beautifulsoup4 +Requires: python3-lxml + +%description +# FEL Invoices Downloader for SAT of Guatemala + +Downloads received and emited invoices in FEL (Factura En Linea) of Guatemala SAT + +## How to use it + +### Installation + +`pip install sat_gt_fel_invoices_downloader` + + +### Example + +#### How to download invoice in PDF + +```python +from sat_gt_fel_invoices_downloader import SATDownloader +import datetime +import os.path +from sat_gt_fel_invoices_downloader.models import SatCredentials + + +sat_credentials = SatCredentials("YOUR AGENCIA DIGITAL USER", "YOUR AGENCIA DIGITAL PASSWORD") +sat = SATDownloader() +sat.setCredentials(credentials=sat_credentials) +invoices = sat.get_invoices( + datetime.date(2021, 10, 1), date_end=datetime.date.today(), received=True +) +dir = os.path.dirname( + 'c:\\Users\\my-user\\Downloads\\"' +) +for invoice in invoices: + sat.get_pdf(invoice, save_in_dir=dir) +``` +#### How to download invoice in XML + +```python +from sat_gt_fel_invoices_downloader import SATDownloader +import datetime +import os.path +from sat_gt_fel_invoices_downloader.models import SatCredentials + + +sat_credentials = SatCredentials("YOUR AGENCIA DIGITAL USER", "YOUR AGENCIA DIGITAL PASSWORD") +sat = SATDownloader() +sat.setCredentials(credentials=sat_credentials) +invoices = sat.get_invoices( + datetime.date(2021, 10, 1), date_end=datetime.date.today(), received=True +) +dir = os.path.dirname( + 'c:\\Users\\my-user\\Downloads\\"' +) +for invoice in invoices: + sat.get_xml(invoice, save_in_dir=dir) +``` + +#### How to get invoices in model structure + +```python +from sat_gt_fel_invoices_downloader import SATDownloader +import datetime +import os.path +from sat_gt_fel_invoices_downloader.models import SatCredentials + + +sat_credentials = SatCredentials("YOUR AGENCIA DIGITAL USER", "YOUR AGENCIA DIGITAL PASSWORD") +sat = SATDownloader() +sat.setCredentials(credentials=sat_credentials) +invoices = sat.get_invoices( + datetime.date(2021, 10, 1), date_end=datetime.date.today(), received=True +) +dir = os.path.dirname( + 'c:\\Users\\my-user\\Downloads\\"' +) +for invoice in invoices: + print(sat.get_model(invoice)) +``` + + +%package -n python3-sat-gt-fel-invoices-downloader +Summary: please add a summary manually as the author left a blank one +Provides: python-sat-gt-fel-invoices-downloader +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-sat-gt-fel-invoices-downloader +# FEL Invoices Downloader for SAT of Guatemala + +Downloads received and emited invoices in FEL (Factura En Linea) of Guatemala SAT + +## How to use it + +### Installation + +`pip install sat_gt_fel_invoices_downloader` + + +### Example + +#### How to download invoice in PDF + +```python +from sat_gt_fel_invoices_downloader import SATDownloader +import datetime +import os.path +from sat_gt_fel_invoices_downloader.models import SatCredentials + + +sat_credentials = SatCredentials("YOUR AGENCIA DIGITAL USER", "YOUR AGENCIA DIGITAL PASSWORD") +sat = SATDownloader() +sat.setCredentials(credentials=sat_credentials) +invoices = sat.get_invoices( + datetime.date(2021, 10, 1), date_end=datetime.date.today(), received=True +) +dir = os.path.dirname( + 'c:\\Users\\my-user\\Downloads\\"' +) +for invoice in invoices: + sat.get_pdf(invoice, save_in_dir=dir) +``` +#### How to download invoice in XML + +```python +from sat_gt_fel_invoices_downloader import SATDownloader +import datetime +import os.path +from sat_gt_fel_invoices_downloader.models import SatCredentials + + +sat_credentials = SatCredentials("YOUR AGENCIA DIGITAL USER", "YOUR AGENCIA DIGITAL PASSWORD") +sat = SATDownloader() +sat.setCredentials(credentials=sat_credentials) +invoices = sat.get_invoices( + datetime.date(2021, 10, 1), date_end=datetime.date.today(), received=True +) +dir = os.path.dirname( + 'c:\\Users\\my-user\\Downloads\\"' +) +for invoice in invoices: + sat.get_xml(invoice, save_in_dir=dir) +``` + +#### How to get invoices in model structure + +```python +from sat_gt_fel_invoices_downloader import SATDownloader +import datetime +import os.path +from sat_gt_fel_invoices_downloader.models import SatCredentials + + +sat_credentials = SatCredentials("YOUR AGENCIA DIGITAL USER", "YOUR AGENCIA DIGITAL PASSWORD") +sat = SATDownloader() +sat.setCredentials(credentials=sat_credentials) +invoices = sat.get_invoices( + datetime.date(2021, 10, 1), date_end=datetime.date.today(), received=True +) +dir = os.path.dirname( + 'c:\\Users\\my-user\\Downloads\\"' +) +for invoice in invoices: + print(sat.get_model(invoice)) +``` + + +%package help +Summary: Development documents and examples for sat-gt-fel-invoices-downloader +Provides: python3-sat-gt-fel-invoices-downloader-doc +%description help +# FEL Invoices Downloader for SAT of Guatemala + +Downloads received and emited invoices in FEL (Factura En Linea) of Guatemala SAT + +## How to use it + +### Installation + +`pip install sat_gt_fel_invoices_downloader` + + +### Example + +#### How to download invoice in PDF + +```python +from sat_gt_fel_invoices_downloader import SATDownloader +import datetime +import os.path +from sat_gt_fel_invoices_downloader.models import SatCredentials + + +sat_credentials = SatCredentials("YOUR AGENCIA DIGITAL USER", "YOUR AGENCIA DIGITAL PASSWORD") +sat = SATDownloader() +sat.setCredentials(credentials=sat_credentials) +invoices = sat.get_invoices( + datetime.date(2021, 10, 1), date_end=datetime.date.today(), received=True +) +dir = os.path.dirname( + 'c:\\Users\\my-user\\Downloads\\"' +) +for invoice in invoices: + sat.get_pdf(invoice, save_in_dir=dir) +``` +#### How to download invoice in XML + +```python +from sat_gt_fel_invoices_downloader import SATDownloader +import datetime +import os.path +from sat_gt_fel_invoices_downloader.models import SatCredentials + + +sat_credentials = SatCredentials("YOUR AGENCIA DIGITAL USER", "YOUR AGENCIA DIGITAL PASSWORD") +sat = SATDownloader() +sat.setCredentials(credentials=sat_credentials) +invoices = sat.get_invoices( + datetime.date(2021, 10, 1), date_end=datetime.date.today(), received=True +) +dir = os.path.dirname( + 'c:\\Users\\my-user\\Downloads\\"' +) +for invoice in invoices: + sat.get_xml(invoice, save_in_dir=dir) +``` + +#### How to get invoices in model structure + +```python +from sat_gt_fel_invoices_downloader import SATDownloader +import datetime +import os.path +from sat_gt_fel_invoices_downloader.models import SatCredentials + + +sat_credentials = SatCredentials("YOUR AGENCIA DIGITAL USER", "YOUR AGENCIA DIGITAL PASSWORD") +sat = SATDownloader() +sat.setCredentials(credentials=sat_credentials) +invoices = sat.get_invoices( + datetime.date(2021, 10, 1), date_end=datetime.date.today(), received=True +) +dir = os.path.dirname( + 'c:\\Users\\my-user\\Downloads\\"' +) +for invoice in invoices: + print(sat.get_model(invoice)) +``` + + +%prep +%autosetup -n sat-gt-fel-invoices-downloader-0.5.13 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-sat-gt-fel-invoices-downloader -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 31 2023 Python_Bot <Python_Bot@openeuler.org> - 0.5.13-1 +- Package Spec generated @@ -0,0 +1 @@ +86fa981499b6f0982f590b910712e3a6 sat_gt_fel_invoices_downloader-0.5.13.tar.gz |