Paste Any text as a checklist

This commit is contained in:
Jeison Yehuda Amihud (Blender Dumbass) 2022-10-29 10:36:25 +00:00
parent 98e416296d
commit 13af5f1839

View file

@ -1943,6 +1943,14 @@ def layer(win):
clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
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"
s = open(filepath, 'w')
s.write(cliptext)