For historical reasons all modern macOS implementations come with an old terminal-only version of Emacs. So, forget it. Go to https://emacsformacosx.com and download a new up-to-date version with native macOS GUI support. Put it in the App folder as usual and start. Now you have a modern Emacs with icons, buttons, and menus and are ready to go.
You may start with this beginner tutorial: http://ergoemacs.org/emacs/emacs.html.
Then you can download the TaskPaper mode and install it as described in README. If you’ll have trouble installing it, just ask.
After that you can use the TaskPaper mode. README describes it in full details, but the (somewhat unusual) Emacs terminology can make it a little bit problematic for beginners.
For querying a collection of TaskPaper files, TaskPaper mode includes a powerful agenda mode. In this mode items from different TaskPaper files can be collected based on search queries and displayed in an organized way in a special agenda view, which can be further searched, inspected, and saved as a new TaskPaper document.
The screenshot below shows the main TaskPaper document (top part of the window) and the Agenda view showing all items with @pubdate <=[d] 1990
as a flat list (bottom part):
Items in the agenda view are linked back to the TaskPaper file where they originate. You are not allowed to edit the agenda buffer itself, but commands are provided to show and jump to the original item location. See the “Multi-Document Support and Agenda View” section in README for more details.
Now you can save the agenda view and convert it to whatever you want using your scripts.
I hope you’ll find it helpfull. If you have questions or troubles to install or use it, just ask.