def write_meta(note_path, bookmark, note_uuid):
timestamp = int(datetime.timestamp(datetime.now()))
note_title = bookmark['title']
qvr_meta = {}
qvr_meta['title'] = note_title
qvr_meta['uuid'] = note_uuid
qvr_meta['created_at'] = int(bookmark['updated_at'].timestamp())
qvr_meta['updated_at'] = timestamp
qvr_meta['tags'] = bookmark['tags'] + ['Pocket']
with open(str(Path(note_path, 'meta.json')), 'w') as f:
f.write(json.dumps(qvr_meta))
评论列表
文章目录