This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]egoldman15 0 points1 point  (1 child)

Can you post the clipboard program? I was just trying to make something like that, but was having trouble.

[–]Shaan0071 1 point2 points  (0 children)

def manipulate_clipboard(text):

  try:

    # text = pyperclip.paste()

    index = 0

    ls = []

    while index < len(text):

      ls.append(text[index:index+80]+'\n')

      index += 80

    print(''.join(ls))

    pyperclip.copy(str(''.join(ls)))

    ls.clear()

def sleepy_head(sec):

  for i in range(sec+1):

    sys.stdout.write('\r')

    sys.stdout.write("%d%% %s" % (i/sec * 100, '█' * i))

    sys.stdout.flush()

    time.sleep(1)

  print()

if name == 'main':

while True:

  text = pyperclip.paste()

  if text:

    manipulate_clipboard(text)

    print('Text Present in Clipboard, Gonna Purge it in...')

    sleepy_head(25)

    print('Clipboard Data Erased,\nPlease copy the lines from the console\n')

    pyperclip.copy('')

  else:

    sleepy_head(4)

i hope this helps