arten_1337

Bullet Point Adder

Jul 5th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. #! /usr/bin/python3
  2. # Bulletpointadder.py -Adds bullet point to the copied text at start of each line.
  3.  
  4. import pyperclip
  5. text = pyperclip.paste()
  6.  
  7. # splits the text into a list of lines
  8. list = text.split('\n')
  9.  
  10. for i in range(len(list)):
  11.     list[i] = '* '+list[i]  # adds * at the start of each line
  12. text = '\n'.join(list)
  13. pyperclip.copy(text)  # copies the bulleted line on the clipboard
Advertisement
Add Comment
Please, Sign In to add comment