I have a text-based wiki (a VimWiki) and I want to share arbitrary parts of its texts by automatically copy-pasting the parts marked with {:group1,group2,..,groupN| PART :} into the (shared) folders defined for each group. For example, let's say we have just a single wiki page called OnePage.wiki, and group definitions in GroupDefinitions.wiki.
The task is to recursively copy the extracted and merged fractions of the text into appropriate folders. (Should be a recursive split-apply-merge.) The code you write would be made public, and GPL-licensed.
GroupDefinitions.wiki