Multi-file compilation, other improvements
h3rald h3rald@h3rald.com
Sat, 19 Oct 2013 19:51:29 +0200
11 files changed,
103 insertions(+),
123 deletions(-)
M
assets/badges.less
→
assets/badges.less
@@ -1,5 +1,8 @@
.todo { .mix-red-badge("todo");} .fixme { .mix-red-badge("fixme");} +.deadline { .mix-red-badge("deadline");} +.important { .mix-red-badge("important");} +.urgent { .mix-red-badge("urgent");} .red-circle {.mix-circle(@bright-red)} .green-circle {.mix-circle(@bright-green)}
M
assets/elements.less
→
assets/elements.less
@@ -199,22 +199,5 @@ text-decoration:none;
&:hover { text-decoration:underline; } - &:before { - font-style: normal; - } } -a[href*=http]:before { - font-weight: bold; - content: "\21AA "; -} -a[href^=mailto]:before { - font-weight: bold; - font-size: 110%; - content: "\2709 " -} -a[href^=tel]:before { - font-weight: bold; - font-size: 110%; - content: "\2706 " -}
M
assets/hastyscribe.css
→
assets/hastyscribe.css
@@ -1,1 +1,1 @@
-/*! normalize.css v2.1.3 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden],template{display:none}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}a{background:transparent}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}body{background-color:#fff;margin:0 auto;height:100%;zoom:1;letter-spacing:normal;word-spacing:normal;color:#333;font:15px "Calibri","Helvetica","Arial","Freesans","Clean",sans-serif;line-height:1.4;-webkit-font-smoothing:antialiased;width:960px;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;-o-hyphens:auto;hyphens:auto}@media screen and (max-width:959px){body{width:100%}}@media screen and (min-width:960px){body{width:960px}}#main,#footer,#header{width:96%;margin:auto}#footer{text-align:center;font-size:70%}#toc{margin-top:-10px}#toc ul{list-style-type:none;padding-left:20px}#toc>ul{padding-left:0}ul,ol{padding-left:30px}dl{margin-left:5px}dl dt{font-weight:bold}h1,h2,h3,h4,h5,h6{color:#111;border-bottom:1px solid #ddd}blockquote{border-left:3px solid #dedede;padding:0 10px;margin:10px 0;font-style:italic}pre{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#333;background-color:#efefef;border:1px solid #999;margin:auto;font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace}pre code{box-shadow:none;padding:0;border:0}table{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#333;background-color:transparent;border:1px solid #999;border-collapse:collapse;margin:15px auto;border-spacing:0;empty-cells:show}table thead{background:#efefef;color:#222;text-align:left;vertical-align:bottom}table td,table th{background-color:transparent;border:1px solid #999;font-size:inherit;margin:0;overflow:visible;padding:6px 12px}address{font-style:italic;color:#999}hr{border:0;height:1px;background-image:-webkit-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0));background-image:-moz-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0));background-image:-ms-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0));background-image:-o-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0))}code,span.code{color:#333;background-color:#efefef;padding:0 3px 0;display:inline-block;width:auto;margin:1px;border:1px solid #999;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;text-shadow:0 1px 0 rgba(255,255,255,0.8);box-shadow:0 1px 3px rgba(0,0,0,0.1);font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace;font-size:80%;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}kbd,span.kbd{color:#333;background-color:#efefef;padding:0 3px 0;display:inline-block;width:auto;margin:1px;border:1px solid #999;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;text-shadow:0 1px 0 rgba(255,255,255,0.8);box-shadow:0 1px 3px rgba(0,0,0,0.1);font-weight:bold;border-right:1px solid #333;border-bottom:1px solid #333;line-height:.9em;font-size:85%;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}mark,span.mark{padding:0 1px;color:#222}abbr,span.abbr{font-variant:small-caps;font-weight:bolder;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}abbr:hover,span.abbr:hover{cursor:help}samp,span.samp{font-size:80%;color:#333;background-color:#efefef;padding:0 3px 0;display:inline-block;width:auto;margin:1px;border:1px solid #efefef;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;text-shadow:0 1px 0 rgba(255,255,255,0.8);box-shadow:0 1px 3px rgba(0,0,0,0.1);-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}var,span.var{font-size:80%;font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace;font-weight:bold;font-style:normal;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}cite,span.cite{font-weight:bold;font-style:italic;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}q,span.q{font-style:italic;color:#666;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}tt,span.tt{font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace;font-size:80%;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}a,a:visited{color:#4183c4;text-decoration:none}a:hover,a:visited:hover{text-decoration:underline}a:before,a:visited:before{font-style:normal}a[href*=http]:before{font-weight:bold;content:"\21AA "}a[href^=mailto]:before{font-weight:bold;font-size:110%;content:"\2709 "}a[href^=tel]:before{font-weight:bold;font-size:110%;content:"\2706 "}.note{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#555;background-color:#efefef;border:1px solid #efefef}.note p{margin-top:0;margin-bottom:0}.note p:first-child{font-size:105%;font-style:italic;color:#333}.warning{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#555;background-color:#efefef;border:1px solid #555;padding:7px 7px 0 7px}.warning p{margin-top:0;margin-bottom:0}.warning p:first-child{font-size:105%;font-weight:bold;color:#333}.sidebar{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#555;background-color:#efefef;border:1px solid #efefef}.sidebar p{margin-top:0;margin-bottom:0}.sidebar p:first-child{font-size:105%;font-weight:bold;color:#333}.note,.warning{width:66.6667%}@media screen and (max-width:599px){.note,.warning{width:96%}}@media screen and (min-width:600px){.note,.warning{width:66.6667%}}.todo{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:top}.todo:before{font-variant:small-caps;font-size:120%;content:"todo"}.fixme{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:top}.fixme:before{font-variant:small-caps;font-size:120%;content:"fixme"}.red-circle:before{font-style:normal;font-size:100%;color:#c30;content:"\25CF"}.green-circle:before{font-style:normal;font-size:100%;color:#0c3;content:"\25CF"}.yellow-circle:before{font-style:normal;font-size:100%;color:#f5b800;content:"\25CF"}.gray-circle:before{font-style:normal;font-size:100%;color:#999;content:"\25CF"}.star:before{font-style:normal;font-size:100%;color:#f5b800;content:"\2605"}.heart:before{font-style:normal;font-size:100%;color:#c30;content:"\2665"}.cross:before{font-style:normal;font-size:100%;color:#c30;content:"\2718 "}.check:before{font-style:normal;font-size:100%;color:#0c3;content:"\2714 "}+/*! normalize.css v2.1.3 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden],template{display:none}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}a{background:transparent}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}body{background-color:#fff;margin:0 auto;height:100%;zoom:1;letter-spacing:normal;word-spacing:normal;color:#333;font:15px "Calibri","Helvetica","Arial","Freesans","Clean",sans-serif;line-height:1.4;-webkit-font-smoothing:antialiased;width:960px;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;-o-hyphens:auto;hyphens:auto}@media screen and (max-width:959px){body{width:100%}}@media screen and (min-width:960px){body{width:960px}}#main,#footer,#header{width:96%;margin:auto}#footer{text-align:center;font-size:70%}#toc{margin-top:-10px}#toc ul{list-style-type:none;padding-left:20px}#toc>ul{padding-left:0}ul,ol{padding-left:30px}dl{margin-left:5px}dl dt{font-weight:bold}h1,h2,h3,h4,h5,h6{color:#111;border-bottom:1px solid #ddd}blockquote{border-left:3px solid #dedede;padding:0 10px;margin:10px 0;font-style:italic}pre{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#333;background-color:#efefef;border:1px solid #999;margin:auto;font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace}pre code{box-shadow:none;padding:0;border:0}table{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#333;background-color:transparent;border:1px solid #999;border-collapse:collapse;margin:15px auto;border-spacing:0;empty-cells:show}table thead{background:#efefef;color:#222;text-align:left;vertical-align:bottom}table td,table th{background-color:transparent;border:1px solid #999;font-size:inherit;margin:0;overflow:visible;padding:6px 12px}address{font-style:italic;color:#999}hr{border:0;height:1px;background-image:-webkit-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0));background-image:-moz-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0));background-image:-ms-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0));background-image:-o-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0))}code,span.code{color:#333;background-color:#efefef;padding:0 3px 0;display:inline-block;width:auto;margin:1px;border:1px solid #999;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;text-shadow:0 1px 0 rgba(255,255,255,0.8);box-shadow:0 1px 3px rgba(0,0,0,0.1);font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace;font-size:80%;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}kbd,span.kbd{color:#333;background-color:#efefef;padding:0 3px 0;display:inline-block;width:auto;margin:1px;border:1px solid #999;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;text-shadow:0 1px 0 rgba(255,255,255,0.8);box-shadow:0 1px 3px rgba(0,0,0,0.1);font-weight:bold;border-right:1px solid #333;border-bottom:1px solid #333;line-height:.9em;font-size:85%;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}mark,span.mark{padding:0 1px;color:#222}abbr,span.abbr{font-variant:small-caps;font-weight:bolder;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}abbr:hover,span.abbr:hover{cursor:help}samp,span.samp{font-size:80%;color:#333;background-color:#efefef;padding:0 3px 0;display:inline-block;width:auto;margin:1px;border:1px solid #efefef;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;text-shadow:0 1px 0 rgba(255,255,255,0.8);box-shadow:0 1px 3px rgba(0,0,0,0.1);-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}var,span.var{font-size:80%;font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace;font-weight:bold;font-style:normal;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}cite,span.cite{font-weight:bold;font-style:italic;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}q,span.q{font-style:italic;color:#666;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}tt,span.tt{font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace;font-size:80%;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}a,a:visited{color:#4183c4;text-decoration:none}a:hover,a:visited:hover{text-decoration:underline}.note{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#555;background-color:#efefef;border:1px solid #efefef}.note p{margin-top:0;margin-bottom:0}.note p:first-child{font-size:105%;font-style:italic;color:#333}.warning{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#555;background-color:#efefef;border:1px solid #555;padding:7px 7px 0 7px}.warning p{margin-top:0;margin-bottom:0}.warning p:first-child{font-size:105%;font-weight:bold;color:#333}.sidebar{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#555;background-color:#efefef;border:1px solid #efefef}.sidebar p{margin-top:0;margin-bottom:0}.sidebar p:first-child{font-size:105%;font-weight:bold;color:#333}.note,.warning{width:66.6667%}@media screen and (max-width:599px){.note,.warning{width:96%}}@media screen and (min-width:600px){.note,.warning{width:66.6667%}}.todo{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:super}.todo:before{font-variant:small-caps;font-size:120%;content:"todo"}.fixme{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:super}.fixme:before{font-variant:small-caps;font-size:120%;content:"fixme"}.deadline{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:super}.deadline:before{font-variant:small-caps;font-size:120%;content:"deadline"}.important{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:super}.important:before{font-variant:small-caps;font-size:120%;content:"important"}.urgent{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:super}.urgent:before{font-variant:small-caps;font-size:120%;content:"urgent"}.red-circle:before{font-style:normal;font-size:100%;color:#c30;content:"\25CF"}.green-circle:before{font-style:normal;font-size:100%;color:#0c3;content:"\25CF"}.yellow-circle:before{font-style:normal;font-size:100%;color:#f5b800;content:"\25CF"}.gray-circle:before{font-style:normal;font-size:100%;color:#999;content:"\25CF"}.star:before{font-style:normal;font-size:100%;color:#f5b800;content:"\2605"}.heart:before{font-style:normal;font-size:100%;color:#c30;content:"\2665"}.cross:before{font-style:normal;font-size:100%;color:#c30;content:"\2718 "}.check:before{font-style:normal;font-size:100%;color:#0c3;content:"\2714 "}
M
assets/mixins.less
→
assets/mixins.less
@@ -36,7 +36,7 @@ .mix-red-badge (@text){
font-weight: bold; color: @bright-red; text-decoration: underline; - vertical-align: top; + vertical-align: super; &:before { font-variant: small-caps; font-size: 120%;
M
hastyscribe.nim
→
hastyscribe.nim
@@ -13,6 +13,9 @@ markdown_file The markdown file to compile into HTML.
Options: --notoc Do not generate a Table of Contents.""" +var generate_toc = true +const src_css = "assets/hastyscribe.css".slurp + # Procedures proc parse_date(date: string, timeinfo: var TTimeInfo): bool =@@ -34,75 +37,47 @@
proc style_tag(css): string = result = "<style>$1</style>" % [css] -# Source Files -const src_css = "assets/hastyscribe.css".slurp - - -### MAIN - -var input_file = "" -var generate_toc = true +proc convert_file(input_file: string) = + let inputsplit = input_file.splitFile -# Parse Parameters - -for kind, key, val in getopt(): - case kind - of cmdArgument: - input_file = key - of cmdLongOption: - if key == "notoc": - generate_toc = false - else: nil - -if input_file == "": - quit(usage, 1) - -if input_file.existsFile == false: - quit("Error: file \"$1\" does not exist" % [input_file], 2) - + # Output file name + let output_file = inputsplit.dir/inputsplit.name & ".htm" + let source = input_file.readFile -let inputsplit = input_file.splitFile + # Document Variables + var metadata = TMDMetaData(title:"", author:"", date:"") + var body = source.md(MKD_DOTOC or MKD_EXTRA_FOOTNOTE, metadata) + let css = src_css.style_tag -# Output file name -let output_file = inputsplit.dir/inputsplit.name & ".htm" + # Manage metadata + if metadata.author != "": + metadata.author = "by <em>" & metadata.author & "</em> –" -let source = input_file.readFile + var title_tag, header_tag, toc: string + if metadata.title != "": + title_tag = "<title>" & metadata.title & "</title>" + header_tag = "<div id=\"header\"><h1>" & metadata.title & "</h1></div>" + else: + title_tag = "" + header_tag = "" -# Document Variables -var metadata = TMDMetaData(title:"", author:"", date:"") -var body = source.md(MKD_DOTOC or MKD_EXTRA_FOOTNOTE, metadata) -let css = src_css.style_tag + if generate_toc == true and metadata.toc != "": + toc = "<div id=\"toc\">" & metadata.toc & "</div>" + else: + toc = "" -# Manage metadata -if metadata.author != "": - metadata.author = "by <em>" & metadata.author & "</em> –" + # Date parsing and validation + var timeinfo: TTimeInfo -var title_tag, header_tag, toc: string - -if metadata.title != "": - title_tag = "<title>" & metadata.title & "</title>" - header_tag = "<div id=\"header\"><h1>" & metadata.title & "</h1></div>" -else: - title_tag = "" - header_tag = "" - -if generate_toc == true and metadata.toc != "": - toc = "<div id=\"toc\">" & metadata.toc & "</div>" -else: - toc = "" - -# Date parsing and validation -var timeinfo: TTimeInfo - -if metadata.date == "": - discard parse_date(getDateStr(), timeinfo) -else: - if parse_date(metadata.date, timeinfo) == false: + if metadata.date == "": discard parse_date(getDateStr(), timeinfo) + else: + if parse_date(metadata.date, timeinfo) == false: + discard parse_date(getDateStr(), timeinfo) -let document = """<!doctype html> + let document = """<!doctype html> <html lang="en"> <head> $title_tag@@ -114,9 +89,7 @@ $css
</head> <body> $header_tag - <div id="toc"> - $toc - </div> + $toc <div id="main"> $body </div>@@ -124,5 +97,39 @@ <div id="footer">
<p>$author Created on $date</p> </div> </body>""" % ["title_tag", title_tag, "header_tag", header_tag, "author", metadata.author, "date", timeinfo.format("MMMM d, yyyy"), "toc", toc, "css", css, "body", body] + output_file.writeFile(document) + + +### MAIN -output_file.writeFile(document) +var input = "" +var files = @[""] + +discard files.pop + +# Parse Parameters + +for kind, key, val in getopt(): + case kind + of cmdArgument: + input = key + of cmdLongOption: + if key == "notoc": + generate_toc = false + else: nil + +if input == "": + quit(usage, 1) + +for file in walkFiles(input): + let filesplit = file.splitFile + if (filesplit.ext == ".md" or filesplit.ext == ".markdown"): + files.add(file) + +if files.len == 0: + quit("Error: \"$1\" does not match any markdown file" % [input], 2) +else: + for file in files: + convert_file(file) + +
M
markdown.nim
→
markdown.nim
@@ -151,9 +151,9 @@ valid_metadata = true
else: valid_metadata = false if lns[0][0] == '%': - offset = 1 + offset = 2 if lns[1][0] == '%': - offset = 2 + offset = 3 var str = cstring(lns[offset..lns.len-1].join("\n")) var mmiot = mkd_string(str, cint(str.len-1), flags) if valid_metadata:@@ -164,7 +164,10 @@ discard mkd_compile(mmiot, flags)
if (int(flags) and MKD_DOTOC) == MKD_DOTOC: var toc = allocCStringArray([""]) discard $mkd_toc(mmiot, toc) - data.toc = cstringArrayToSeq(toc)[0] + try: + data.toc = cstringArrayToSeq(toc)[0] + except: + data.toc = "" var res = allocCStringArray([""]) discard mkd_document(mmiot, res) result = cstringArrayToSeq(res)[0]
M
osxbuild
→
osxbuild
@@ -1,6 +1,2 @@
#!/usr/bin/env bash -/usr/local/Cellar/nimrod/0.9.2/libexec/bin/nimrod c --clib:markdown --clibdir:$PWD/vendor hastyscribe.nim -if [ -f hastyscribe ]; -then - mv hastyscribe build/osx/ -fi +/usr/local/Cellar/nimrod/0.9.2/libexec/bin/nimrod c --clib:markdown_osx --clibdir:$PWD/vendor hastyscribe.nim
M
test/test.htm
→
test/test.htm
@@ -1,15 +1,16 @@
-<!doctype html> -<html lang="en"> -<head> - <title>HastyScribe Test Document</title> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <meta name="author" content="by <em>Fabio Cevasco</em> –"> - <style>/*! normalize.css v2.1.3 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden],template{display:none}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}a{background:transparent}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}body{background-color:#fff;margin:0 auto;height:100%;zoom:1;letter-spacing:normal;word-spacing:normal;color:#333;font:15px "Calibri","Helvetica","Arial","Freesans","Clean",sans-serif;line-height:1.4;-webkit-font-smoothing:antialiased;width:960px;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;-o-hyphens:auto;hyphens:auto}@media screen and (max-width:959px){body{width:100%}}@media screen and (min-width:960px){body{width:960px}}#main,#footer,#header{width:96%;margin:auto}#footer{text-align:center;font-size:70%}#toc{margin-top:-10px}#toc ul{list-style-type:none;padding-left:20px}#toc>ul{padding-left:0}ul,ol{padding-left:30px}dl{margin-left:5px}dl dt{font-weight:bold}h1,h2,h3,h4,h5,h6{color:#111;border-bottom:1px solid #ddd}blockquote{border-left:3px solid #dedede;padding:0 10px;margin:10px 0;font-style:italic}pre{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#333;background-color:#efefef;border:1px solid #999;margin:auto;font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace}pre code{box-shadow:none;padding:0;border:0}table{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#333;background-color:transparent;border:1px solid #999;border-collapse:collapse;margin:15px auto;border-spacing:0;empty-cells:show}table thead{background:#efefef;color:#222;text-align:left;vertical-align:bottom}table td,table th{background-color:transparent;border:1px solid #999;font-size:inherit;margin:0;overflow:visible;padding:6px 12px}address{font-style:italic;color:#999}hr{border:0;height:1px;background-image:-webkit-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0));background-image:-moz-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0));background-image:-ms-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0));background-image:-o-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0))}code,span.code{color:#333;background-color:#efefef;padding:0 3px 0;display:inline-block;width:auto;margin:1px;border:1px solid #999;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;text-shadow:0 1px 0 rgba(255,255,255,0.8);box-shadow:0 1px 3px rgba(0,0,0,0.1);font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace;font-size:80%;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}kbd,span.kbd{color:#333;background-color:#efefef;padding:0 3px 0;display:inline-block;width:auto;margin:1px;border:1px solid #999;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;text-shadow:0 1px 0 rgba(255,255,255,0.8);box-shadow:0 1px 3px rgba(0,0,0,0.1);font-weight:bold;border-right:1px solid #333;border-bottom:1px solid #333;line-height:.9em;font-size:85%;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}mark,span.mark{padding:0 1px;color:#222}abbr,span.abbr{font-variant:small-caps;font-weight:bolder;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}abbr:hover,span.abbr:hover{cursor:help}samp,span.samp{font-size:80%;color:#333;background-color:#efefef;padding:0 3px 0;display:inline-block;width:auto;margin:1px;border:1px solid #efefef;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;text-shadow:0 1px 0 rgba(255,255,255,0.8);box-shadow:0 1px 3px rgba(0,0,0,0.1);-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}var,span.var{font-size:80%;font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace;font-weight:bold;font-style:normal;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}cite,span.cite{font-weight:bold;font-style:italic;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}q,span.q{font-style:italic;color:#666;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}tt,span.tt{font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace;font-size:80%;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}a,a:visited{color:#4183c4;text-decoration:none}a:hover,a:visited:hover{text-decoration:underline}a:before,a:visited:before{font-style:normal}a[href*=http]:before{font-weight:bold;content:"\21AA "}a[href^=mailto]:before{font-weight:bold;font-size:110%;content:"\2709 "}a[href^=tel]:before{font-weight:bold;font-size:110%;content:"\2706 "}.note{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#555;background-color:#efefef;border:1px solid #efefef}.note p{margin-top:0;margin-bottom:0}.note p:first-child{font-size:105%;font-style:italic;color:#333}.warning{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#555;background-color:#efefef;border:1px solid #555;padding:7px 7px 0 7px}.warning p{margin-top:0;margin-bottom:0}.warning p:first-child{font-size:105%;font-weight:bold;color:#333}.sidebar{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#555;background-color:#efefef;border:1px solid #efefef}.sidebar p{margin-top:0;margin-bottom:0}.sidebar p:first-child{font-size:105%;font-weight:bold;color:#333}.note,.warning{width:66.6667%}@media screen and (max-width:599px){.note,.warning{width:96%}}@media screen and (min-width:600px){.note,.warning{width:66.6667%}}.todo{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:top}.todo:before{font-variant:small-caps;font-size:120%;content:"todo"}.fixme{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:top}.fixme:before{font-variant:small-caps;font-size:120%;content:"fixme"}.red-circle:before{font-style:normal;font-size:100%;color:#c30;content:"\25CF"}.green-circle:before{font-style:normal;font-size:100%;color:#0c3;content:"\25CF"}.yellow-circle:before{font-style:normal;font-size:100%;color:#f5b800;content:"\25CF"}.gray-circle:before{font-style:normal;font-size:100%;color:#999;content:"\25CF"}.star:before{font-style:normal;font-size:100%;color:#f5b800;content:"\2605"}.heart:before{font-style:normal;font-size:100%;color:#c30;content:"\2665"}.cross:before{font-style:normal;font-size:100%;color:#c30;content:"\2718 "}.check:before{font-style:normal;font-size:100%;color:#0c3;content:"\2714 "}</style> -</head> -<body> - <div id="header"><h1>HastyScribe Test Document</h1></div> - <div id="toc"> +<!doctype html> +<html lang="en"> +<head> + <title>HastyScribe Test Document</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta name="author" content="by <em>Fabio Cevasco</em> –"> + <meta name="generator" content="HastyScribe"> + <style>/*! normalize.css v2.1.3 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden],template{display:none}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}a{background:transparent}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}body{background-color:#fff;margin:0 auto;height:100%;zoom:1;letter-spacing:normal;word-spacing:normal;color:#333;font:15px "Calibri","Helvetica","Arial","Freesans","Clean",sans-serif;line-height:1.4;-webkit-font-smoothing:antialiased;width:960px;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;-o-hyphens:auto;hyphens:auto}@media screen and (max-width:959px){body{width:100%}}@media screen and (min-width:960px){body{width:960px}}#main,#footer,#header{width:96%;margin:auto}#footer{text-align:center;font-size:70%}#toc{margin-top:-10px}#toc ul{list-style-type:none;padding-left:20px}#toc>ul{padding-left:0}ul,ol{padding-left:30px}dl{margin-left:5px}dl dt{font-weight:bold}h1,h2,h3,h4,h5,h6{color:#111;border-bottom:1px solid #ddd}blockquote{border-left:3px solid #dedede;padding:0 10px;margin:10px 0;font-style:italic}pre{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#333;background-color:#efefef;border:1px solid #999;margin:auto;font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace}pre code{box-shadow:none;padding:0;border:0}table{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#333;background-color:transparent;border:1px solid #999;border-collapse:collapse;margin:15px auto;border-spacing:0;empty-cells:show}table thead{background:#efefef;color:#222;text-align:left;vertical-align:bottom}table td,table th{background-color:transparent;border:1px solid #999;font-size:inherit;margin:0;overflow:visible;padding:6px 12px}address{font-style:italic;color:#999}hr{border:0;height:1px;background-image:-webkit-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0));background-image:-moz-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0));background-image:-ms-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0));background-image:-o-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.75),rgba(0,0,0,0))}code,span.code{color:#333;background-color:#efefef;padding:0 3px 0;display:inline-block;width:auto;margin:1px;border:1px solid #999;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;text-shadow:0 1px 0 rgba(255,255,255,0.8);box-shadow:0 1px 3px rgba(0,0,0,0.1);font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace;font-size:80%;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}kbd,span.kbd{color:#333;background-color:#efefef;padding:0 3px 0;display:inline-block;width:auto;margin:1px;border:1px solid #999;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;text-shadow:0 1px 0 rgba(255,255,255,0.8);box-shadow:0 1px 3px rgba(0,0,0,0.1);font-weight:bold;border-right:1px solid #333;border-bottom:1px solid #333;line-height:.9em;font-size:85%;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}mark,span.mark{padding:0 1px;color:#222}abbr,span.abbr{font-variant:small-caps;font-weight:bolder;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}abbr:hover,span.abbr:hover{cursor:help}samp,span.samp{font-size:80%;color:#333;background-color:#efefef;padding:0 3px 0;display:inline-block;width:auto;margin:1px;border:1px solid #efefef;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;text-shadow:0 1px 0 rgba(255,255,255,0.8);box-shadow:0 1px 3px rgba(0,0,0,0.1);-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}var,span.var{font-size:80%;font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace;font-weight:bold;font-style:normal;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}cite,span.cite{font-weight:bold;font-style:italic;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}q,span.q{font-style:italic;color:#666;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}tt,span.tt{font-family:"Monaco","DejaVu Sans Mono","Courier New",monospace;font-size:80%;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}a,a:visited{color:#4183c4;text-decoration:none}a:hover,a:visited:hover{text-decoration:underline}.note{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#555;background-color:#efefef;border:1px solid #efefef}.note p{margin-top:0;margin-bottom:0}.note p:first-child{font-size:105%;font-style:italic;color:#333}.warning{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#555;background-color:#efefef;border:1px solid #555;padding:7px 7px 0 7px}.warning p{margin-top:0;margin-bottom:0}.warning p:first-child{font-size:105%;font-weight:bold;color:#333}.sidebar{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:10px auto;padding:7px 7px 0 7px;box-shadow:0 1px 3px rgba(0,0,0,0.1);text-shadow:0 1px 0 rgba(255,255,255,0.8);color:#555;background-color:#efefef;border:1px solid #efefef}.sidebar p{margin-top:0;margin-bottom:0}.sidebar p:first-child{font-size:105%;font-weight:bold;color:#333}.note,.warning{width:66.6667%}@media screen and (max-width:599px){.note,.warning{width:96%}}@media screen and (min-width:600px){.note,.warning{width:66.6667%}}.todo{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:top}.todo:before{font-variant:small-caps;font-size:120%;content:"todo"}.fixme{font-weight:bold;color:#c30;text-decoration:underline;vertical-align:top}.fixme:before{font-variant:small-caps;font-size:120%;content:"fixme"}.red-circle:before{font-style:normal;font-size:100%;color:#c30;content:"\25CF"}.green-circle:before{font-style:normal;font-size:100%;color:#0c3;content:"\25CF"}.yellow-circle:before{font-style:normal;font-size:100%;color:#f5b800;content:"\25CF"}.gray-circle:before{font-style:normal;font-size:100%;color:#999;content:"\25CF"}.star:before{font-style:normal;font-size:100%;color:#f5b800;content:"\2605"}.heart:before{font-style:normal;font-size:100%;color:#c30;content:"\2665"}.cross:before{font-style:normal;font-size:100%;color:#c30;content:"\2718 "}.check:before{font-style:normal;font-size:100%;color:#0c3;content:"\2714 "}</style> +</head> +<body> + <div id="header"><h1>HastyScribe Test Document</h1></div> + <div id="toc"> <div id="toc"><ul> <li> <ul>@@ -40,13 +41,12 @@ <li><a href="#Tables">Tables</a></li>
</ul> </li> <li><a href="#Badges">Badges</a></li> - <li><a href="#Links">Links</a></li> </ul> </li> </ul> -</div> - </div> - <div id="main"> +</div> + </div> + <div id="main"> <h2 id="Inline.Styles">Inline Styles</h2> <h3 id="Text.Decorations">Text Decorations</h3>@@ -190,20 +190,9 @@ <li><span class="cross">no</span> <span class="check">yes!</span></li>
</ul> -<h2 id="Links">Links</h2> - -<ul> -<li>Internal Link: <a href="#Lists">Lists</a></li> -<li>External Link: <a href="http://h3rald.com">H3RALD.com</a></li> -<li>Telephone: <a href="tel://+13536326">+1 353 6326</a></li> -<li>Auto External Link: <a href="http://www.google.com">http://www.google.com</a></li> -<li>Auto Email Link: <a href="mailto:h3rald@h3rald.com">h3rald@h3rald.com</a></li> -</ul> - - -<hr /> - </div> - <div id="footer"> - <p>by <em>Fabio Cevasco</em> – Generated with <a href="https://github.com/h3rald/hastyscribe/">HastyScribe</a> on October 12, 2013</p> - </div> +<hr /> + </div> + <div id="footer"> + <p>by <em>Fabio Cevasco</em> – Created on October 15, 2013</p> + </div> </body>
M
winbuild.bat
→
winbuild.bat
@@ -1,3 +1,2 @@
@echo off -nimrod --clibdir:vendor --clib:markdown c hastyscribe.nim -if exist hastyscribe.exe move hastyscribe.exe build\win\hastyscribe.exe +nimrod --clibdir:vendor --clib:markdown_win c hastyscribe.nim