AppleScriptを使って.txtファイルのテキストを解析し、別の.txtファイルに出力するための助けをいくつか使うことができます。 1)特定のセクションを特定する( "=")、2)特定の文字セットがセクションに存在するかどうかを特定するためのスクリプト、 "[*]"、3)セクションヘッダーを特定の文字セット、4)ファイルの最後まで繰り返します。基本的には、これらはアクションアイテムのあるノートです。オープンアクションアイテムを含むノートを抽出したいと思います。次のようにnotes.txtをからテキストをテキストで解析する
入力テキスト構造は、次のようにactionItems.txtへ
»===============================
<Date> 2016-09-19
<Topic> The topic of the day
<Attendees> Mario, Luigi
»1) Where to go from here
- Someone said this
[*] Mario: schedule this meeting
- And who wants to do that other thing?
»2) And on to the next thing
»3) So on and so forth [*] Luigi can order the pizza
»===============================
<Date> 2016-09-18
<Topic> The topic of the yesterday
<Attendees> Zelda, Wario, Snoop Dog
»1) Where we went from there
- Who said this
[x] Mario: scheduled this meeting yesterday
- And who wants to do that other thing?
»2) And on to the next thing again
»3) So on and so forth * Luigi can order the sausages
»===============================
テキストを出力するには、次のようになります。
»===============================
<Date> 2016-09-19
<Topic> The topic of the day
<Attendees> Mario, Luigi
»1) Where to go from here
- Someone said this
[*] Mario: schedule this meeting
- And who wants to do that other thing?
»3) So on and so forth [*] Luigi can order the pizza
»===============================
たぶん私はこれで少しの助けを得ることができますか?ありがとう!