创建待办事项
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了创建待办事项相关的知识,希望对你有一定的参考价值。
require "rubygems" require "appscript" include Appscript @things = app("Things") @todos = @things.to_dos def create_to_do(name,source,link) unless @todos[its.name.eq(name)].get.length > 0 puts "Didn't find a thing named #{name}. Creating a task." if link == "" note = name else note = "[url=#{link}]#{name} - #{source}[/url]" end task = @things.make(:at => app.lists["Today"].beginning, :new => :to_do, :with_properties => { :name => name, :tag_names => "panopticon,#{source}", :notes => note, :due_date => Time.now + 8.hours }) end end
以上是关于创建待办事项的主要内容,如果未能解决你的问题,请参考以下文章
反应类组件。待办事项应用程序。如何使用 localStorage 存储数据