Feel free to use this snippets or make a pullrequest. Fully open source.
- Join our community on Discord.
- Or access our website to checkout videos and more.
- Checkout our IDE/Framework to macros: Rocket or watch some video about this.
- Or access the Macrosoft heart 💖: CloudScript module and webservice.
Special thanks to Gorlem for building the most awesome docs for Macromod available ever. We love you.
from indenter import Indenter
mylines = [
'IF(&a==&b);',
'LOG("yo");',
'ENDIF;'
]
i = Indenter(lines=mylines)
content = i.indent()
from minifier import Minifier
mycode = """
IF(&a==&b);
LOG("yo");
ENDIF;
"""
i = Minifier(content=mycode)
content = i.minify(remove_comments=True, inject_collons=True, remove_tabs_and_break_lines=True)