#!/usr/bin/python
# -*- coding: UTF-8 -*-


import os
import pdfticket

'''
from wand.image import Image
from PIL import Image as PI
import pyocr
import pyocr.builders
import io
import re
import shutil
# 
from openpyxl import Workbook
'''


def GetTicketPath():
    curpath = os.getcwd()
    subpath = "\\ticket\\"
    absPath = curpath + subpath
    return absPath


def GetAllTicketFile(dir):
    fileList: list = []
    paths = os.walk(path)
    for root, dirs, files in paths:
        for file in files:
            absFile = os.path.join(root, file)
            fileList.append(absFile)

    return fileList


# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    # 获取文件列表
    path = pdfticket.GetTicketPath()
    # path = GetTicketPath()
    files = GetAllTicketFile(path)
    # 从文件中获取信息,填入文件
    info: tuple = ()
    for file in files:
        info = pdfticket.GetTickDetailInfo(file)

    # 初始化文件头
