PowerShellã®ãã³ãã¬ã¼ãã¨ã³ã¸ã³EPS
rubyのERBã¿ããã®ã
Windowsä¸ã§ããã¹ãçæããã®ã«ãã³ãã¬ã¼ãå¦ççãªãã¨ããããã£ã¦ãã§ãããããrubyã¨ããããã®ããªãã¨æã£ã¦ãPowerShell Galleryで"Template"で検索ãã³ã¼ãçæã¿ããã®ãå¤ãä¸ã§ãEPSããµã¤ãã«ããã¹ãçæãããã®ã£ã½ãã®ã§è©¦ãã¦ã¿ããã¨ã«ã
"<%" "%>"ã§å²ã£ãä¸ã«PowerShellã®ã³ã¼ããæ¸ãã¨å®è¡ããããã¾ãã¾eRuby/ERBã ãã
ReadMe.mdã®ä¾ã
PS> Get-Content Test.eps Hi <%= $name %> <%# this is a comment -%> Please buy me the following items: <% 1..5 | %{ -%> - <%= $_ %> pigs ... <% } -%> Dave is a <% if($True) { %>boy<% } else { %>girl<% } %>. Thanks, Dave <%= (Get-Date -f yyyy-MM-dd) %> PS> Invoke-EpsTemplate -Path Test.eps -Safe -binding @{ name = "dave" } Hi dave Please buy me the following items: - 1 pigs ... - 2 pigs ... - 3 pigs ... - 4 pigs ... - 5 pigs ... Dave is a boy. Thanks, Dave 2017-06-12
ç±æ¥çã«ãããããªãã§ããªããã"EPS"ã£ã¦ååã¯ã©ã¼ãªãï¼ç¹ã«ãã¡ã¤ã«åã®æ¡å¼µåã
ãã¡ã¤ã«å ¥åã®ã¨ãç¸å¯¾ãã¹ã解決ããªã
Invoke-EpsTemplateã«ã¯æååããã¡ã¤ã«ã®ãããããé£ããããã ãã©ããã¡ã¤ã«åã渡ããã¨ãReadMeã«ããããã«ç¸å¯¾ãã¹ã§æ¸ãã¦ããã¾ãå¦çã§ããªããã¨ããããã³ã¼ãã¿ããç°¡åã«ç´ãããã ã£ãã®ã§ãã«ãªã¯ã¨ã¹ãã ãã¨ããã
ãã¹ãã©ããããæ©ãã ãã®ã®ããã¨ãã¨-Pathã«å¯¾ãã¦ãã¹ããªãã£ãã®ã§ã¹ã«ã¼ã
ç¡äºã«åãè¾¼ã¾ããã®ã§ãç¾å¨ã®0.4.0ã®æ¬¡ã®ãªãªã¼ã¹ã§ç´ã£ã¦ãã¨æãã