database_tools新增读取和写入剪贴板功能
This commit is contained in:
parent
5f11d1599b
commit
9983e77a79
|
|
@ -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 pandas as pd
|
||||||
|
import win32clipboard as wc
|
||||||
|
|
||||||
def GetDate(): #获得当前日期
|
def GetDate(): #获得当前日期
|
||||||
currentdate = str(time.localtime().tm_year)+str(time.localtime().tm_mon).zfill(2)+str(time.localtime().tm_mday).zfill(2)
|
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("编译失败")
|
print("编译失败")
|
||||||
return latex_data # 返回有错误的latex源代码
|
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__":
|
if __name__ == "__main__":
|
||||||
print("数据库工具, import用.")
|
print("数据库工具, import用.")
|
||||||
Reference in New Issue