I'm looking for a simple program that takes as input text files, allows me to tag them on a relevant paragraph or subsection, and combine those tagged text snippets in files corresponding to each of those tags. For example:
[idea] "this block contains an idea and where I stumbled on it"
[booknote] "this block is a quote from a specific text"
[idea][todo] "something I need to get done that is associated with an idea for some other endeavor"
This would result in, for e.g., a file "idea.txt" that contains the first and third lines along with a timestamp for the write date of these various snippets or of the last write date of the files they come from. In terms of scale, there are a few hundred files to process.
I've seen references to Evernote, OneNote in this thread (How can a writer efficiently manage many text snippets?) but are they best suited for the task I'm after? I wasn't sure if they'd work with text snippets or only whole files that have been tagged. I'm also looking for a lightweight application and to run all this locally and not upload my files to the cloud.