Paste Any text as a checklist
This commit is contained in:
parent
98e416296d
commit
13af5f1839
1 changed files with 8 additions and 0 deletions
|
@ -1943,6 +1943,14 @@ def layer(win):
|
||||||
clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
|
clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
|
||||||
cliptext = str(clipboard.wait_for_text())
|
cliptext = str(clipboard.wait_for_text())
|
||||||
|
|
||||||
|
savetext = ""
|
||||||
|
for i in cliptext.split("\n"):
|
||||||
|
if "[ ]" in i or "[V]" in i or "[v]" in i:
|
||||||
|
savetext = savetext + "\n"+i.replace("[V]", "[ ]").replace("[v]", "[ ]")
|
||||||
|
else:
|
||||||
|
savetext = savetext + "\n[ ] #"+i
|
||||||
|
cliptext = savetext[1:]
|
||||||
|
|
||||||
filepath = win.project+"/rnd"+win.cur+"/shot.progress"
|
filepath = win.project+"/rnd"+win.cur+"/shot.progress"
|
||||||
s = open(filepath, 'w')
|
s = open(filepath, 'w')
|
||||||
s.write(cliptext)
|
s.write(cliptext)
|
||||||
|
|
Loading…
Reference in a new issue