summaryrefslogtreecommitdiff
path: root/Chap6ProjBulletsWiki.py
blob: 4194a63c05748cb48082b8c04ae24e09f6146a7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#! /usr/bin/env python3

# Bullets to Wiki Markup Chap. 6
# Copies text from clipboard, adds a star to each line, pastes to clipboard.

import pyperclip

text = pyperclip.paste()

lines = text.split('\n')
for i in range(len(lines)):
    lines[i] = '* ' + lines[i]

text = '\n'.join(lines)

pyperclip.copy(text)