A small tool to quickly format Discuz! diy module(I hate it!).
$ npm install -g fast-diy
Add a diy
class name to each html tag which is going to be DIYed and run the fast-diy command:
$ fast-diy INPUT.html OUTPUT.html
Sample input:
<div class="article diy">
<p> test </p>
</div>
Sample output:
<!--[diy=diy-f78e9de8]--><div class="article" id="diy-f78e9de8">
<p> test </p>
</div><!--[/diy]-->
MIT