Saving flat view format

Thanks for linking!

Here's the script: