Skip to content

Instantly share code, notes, and snippets.

@rashita
Last active December 11, 2015 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rashita/4583099 to your computer and use it in GitHub Desktop.
Save rashita/4583099 to your computer and use it in GitHub Desktop.
Evernote for mac 5.0.5でチェックボックス付きのノートを作成し、「SmartEver」というタグを付け、その日の日付がタイトルのノートを作成する。
property nb : "000 [短期選抜]"
property taskSet : ""
(* Daily TaskList in Evernote 5.0.5 beta
*)
set notetext to text returned of (display dialog "今日の目標を入力してね!" default answer "")
set taskSet to notetext & "<br />朝棚<br /><en-todo />エゴサ<en-todo />フィード<en-todo />" & "メール<br/>" & "F-MIT<br /><en-todo /><br/>" & "Blog<br /><en-todo />R-style <br /><en-todo />コンビニBlog <br /><en-todo />mixi<br /><en-todo />今日の一言<br />" & "プロジェクト<br /><en-todo /><br/>" & "メルマガ<br/><en-todo /><br />" & "+α<br/><en-todo /><br />" & "その他"
my handle_string(notetext)
on handle_string(notetext)
if notetext is not "" then
CreateDailyEvernote(notetext)
end if
end handle_string
(* END HANDLER CALL *)
on CreateDailyEvernote(txt)
set timeStr to time string of (current date)
set timedate to date string of (current date)
tell application "Evernote"
set foundNotes to find notes "notebook:\"" & nb & "\"" & " intitle:\"" & timedate & "\""
set found to ((length of foundNotes) is not 0)
if not found then
set curnote to create note with enml taskSet title timedate notebook nb
if (tag named "SmartEver" exists) then
-- SmartEverタグを所有しているならば、それを付ける
set tag1 to tag "SmartEver"
assign tag1 to curnote
end if
else
-- ノートが存在したときの処理
repeat with curnote in foundNotes
(* タスク・業務日誌を追記する
tell curnote to append html timeStr
tell curnote to append text txt
tell curnote to append html "<br>"
          *)
end repeat
end if
end tell
end CreateDailyEvernote
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment