Add LFSA and en PSKOV

This commit is contained in:
2019-05-31 16:59:54 +03:00
parent 04d3b8a79a
commit 296ad257c5
25 changed files with 2792 additions and 262 deletions

View File

@@ -20,11 +20,6 @@
{
color: #433729;
}
iframe
{
width: 720px;
height: 720px;
}
html
{
font-family: sans-serif;
@@ -71,13 +66,13 @@
}
</style>
<title>
PSKOV - Opensource Game Studio static site generator
PSKOV-201905
</title>
</head>
<body>
<div id="header">
<strong id="title">PSKOV</strong>
<a href="index.html">Tool</a>
<a href="tool.pskov.html">Tool</a>
<a href="education.html">Education</a>
</div>
<center><h1>
@@ -102,15 +97,16 @@ Education: 03. Site
</table>
<p></div><div class="contents"></p>
<p>In this document we create a simple static web site with two pages.</p>
<p>Estimated completion time: ? minutes.</p>
<p>Estimated completion time: 10 minutes.</p>
<p><strong>Table of contents</strong></p>
<ul>
<li><a href="#inspiration">01. Inspiration</a></li>
<li><a href="#cfg">02. Investigate <code>cfg</code> file</a></li>
<li><a href="#item">03. Investigate <code>item.template</code> file</a></li>
<li><a href="#md">04. Investigate <code>index.md</code> and <code>cv.md</code> files</a></li>
<li><a href="#md">04. Investigate <code>about.md</code> and <code>cv.md</code> files</a></li>
<li><a href="#lfsa">05. Launch LFSA</a></li>
<li><a href="#gen">06. Generate the site</a></li>
<li><a href="#summary">07. Summary</a></li>
</ul>
<p><a name="inspiration"/></p>
<h2 id="01inspiration">01. Inspiration</h2>
@@ -124,7 +120,7 @@ Education: 03. Site
<ul>
<li>cfg</li>
<li>item.template</li>
<li>index.md</li>
<li>about.md</li>
<li>cv.md</li>
</ul>
<p>Let's look at their contents closer.</p>
@@ -149,7 +145,7 @@ item = item.template
</tr>
<tr>
<td><code>item</code></td>
<td>Points to an HTML template file that will be used to generate HTML files out of Markdown ones</td>
<td>Points to an HTML template file that is used to generate HTML files out of Markdown ones</td>
</tr>
</tbody>
</table>
@@ -162,14 +158,14 @@ item = item.template
&lt;meta charset="utf-8"&gt;
&lt;head&gt;
&lt;style&gt;
- - - - Style was collapsed for brevity - - - -
- - - - Collapsed for brevity - - - -
&lt;/style&gt;
&lt;title&gt;Serov&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id="header"&gt;
&lt;strong&gt;Serov&lt;/strong&gt;
&lt;a href="index.html"&gt;About me&lt;/a&gt;
&lt;a href="about.html"&gt;About me&lt;/a&gt;
&lt;a href="cv.html"&gt;CV&lt;/a&gt;
&lt;/div&gt;
&lt;center&gt;
@@ -177,12 +173,15 @@ item = item.template
&lt;div class="contents"&gt;
PSKOV_ITEM_CONTENTS
&lt;/div&gt;
&lt;div id="footer"&gt;
This sample web site has been generated by &lt;a href="http://opengamestudio.org/pskov"&gt;PSKOV&lt;/a&gt;.
&lt;/div&gt;
&lt;/center&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
<p><strong>Note</strong>: style was collapsed for brevity.</p>
<p>As you can see, <code>item.template</code> is an average HTML file with two constants specified:</p>
<p>As you can see, <code>item.template</code> is an average HTML file with two <strong>PSKOV</strong> constants specified:</p>
<table>
<thead>
<tr>
@@ -207,16 +206,16 @@ PSKOV_ITEM_CONTENTS
<li>page's header section is described below</li>
</ul>
<p><a name="md"/></p>
<h2 id="04investigateindexmdandcvmdfiles">04. Investigate <code>index.md</code> and <code>cv.md</code> files</h2>
<p><code>index.md</code> file has the following contents:</p>
<h2 id="04investigateaboutmdandcvmdfiles">04. Investigate <code>about.md</code> and <code>cv.md</code> files</h2>
<p><code>about.md</code> file has the following contents:</p>
<pre><code> Title: About me
Slug: index
Slug: about
Hi, my name is Valentin Serov. Here's my self-portrait:
![Valentin Serov self-portrait][serov-portrait]
- - - - Contents were collapsed for brevity - - - -
- - - - Collapsed for brevity - - - -
Have a look at my [CV][cv] now.
@@ -228,7 +227,7 @@ PSKOV_ITEM_CONTENTS
[pskov]: http://opengamestudio.org/pskov
[cv]: cv.html
</code></pre>
<p><code>index.md</code> starts with a so-called header section:</p>
<p><code>about.md</code> starts with a so-called header section:</p>
<table>
<thead>
<tr>
@@ -243,11 +242,11 @@ PSKOV_ITEM_CONTENTS
</tr>
<tr>
<td><code>Slug:</code></td>
<td>Tells <strong>PSKOV</strong> that this particular Markdown file should be saved under <code>&lt;slug&gt;.html</code> filename</td>
<td>Tells <strong>PSKOV</strong> that particular Markdown file should be saved under <code>&lt;slug&gt;.html</code> filename</td>
</tr>
</tbody>
</table>
<p>The rest of <code>index.md</code> contents is what any Markdown file looks like.</p>
<p>The rest of <code>about.md</code> contents is what any Markdown file looks like.</p>
<p><strong>Note</strong>: <code>cv</code> page is referenced as <code>cv.html</code>, not <code>cv.md</code></p>
<p><code>cv.md</code> file has the following contents:</p>
<pre><code> Title: Curriculum vitae
@@ -267,8 +266,8 @@ PSKOV_ITEM_CONTENTS
<p>As you can see, there's nothing new in <code>cv.md</code> except for a Markdown table.</p>
<p><a name="lfsa"/></p>
<h2 id="05launchlfsa">05. Launch LFSA</h2>
<p>Launch LFSA so that it points to directory with the files we just observed:</p>
<pre><code>$ /path/to/local-file-system-access.py /path/to/dir/01.TwoPages
<p>Launch <a href="http://opengamestudio.org/lfsa">LFSA</a> so that it points to directory with the files we just observed:</p>
<pre><code>$ /path/to/lfsa-201905.py /path/to/dir/01.TwoPages
</code></pre>
<p>You should see output similar to this:</p>
<pre><code>DIR: '/Users/kornerr/p/site-pskov-sample/01.TwoPages'
@@ -283,10 +282,69 @@ PORT: '8000'
<li><code>Path:</code> points to the same directory you specified before</li>
<li><code>Input directory:</code> and <code>Item template:</code> have values from <code>cfg</code></li></ul></li>
<li>Press <code>Generate</code> button to generate HTML files right where Markdown ones reside</li>
<li>Open generated <code>index.html</code> from the site's directory</li>
<li>Open generated <code>about.html</code> from the site's directory</li>
<li>You should see your web site running locally</li>
</ul>
<p>Take time to observe your new shiny personal web site consisting of two pages.</p>
<p><a name="summary"/></p>
<h2 id="07summary">07. Summary</h2>
<p>You have successfully generated a web site with two pages. <a href="http://opengamestudio.org/pskov/sample/01.TwoPages/about.html">Check out the result</a>.</p>
<p>Introduced PSKOV constants include:</p>
<table>
<thead>
<tr>
<th>PSKOV constant</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>PSKOV_ITEM_TITLE</code></td>
<td>Provides title from <code>Title:</code> part of page's header section</td>
</tr>
<tr>
<td><code>PSKOV_ITEM_CONTENTS</code></td>
<td>Provides HTML contents generated out of Markdown contents</td>
</tr>
</tbody>
</table>
<p>Introduced configuration keys include:</p>
<table>
<thead>
<tr>
<th>Key</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>input</code></td>
<td>Points to a directory where <code>item</code>'s file is located</td>
</tr>
<tr>
<td><code>item</code></td>
<td>Points to an HTML template file that is used to generate HTML files out of Markdown ones</td>
</tr>
</tbody>
</table>
<p>Introduced header constants include:</p>
<table>
<thead>
<tr>
<th>Header constant</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>Title:</code></td>
<td>Provides value for <code>PSKOV_ITEM_TITLE</code> constant when generating HTML out of Markdown</td>
</tr>
<tr>
<td><code>Slug:</code></td>
<td>Tells <strong>PSKOV</strong> that particular Markdown file should be saved under <code>&lt;slug&gt;.html</code> filename</td>
</tr>
</tbody>
</table>
<p></div><div class="contents"></p>
<table>
<thead>