Merge branch 'pr/123'
This commit is contained in:
17
wudai/nantang/nc.py
Normal file
17
wudai/nantang/nc.py
Normal file
@ -0,0 +1,17 @@
|
||||
# -*- 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')
|
||||
Reference in New Issue
Block a user