Skip to content

Commit 8653fa3

Browse files
Update parse_payslips.py
1 parent 05a5721 commit 8653fa3

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

parse_payslips.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import logging
88

99
# Setting up logger
10-
1110
logger = logging.getLogger(__name__)
1211
logger.setLevel(logging.DEBUG)
1312

@@ -24,9 +23,6 @@
2423
if "--verbose" in sys.argv or "-v" in sys.argv:
2524
logger.addHandler(stdout_handler)
2625

27-
28-
29-
3026
def convert_pdf_to_text():
3127
'''
3228
convert_pdf_to_text()
@@ -59,7 +55,6 @@ def convert_pdf_to_text():
5955

6056
err_count = 0
6157

62-
6358
# converting files one by one
6459
logger.info("Generating text files from pdf")
6560
for fname in list_fnames:
@@ -101,7 +96,6 @@ def get_list_of_converted_files():
10196
Returns list of full path of converted text files
10297
10398
'''
104-
10599
list_text_fnames = []
106100

107101
def append_path(fname):
@@ -271,8 +265,7 @@ def get_income_tax_ytd(self):
271265
else:
272266
return ""
273267

274-
275-
268+
276269
payslip_details = {
277270
"pay_period": [],
278271
"pay_date": [],
@@ -293,7 +286,6 @@ def get_income_tax_ytd(self):
293286
convert_pdf_to_text()
294287

295288
list_txt_fnames = get_list_of_converted_files()
296-
297289
pay = Payslip()
298290

299291
logger.info("Saving payslip details from each text file to dictionary")
@@ -343,4 +335,4 @@ def get_income_tax_ytd(self):
343335
# exporting to Excel
344336
pay_df.to_excel("payslips.xlsx", index=False)
345337

346-
logger.info("Process completed successfully")
338+
logger.info("Process completed successfully")

0 commit comments

Comments
 (0)