How sragu/mt works
Project type and purpose
• This is a small open-source Ruby scripting tool whose sole purpose is to read a single template/config file, split it into a “content” section and a “config” section, substitute template variables per environment, and emit the final XML/INI-style output for each environment.
File structure
• Top level only has:
• README.md – explains usage and format
• app.xml.trb – sample template+config file
• process.rb – the Ruby script entry point
• No separate subfolders or services; this is a single-file CLI utility.
README for additional insights
• The README confirms:
• It’s run via ./process.rb app.xml.trb
• It splits on the delimiter __CONFIG__
• It supports multiple environments in the config section under an env key
• It uses $varname substitution in the content section
Detailed elements
• Module names and responsibilities
• Input/output artifacts (app.xml.trb → rendered XML)
• Key data structures (env list, vars map)
• Header/comment generation step with timestamp metadata