|
|
|
@ -11,13 +11,7 @@ def sync_clipboard(dev): |
|
|
|
t = time.time() |
|
|
|
text = pyperclip.paste() |
|
|
|
conn = dev.db_connect(db_file) |
|
|
|
# text = re.sub(r'([\{\}])',lambda match: match.group(1) * 2,text) |
|
|
|
# sql = 'INSERT INTO cliphistory values ({},\'{}\',0)'.format(int(1000*t),text) |
|
|
|
# sql = '"{}"'.format(sql) |
|
|
|
# print(sql) |
|
|
|
# dev.sudo('sqlite3','-csv',db_file,sql) |
|
|
|
out = conn.execute("INSERT INTO cliphistory VALUES (?,?,?);",[int(1000*t),text,False]) |
|
|
|
# print(list(out)) |
|
|
|
dev.shell('am', 'start', '-n', 'com.catchingnow.tinyclipboardmanager/.activity.ActivityMain') |
|
|
|
if __name__ == "__main__": |
|
|
|
import adb |
|
|
|
|