Advertisement
Guest User

template.d - BaussProjects - daweb

a guest
Dec 4th, 2014
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
D 0.42 KB | None | 0 0
  1. // http://baussprojects.comlu.com/projects.php#daweb
  2. module main;
  3.  
  4. import std.file;
  5.  
  6. void main(string[] args) {
  7.     try {
  8.         string id = args[$-1];
  9.         string path = args[$-2];
  10.         string htmlFile = path ~ id ~ ".dml";
  11.        
  12.         @VARS
  13.         if (exists(htmlFile)) {
  14.             @FUNCS
  15.             string html = readText(htmlFile);
  16.             @CODE
  17.             write(htmlFile, html);
  18.         }
  19.     }
  20.     catch (Throwable t) {
  21.         import std.stdio : writeln;
  22.         writeln(t);
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement