From 9983e77a79aed83e50b7f2d8efe21618680fe528 Mon Sep 17 00:00:00 2001 From: "weiye.wang" Date: Sat, 15 Jul 2023 22:55:20 +0800 Subject: [PATCH] =?UTF-8?q?database=5Ftools=E6=96=B0=E5=A2=9E=E8=AF=BB?= =?UTF-8?q?=E5=8F=96=E5=92=8C=E5=86=99=E5=85=A5=E5=89=AA=E8=B4=B4=E6=9D=BF?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 工具v2/database_tools.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/工具v2/database_tools.py b/工具v2/database_tools.py index 59684f09..a247b58f 100644 --- a/工具v2/database_tools.py +++ b/工具v2/database_tools.py @@ -1,5 +1,6 @@ -import json,re,os,Levenshtein,fitz,time,sys +import json,re,os,Levenshtein,fitz,time,sys,win32con import pandas as pd +import win32clipboard as wc def GetDate(): #获得当前日期 currentdate = str(time.localtime().tm_year)+str(time.localtime().tm_mon).zfill(2)+str(time.localtime().tm_mday).zfill(2) @@ -929,6 +930,19 @@ def GenerateLessonPreparation(notetitle, outputdir, adict, prodict, objdict, les print("编译失败") return latex_data # 返回有错误的latex源代码 +def getCopy(): # 获取剪切板内容 + wc.OpenClipboard() + t = wc.GetClipboardData(win32con.CF_UNICODETEXT) + wc.CloseClipboard() + return t + + +def setCopy(str): # 写入剪切板内容 + wc.OpenClipboard() + wc.EmptyClipboard() + wc.SetClipboardData(win32con.CF_UNICODETEXT, str) + wc.CloseClipboard() + if __name__ == "__main__": print("数据库工具, import用.") \ No newline at end of file