Files
chinese-poetry/wudai/nantang/nc.py
jackeyGao 8518797143 fix #122
2019-07-22 11:37:05 +08:00

18 lines
376 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- coding: utf-8 -*-
from AppKit import NSPasteboard, NSStringPboardType
pb = NSPasteboard.generalPasteboard()
pbstring = pb.stringForType_(NSStringPboardType)
body = ''
for i in pbstring.split('\n'):
content = i.strip()[0:]
cs = content.split(u'')
content = '"'+ cs[0] + '--' + u''.join(cs[1:]) + '",\n'
body += content
print body.strip(',\n')