1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- # coding: utf-8
- import sys
- import re
- from time import sleep
- import pywinctl as gw
- from winmentor import (
- WinMentor,
- Mentorutils,
- check_list, # @UnusedImport,
- file_open
- )
- def parse_and_close(title):
- close_title = gw.getWindowsWithTitle(title)[0]
- # gw.Win32Window.close()
- close_title.activate()
- sleep(2)
- close_title.close()
- # gen_month = sys.argv[0][24:-3]
- gen_month = re.search('[0-9]{4}?_[0-9]{2}?', sys.argv[0])
- # print(gen_month.group())
- exclude = [
- 'ASIVP', 'ASOBS', 'CLEAN', 'ECOS', 'MEDFAC', 'MEDCOM',
- 'COMELECT', 'DATAV', 'ECOPROT', 'JOART', 'CRH', 'RECYC', 'QCLINIC'
- ]
- head = [
- 'Denumire', 'CF', 'J', 'Adresa', 'Oras', 'Judet', 'Prescurtat', 'Admin', 'AdminP', 'RCNP', 'Obs'
- ]
- my_headers = [
- 'Denumire', 'CF', 'J', 'Adresa', 'Oras', 'Judet', 'Prescurtat', 'Admin', 'AdminP', 'RCNP', 'Obs',
- 'VAT', 'VAT FINAL', 'INC_TAX', 'DIV_TAX', 'CAS', 'CASS', 'SAL_TAX', 'CAM', 'CA', 'PN', 'year', 'month'
- ]
- mentor = WinMentor()
- utils = Mentorutils()
- # office = mentor.filtered_firmlist('/firme.db', headers=head, ban=exclude)
- # utils.gen_turnover('turn_over', 'to', office, n_headers=my_headers)
- office = mentor.filtered_firmlist(headers=head, ban=exclude)
- utils.gen_society('society', 'tx', list(office), 'CONSDEN', n_headers=my_headers, range_year='2017-2019', range_month='10-12')
- # utils.gen_txt('/firme.db', 'lista_cf.txt', _attr_index=1)
- # check_list('lista_cf.txt')
- file_open('society.xlsm')
|