LoginSignup
6
5

More than 5 years have passed since last update.

EvernoteからDayOneに移行するためのシェルスクリプト

Last updated at Posted at 2014-04-18

使い方

  1. evernoteから、html形式でデータをエクスポート
  2. エクスポートされたフォルダ内に、スクリプトを設置
  3. 実行

注意点

  • 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
6
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5