mirror of
https://kkgithub.com/chinese-poetry/chinese-poetry.git
synced 2026-04-01 16:53:40 +08:00
18 lines
376 B
Python
18 lines
376 B
Python
# -*- 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')
|