all repos — hastyscribe @ f505faf306c22c51e1f777af51f4b31d30f0b588

A professional markdown compiler.

Preparing for release.
h3rald h3rald@h3rald.com
Thu, 23 Feb 2017 16:21:58 +0100
commit

f505faf306c22c51e1f777af51f4b31d30f0b588

parent

accf81383a738d4c3fdac12f928372905df1130c

M README.mdREADME.md

@@ -33,7 +33,7 @@

* It is a cross-platform, self-contained executable file. * It can generate standalon HTML files. * It comes with its own stylesheet, which is automatically embedded into every HTML document, along with all the needed web fonts. -* It is built on top of [Discount](http://www.pell.portland.or.us/~orc/Code/discount/), which means that besides standard markdown you also get: +* It is built on top of [Discount][discount], which means that besides standard markdown you also get: * strikethrough * automatic Table of Contents generation * [SmartyPants](http://daringfireball.net/projects/smartypants/) substitutions

@@ -59,30 +59,14 @@ HastyScribe is implemented in [Nim][nim], a very expressive language that compiles to C and is able to generate small, standalone and self-contained executable files.

### How do I build _HastyScribe_ from source? -First of all you need a **libmarkdown.a** static library. You can either grab a precompiled one from the [vendor](https://github.com/h3rald/hastyscribe/blob/master/vendor) folder of the HastyScribe repository or build your own. - -If you choose to build your own: - -1. Clone the discount [repository](https://github.com/Orc/discount). -2. In the directory containing the Discount source code, run the following commands: - - ``` - ./configure.sh - - make - ``` - - Tip: If you are on Windows, you can compile Discount using [MinGW-w64](http://mingw-w64.yaxm.org/doku.php). - -Once you have a **libmarkdown.a** static library for your platform: - 1. Download and install [Nim][nim]. -2. Download and install [Nifty][nifty]. +2. Download and build [Nifty][nifty], and put it somewhere in your $PATH. 3. Clone the HastyScribe [repository](https://github.com/h3rald/hastyscribe). -4. Inside the HastyScribe repository local folder, run **nifty install** to download [HastyStyles][hastystyles]. -5. Put your **libmarkdown.a** file in the **vendor** directory. -6. Run **nim c hastyscribe.nim** +4. Navigate to the HastyScribe repository local folder. +5. Run **nifty install** to download HastyScribe's dependencies. +6. Run **nifty build discount** to build the Discount markdown library. +7. Run **nim c -d:release -d:discount hastyscribe.nim** [nim]: http://nim-lang.org/ [nifty]: https://github.com/h3rald/nifty -[hastystyles]: https://github.com/h3rald/nifty +[discount]: http://www.pell.portland.or.us/~orc/Code/discount/
M doc/HastyScribe_UserGuide.htmdoc/HastyScribe_UserGuide.htm

@@ -4559,31 +4559,16 @@ <h3>Building from Source<a href="#document-top" title="Go to top"></a></h3>

<p>You can also build HastyScribe from source, if there is no pre-built binary for your platform.</p> -<p>First of all you need a <span class="file">libmarkdown.a</span> static library. You can either grab one precompiled (Windows or Mac OS X) from the <a href="https://github.com/h3rald/hastyscribe/blob/master/vendor">vendor</a> folder of the HastyScribe repository or build your own.</p> - -<p>If you choose to build your own:</p> - -<ol> -<li>Clone the discount <a href="https://github.com/Orc/discount">repository</a>.</li> -<li><p>In the directory containing the Discount source code, run the following commands:</p> - -<div class="terminal"><p>./configure.sh --with-tabstops=2 --with-dl=both --with-id-anchor --with-github-tags --with-fenced-code --enable-all-features</p> - -<p>make</p></div> - -<div class="tip"><p>Tip</p> - -<p>If you are on Windows, you can compile Discount using <a href="http://mingw-w64.yaxm.org/doku.php">MinGW-w64</a>.</p></div></li> -</ol> - - -<p>Once you have a <span class="file">libmarkdown.a</span> static library for your platform:</p> +<p>To do so, you can:</p> <ol> <li>Download and install <a href="http://nim-lang.org/">Nim</a>.</li> +<li>Download and build <a href="https://github.com/h3rald/nifty">Nifty</a>, and put the nifty executable somewhere in your $PATH.</li> <li>Clone the HastyScribe <a href="https://github.com/h3rald/hastyscribe">repository</a>.</li> -<li>Put your <span class="file">libmarkdown.a</span> file in the <span class="dir">vendor</span> directory.</li> -<li>Run <span class="cmd">nim c hastyscribe.nim</span></li> +<li>Navigate to the HastyScribe repository local folder.</li> +<li>Run <strong>nifty install</strong> to download HastyScribe&rsquo;s dependencies.</li> +<li>Run <strong>nifty build discount</strong> to build the Discount markdown library.</li> +<li>Run <strong>nim c -d:release -d:discount hastyscribe.nim</strong></li> </ol>

@@ -4699,51 +4684,51 @@ </thead>

<tbody> <tr> <td><code>{{$timestamp}}</code> </td> -<td> 1487448208</td> +<td> 1487863280</td> </tr> <tr> <td><code>{{$date}}</code> </td> -<td> 2017-02-18</td> +<td> 2017-02-23</td> </tr> <tr> <td><code>{{$full-date}}</code> </td> -<td> Saturday, February 18, 2017</td> +<td> Thursday, February 23, 2017</td> </tr> <tr> <td><code>{{$long-date}}</code> </td> -<td> February 18, 2017</td> +<td> February 23, 2017</td> </tr> <tr> <td><code>{{$medium-date}}</code> </td> -<td> Feb 18, 2017</td> +<td> Feb 23, 2017</td> </tr> <tr> <td><code>{{$short-date}}</code> </td> -<td> 2/18/17</td> +<td> 2/23/17</td> </tr> <tr> <td><code>{{$short-time}}</code> </td> -<td> 21:03 PM</td> +<td> 16:21 PM</td> </tr> <tr> <td><code>{{$short-time-24}}</code> </td> -<td> 21:03</td> +<td> 16:21</td> </tr> <tr> <td><code>{{$time}}</code> </td> -<td> 21:03:28 PM</td> +<td> 16:21:20 PM</td> </tr> <tr> <td><code>{{$time-24}}</code> </td> -<td> 21:03:28</td> +<td> 16:21:20</td> </tr> <tr> <td><code>{{$day}}</code> </td> -<td> 18</td> +<td> 23</td> </tr> <tr> <td><code>{{$short-day}}</code> </td> -<td> 18</td> +<td> 23</td> </tr> <tr> <td><code>{{$month}}</code> </td>

@@ -4763,11 +4748,11 @@ <td> 17</td>

</tr> <tr> <td><code>{{$weekday}}</code> </td> -<td> Saturday</td> +<td> Thursday</td> </tr> <tr> <td><code>{{$weekday-abbr}}</code> </td> -<td> 18</td> +<td> 23</td> </tr> <tr> <td><code>{{$month-name}}</code> </td>

@@ -5352,7 +5337,7 @@ <h4>Images<a href="#document-top" title="Go to top"></a></h4>

<p>The following HastyScribe Markdown code:</p> -<pre><code>![HastyScribe Logo](../assets/images/hastyscribe.png =221x65) +<pre><code>![HastyScribe Logo](../packages/hastystyles/images/hastyscribe.png =221x65) </code></pre> <p>Produces the following output:</p>

@@ -5690,7 +5675,7 @@

<p style="text-align:center;"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFgAAAAfCAYAAABjy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T6cKGdaHMdUAe1oafGY5+LzWsBLRO+dAnN7Xlf8BOGLNYHeHmZwAAAAASUVORK5CYII=" alt="Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License" /></p> </div> <div id="footer"> - <p><span class="copy"></span> Fabio Cevasco &ndash; February 18, 2017</p> + <p><span class="copy"></span> Fabio Cevasco &ndash; February 23, 2017</p> <p><span>Powered by</span> <a href="https://h3rald.com/hastyscribe"><span class="hastyscribe"></span></a></p> </div> </div>
M doc/HastyScribe_UserGuide.mddoc/HastyScribe_UserGuide.md

@@ -104,29 +104,15 @@ ### Building from Source

You can also build HastyScribe from source, if there is no pre-built binary for your platform. -First of all you need a [libmarkdown.a](class:file) static library. You can either grab one precompiled (Windows or Mac OS X) from the [vendor]({{repo -> https://github.com/h3rald/hastyscribe}}/blob/master/vendor) folder of the {{hs}} repository or build your own. - -If you choose to build your own: - -1. Clone the discount [repository](https://github.com/Orc/discount). -2. In the directory containing the Discount source code, run the following commands: - - > %terminal% - > ./configure.sh \-\-with-tabstops=2 \-\-with-dl=both \-\-with-id-anchor \-\-with-github-tags \-\-with-fenced-code \-\-enable-all-features - > - > make - - > %tip% - > Tip - > - > If you are on Windows, you can compile Discount using [MinGW-w64](http://mingw-w64.yaxm.org/doku.php). - -Once you have a [libmarkdown.a](class:file) static library for your platform: +To do so, you can: 1. Download and install [Nim][nim]. -2. Clone the HastyScribe [repository](https://github.com/h3rald/hastyscribe). -3. Put your [libmarkdown.a](class:file) file in the [vendor](class:dir) directory. -4. Run [nim c hastyscribe.nim](class:cmd) +2. Download and build [Nifty][nifty], and put the nifty executable somewhere in your $PATH. +3. Clone the HastyScribe [repository]({{repo -> https://github.com/h3rald/hastyscribe}}). +4. Navigate to the HastyScribe repository local folder. +5. Run **nifty install** to download HastyScribe's dependencies. +6. Run **nifty build discount** to build the Discount markdown library. +7. Run **nim c -d:release -d:discount hastyscribe.nim** ## Usage

@@ -512,12 +498,12 @@

{{input-text -> The following HastyScribe Markdown code:}} ~~~ -![HastyScribe Logo](../assets/images/hastyscribe.png =221x65) +![HastyScribe Logo](../packages/hastystyles/images/hastyscribe.png =221x65) ~~~ {{output-text -> Produces the following output:}} -![HastyScribe Logo](../assets/images/hastyscribe.png =221x65) +![HastyScribe Logo](../packages/hastystyles/images/hastyscribe.png =221x65) > %tip% > Tip

@@ -830,7 +816,7 @@ * Philip Wernersbach and Joshua Ellis, for contributing to {{hs}}.

* Andreas Rumpf, creator of the amazing [Nim][nim] programming language, used to implement {{hs}}. * Ethan Lai, developer of the handy [Koala](http://koala-app.com/) app, used to compile all the LESS code into CSS. --> ![Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License](../assets/images/by-nc-nd_3.0.png) <- +-> ![Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License](../packages/hastystyles/images/by-nc-nd_3.0.png) <- [nim]: http://nim-lang.org/

@@ -843,3 +829,4 @@ [fa-icons]:http://fortawesome.github.io/Font-Awesome/icons/

[pme]:http://michelf.com/projects/php-markdown/extra/ [sudtipos]:http://www.sudtipos.com/ [release]:{{release -> https://github.com/h3rald/hastyscribe/releases/download/v}} +[nifty]: https://github.com/h3rald/nifty
M markdown.nimmarkdown.nim

@@ -185,14 +185,17 @@ else:

result = "" mkd_cleanup(mmiot) -when defined(macosx): - {.link: "vendor/libmarkdown_macosx_x64.a".} -when defined(windows): - {.link: "vendor/libmarkdown_windows_x64.a".} -when defined(linux): - when defined(arm): - {.link: "vendor/libmarkdown_linux_arm.a".} - when defined(i386): - {.link: "vendor/libmarkdown_linux_x86.a".} - when defined(amd64): - {.link: "vendor/libmarkdown_linux_x64.a".} +when defined(discount): + {.link: "packages/discount/libmarkdown.a".} +else: + when defined(macosx): + {.link: "vendor/libmarkdown_macosx_x64.a".} + when defined(windows): + {.link: "vendor/libmarkdown_windows_x64.a".} + when defined(linux): + when defined(arm): + {.link: "vendor/libmarkdown_linux_arm.a".} + when defined(i386): + {.link: "vendor/libmarkdown_linux_x86.a".} + when defined(amd64): + {.link: "vendor/libmarkdown_linux_x64.a".}
M nifty.jsonnifty.json

@@ -2,6 +2,12 @@ {

"storage": "packages", "commands": { + "build": { + "name+configure.sh": { + "pwd": "{{name}}", + "cmd": "./configure.sh && make" + } + }, "install": { "git+src":

@@ -37,6 +43,14 @@ {

"name": "hastystyles", "src": "https://github.com/h3rald/hastystyles.git", "git": true + }, + "discount": + { + "configure.sh": true, + "name": "discount", + "src": "https://github.com/Orc/discount.git", + "tag": "v2.2.2", + "git": true } } -}+}