Gathering existing @searches for pasting into a new document

My workflows happen to use a number of TaskPaper files (different projects, different days), and whenever I start a new file, there are usually one or two existing @searches which I want to paste in from other TaskPaper files.

Here is a draft macro which just gathers existing @searches from:

  1. Any TaskPaper files which are open at the moment
  2. One or more default TaskPaper files which you can list in the macro.

It offers a menu (without duplicates) from which you can choose which @searches you want to paste into the active document.


You could also do something like this with TaskPaperRuby.

As a simple example, to grab all @search items from a certain “old” file, and append them to a “new” file gathered into a project called “Searches”, this would do it:

old_doc ="~/Desktop/old.taskpaper")
search_proj ="Searches:")
searches = old_doc.all_items_with_tag("search")

new_doc ="~/Desktop/new.taskpaper")