Skip to content

Commit

Permalink
Updated changelog + added generation script.
Browse files Browse the repository at this point in the history
  • Loading branch information
h3rald committed Apr 27, 2010
1 parent 95828eb commit 20c3901
Show file tree
Hide file tree
Showing 4 changed files with 219 additions and 49 deletions.
1 change: 1 addition & 0 deletions book/changelog
@@ -0,0 +1 @@
glyph compile text/changelog.glyph ../CHANGELOG.html
36 changes: 0 additions & 36 deletions book/lib/macros/reference.rb
Expand Up @@ -122,43 +122,7 @@
}
end

macro :issue do
exact_parameters 2
ident, desc = @params
interpret %{
tr[
td[=>[http://github.com/h3rald/glyph/issues/closed#issue/#{ident}|##{ident}]]
td[#{desc}]
]
}
end

macro :features do
extra = (@name == :features) ? "Implemented" : "Fixed"
interpret %{
section[header[#{extra} #{@name.to_s.capitalize}||4]
table[
tr[
th[ID]
th[Description]
]
#@value
]
]
}
end

macro :release do
exact_parameters 3
number, date, contents = @params
interpret %{
section[header[v#{number} – #{date}]
#{contents}
]
}
end

macro_alias :options => :parameters
macro_alias '-p' => :ref_error
macro_alias '-o' => :option
macro_alias :bugs => :features
149 changes: 138 additions & 11 deletions book/output/html/glyph.html
Expand Up @@ -18,9 +18,15 @@
html {
background: #fff;
}
p, ol, ul {
ol, ul {
margin: 0.3em 0;
}
p {
margin: 1em 0;
}
td p, td ul, td ol {
margin: 0;
}
table {
border-collapse: collapse;
border-spacing: 0;
Expand Down Expand Up @@ -79,9 +85,7 @@
dd {
font-style: italic;
}
p {
margin: 1em 0;
}

blockquote {
margin: 1em 1em;
font-style: italic;
Expand Down Expand Up @@ -487,7 +491,7 @@ <h2 class="toc-header" id="h_toc">Table of Contents</h2>
<li class="backmatter appendix"><a href="#h_92">Changelog</a></li>
<li><ol><li class="appendix section"><a href="#h_93">Implemented Features</a></li>
<li class="appendix section"><a href="#h_94">Fixed Bugs</a></li>
<li class="appendix section"><a href="#h_95">v0.2.0 &ndash;</a></li>
<li class="appendix section"><a href="#h_95">v0.2.0 &ndash; May 7th 2010 (?)</a></li>
<li class="appendix section"><a href="#h_96">v0.1.0 &ndash; April 8th 2010</a></li>
</ol></li>

Expand Down Expand Up @@ -1063,7 +1067,7 @@ <h4 id="h_18">Evaluating Ruby code and Configuration Settings</h4>
However, it is possible to evaluate simple ruby code snippets using the <code>ruby</code> macro (aliased to <code>%</code>), like this:</p>
<ul>
<li><code>%[2 + 2]</code> &rarr; 4</li>
<li><code>%[Time.now]</code> &rarr; Tue Apr 27 13:54:21 +0200 2010</li>
<li><code>%[Time.now]</code> &rarr; Tue Apr 27 16:30:33 +0200 2010</li>
<li><code>%[Glyph::VERSION]</code> &rarr; 0.1.0</li>
</ul>
<p>The scope for the code evaluation is the Kernel module, (with all inclusions required by Glyph itself).</p>
Expand Down Expand Up @@ -2303,9 +2307,8 @@ <h3 id="h_91"><code>tools.*</code></h3>
</div>
<div class="appendix">
<h2 id="h_92">Changelog</h2>

<div class="section">
<h3 id="h_95">v0.2.0 &ndash;</h3>
<div class="section">
<h3 id="h_95">v0.2.0 &ndash; May 7th 2010 (?)</h3>
<div class="section">
<h4 id="h_93">Implemented Features</h4>
<table>
Expand All @@ -2325,7 +2328,7 @@ <h4 id="h_93">Implemented Features</h4>

</td>
<td>
A new <a href="#m_highlight">highlight</a> macro is available to highlight source code (CodeRay or UltraViolet requireed).
<p>A new <a href="#m_highlight">highlight</a> macro is available to highlight source code (CodeRay or UltraViolet requireed).</p>

</td>
</tr>
Expand All @@ -2337,7 +2340,131 @@ <h4 id="h_93">Implemented Features</h4>

</td>
<td>
It is now possible to use Glyph programmatically via the new <code>Glyph#filter</code> and <code>Glyph#compile</code> methods.
<p>It is now possible to use Glyph programmatically via the new <code>Glyph#filter</code> and <code>Glyph#compile</code> methods.</p>

</td>
</tr>


<tr>
<td>
<a href="http://github.com/h3rald/glyph/issues/closed#issue/87">#87</a>

</td>
<td>
<p>It is now possible to define snippets inside a glyph source file using the <a href="#m_snippet:">snippet:</a> macro.</p>

</td>
</tr>


<tr>
<td>
<a href="http://github.com/h3rald/glyph/issues/closed#issue/88">#88</a>

</td>
<td>
<p>It is now possible to change configuration settings inside a glyph source file using the <a href="#m_config:">config:</a> macro macro (Jabbslad).</p>

</td>
</tr>


<tr>
<td>
<a href="http://github.com/h3rald/glyph/issues/closed#issue/89">#89</a>

</td>
<td>
<p>It is now possible to compile a single .glyph source file without creating a Glyph project.</p>

</td>
</tr>


<tr>
<td>
<a href="http://github.com/h3rald/glyph/issues/closed#issue/92">#92</a>

</td>
<td>
<p>6 new macros have been defined to allow conditional processing (<a href="#m_condition">condition</a> macro, <a href="#m_eq">eq</a> macro, <a href="#m_not">not</a> macro, <a href="#m_and">and</a> macro, <a href="#m_or">or</a> macro, <a href="#m_match">match</a> macro)</p>

</td>
</tr>


<tr>
<td>
<a href="http://github.com/h3rald/glyph/issues/closed#issue/94">#94</a>

</td>
<td>
<p>It is now possible to add <em>validators</em> to macros, for example to check the number of parameters they take.</p>

</td>
</tr>


<tr>
<td>
<a href="http://github.com/h3rald/glyph/issues/closed#issue/97">#97</a>

</td>
<td>
<p>The <a href="#c_compile">compile</a> command command can now take an extra <code>--auto</code> switch to trigger document auto-regeneration whenever a source file is changed.</p>

</td>
</tr>
</table>

</div>


<div class="section">
<h4 id="h_94">Fixed Bugs</h4>
<table>
<tr>
<th>
ID

</th>
<th>
Description

</th>
</tr>
<tr>
<td>
<a href="http://github.com/h3rald/glyph/issues/closed#issue/86">#86</a>

</td>
<td>
<p>Warning and error messages have been updated, and it is now possible to show additional debug information. Additionally, syntax errors are now handled before the document is processed.</p>

</td>
</tr>


<tr>
<td>
<a href="http://github.com/h3rald/glyph/issues/closed#issue/93">#93</a>

</td>
<td>
<p>Default css files were not copied when creating a new project. The issue has been resolved by allowing the <a href="#m_style">style</a> macro to reference Glyph&#8217;s system styles.</p>

</td>
</tr>


<tr>
<td>
<a href="http://github.com/h3rald/glyph/issues/closed#issue/95">#95</a>

</td>
<td>
<p>The <a href="#c_config">config</a> command did not save data to <span class="caps">YAML</span> configuration files. This has been fixed ensuring that internal configuration overrides are not saved to the <span class="caps">YAML</span> file too.</p>

</td>
</tr>
Expand Down
82 changes: 80 additions & 2 deletions book/text/changelog.glyph
@@ -1,10 +1,88 @@
release[0.2.0|![Release date]|
%[=
macro :issue do
exact_parameters 2
ident, desc = @params
interpret %{
tr[
td[\=>[http://github.com/h3rald/glyph/issues/closed#issue/#{ident}\|##{ident}]]
td[textile[#{desc}]]
]
}
end

macro :features do
extra = (@name == :features) ? "Implemented" : "Fixed"
level = Glyph.lite? ? 3 : 4
interpret %{
section[header[#{extra} #{@name.to_s.capitalize}\|\|#{level}]
table[
tr[
th[ID]
th[Description]
]
#@value
]
]
}
end

macro :release do
exact_parameters 3
number, date, contents = @params
interpret %{
section[header[v#{number} &ndash; #{date}]
#{contents}
]
}
end

macro :changelog do
if Glyph.lite? then
interpret %{document[
head[
style[default.css]
title[]
]
body[
#@value
]
]
}
else
interpret @value
end
end

macro_alias :bugs => :features

=]--[-------------------
?[%[lite?]|.[=
$:[document.title\|Glyph Changelog]
$:[document.author\|Fabio Cevasco]
%:[%>\|"#@value macro"]
%:[#>\|"#@value command"]
=]
]
![Explain how to use condition macro with escapes...]
]changelog[
release[0.2.0|May 7th 2010 (?)|
features[
issue[62|A new %>[highlight] is available to highlight source code (CodeRay or UltraViolet requireed).]
issue[76|It is now possible to use Glyph programmatically via the new codeph[Glyph#filter] and codeph[Glyph#compile] methods.]
issue[87|It is now possible to define snippets inside a glyph source file using the %>[snippet:].]
issue[88|It is now possible to change configuration settings inside a glyph source file using the %>[config:] macro (Jabbslad).]
issue[89|It is now possible to compile a single .glyph source file without creating a Glyph project. ![Add new section to document authoring]]
issue[92|6 new macros have been defined to allow conditional processing (\.%>[condition], %>[eq], %>[not], %>[and], %>[or], %>[match])]
issue[94|It is now possible to add _validators_ to macros, for example to check the number of parameters they take.]
issue[97|The #>[compile] command can now take an extra @--auto@ switch to trigger document auto-regeneration whenever a source file is changed.]
]
bugs[
issue[86|Warning and error messages have been updated, and it is now possible to show additional debug information. Additionally, syntax errors are now handled before the document is processed. ![Link to troubleshooting section, expand]]
issue[93|Default css files were not copied when creating a new project. The issue has been resolved by allowing the %>[style] to reference Glyph's system styles. ![New paragraph about system styles]]
issue[95|The #>[config] did not save data to YAML configuration files. This has been fixed ensuring that internal configuration overrides are not saved to the YAML file too.]
]
--[bugs[]]
]
release[0.1.0|April 8th 2010|
Initial release.
]
]

0 comments on commit 20c3901

Please sign in to comment.