给复制出来的段落前添加星号
最终效果
说明:复制四段内容(段落实际不做限制),在windows终端输入 bulletPointAdder,再拷贝到文本时,各段落前面自动带有一个星号。
二、实现步骤
2.1 编写python脚本
#! python3
# bulletPointAdder.py - Adds Wikipedia bullet points to the start
# of each line of text on the clipboard.
import pyperclip # 导入 pyperclip 包
text = pyperclip.paste() # 粘贴板内容复制给变量 text
# TODO: Separate lines and add stars.
lines