使い方
- evernoteから、html形式でデータをエクスポート
- エクスポートされたフォルダ内に、スクリプトを設置
- 実行
注意点
- Macのターミナルで動作を確認済み
- 移行後に作られるデータの日付は、ノートの作成日になります(not 更新日)
- htmlタグとか添付ファイルとかは反映されません
#!/bin/bash
# usage
# 1. export Evernote data as html
# 2. put this script to exported Evernote folder
# 3. exec this
IFS=$'\n'
for note in `ls *.html`
do
content=`cat $note | sed -e 's/<[^>]*>//g'`
created=`cat $note | sed -e :loop -e 'N; $!b loop' -e 's/\n//g' | sed -e 's/^.*meta\ name="created"\ content="\(.*\)"\/><meta name="updated".*$/\1/'`
echo ${content} | dayone --date="${created}" new
done