美文网首页
快速分类导出Kindle笔记

快速分类导出Kindle笔记

作者: 嘟嘟噜噜可 | 来源:发表于2016-04-25 21:12 被阅读465次

<pre><code>
import os

note_path='/Volumes/Kindle/documents/My Clippings.txt'

f=open(note_path,'r+')

digest_path='/Users/yangxin/Desktop/digest/'

os.mkdir(digest_path)

while True:

onenote=[]

for i in range(0,5):
    
    line=f.readline()
   
    if not line:
        
       exit()

      onenote.append(line)

book_note=open('%s%s.txt'%(digest_path,onenote[0]),'a+')

book_note.write(onenote[3]+'\n')

book_note.close()

</code></pre>
参考知乎回答:https://www.zhihu.com/question/23031778/answer/23484306

导出的效果如下:

Paste_Image.png

相关文章

网友评论

      本文标题:快速分类导出Kindle笔记

      本文链接:https://www.haomeiwen.com/subject/yyrqrttx.html