基于百度云的OCR功能实现的自动签到功能
介绍
20年7月上网课时,开发的一个签到自动化工具。
软件说明
本项目基于百度的OCR文字识别功能,具体部署教程网上可查,由于后面已经开学,并未做过多适配,许多功能也未来得及实现,只保证自己能运行。
后期开发的一键获取缺勤名单功能并不完善 有许多bug。
使用说明
-
将需要签到的名单图片,放入与源代码同目录的imag文件夹中如下。
-
启动代码,选择星期和课程
-
可看到表格中将image文件夹图片上有名字的的人在表格相应位置打√表示已签到。
from aip import AipOcr
import os
import re
import openpyxl
from openpyxl.utils import get_column_letter
import numpy as np
import pandas as pd
from tkinter import *
import pyperclip
#1、实例化 Windows
windows = Tk()
#2、windows起名
windows.title("签到")
#3、设置窗口大小
windows.geometry("460x240")
#4、weekday and course choice
#weekday choice in the windows
weekday_group = Label(windows,text="星期")
weekday_group.place(relx=0.2,rely=0.2)
var1 = IntVar()
td1= Radiobutton(windows,text="一",variable=var1,value=0)
td1.place(relx=0.3,rely=0.2)
td2= Radiobutton(windows,text="二",variable=var1,value=1)
td2.place(relx=0.4,rely=0.2) #relx is column , rely is row
td3= Radiobutton(windows,text="三",variable=var1,value=2)
td3.place(relx=0.5,rely=0.2)
td4= Radiobutton(windows,text="四",variable=var1,value=3)
td4.place(relx=0.6,rely=0.2)
td5= Radiobutton(windows,text="五",variable=var1,value=4)
td5.place(relx=0.7,rely=0.2)
#course choice in the windows
cour_group = Label(windows,text="第")
cour_group.place(relx=0.25,rely=0.4)
var2 = IntVar()
rd1= Radiobutton(windows,text="一",variable=var2,value=0)
rd1.place(relx=0.32,rely=0.4)
rd2= Radiobutton(windows,text="二",variable=var2,value=1)
rd2.place(relx=0.42,rely=0.4) #relx is column , rely is row
rd3= Radiobutton(windows,text="三",variable=var2