As @chrillek alluded to earlier in the thread, he previously shared a script that does pretty much that. (Unless I misunderstood something). The output is a TextBundle. I think it should be relatively easy to modify it so the output is a regular zip instead.