improved indentation and whitespace for markdown code blocks
All code blocks in markdown have been intended by at least 4 spaces. We add `--tab-stop=8` to all `pandoc(1)` executions in order to set a better tab stop indentation, especially for tab intended code blocks. Changed `bin/pandoc-wrapper.sh` VERSION from "1.5.3 2024-03-26" to "1.6 2024-03-31". Fixed `1991/brnstnd/sorta.README.md` so that the sorta code is code blocks. Removed unneeded paragraph group in copyright in `inc/footer.default.html`. Fixed excess whitespace after list Author on entry `index.html` page. Changed `bin/output-index-author.sh` VERSION from "1.5.2 2024-03-26" to "1.6 2024-03-31". Performed `make www` to perform the above and test under macOS. TODO: Fix the problem of the initial line of code being extra intended. TODO: Fix excess whitespace around code that is inline.
This commit is contained in:
1 parent
b84c27ce02
commit
a996f8d2b8
734 files changed
+16723
-16963
No files matched your search
+14
-14
@@ -1,21 +1,21 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./akari [ input_file | - ] [ output_file | - ] [even]
|
||||
./akari [ input_file | - ] [ output_file | - ] [even]
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -57,10 +57,10 @@ keep odd pixels on odd [scanlines](https://en.wikipedia.org/wiki/Scan_line).
|
||||
### Examples:
|
||||
|
||||
```sh
|
||||
gcc akari.c -o akari
|
||||
./akari < example.ppm > odd_output.ppm
|
||||
./akari - - even < example.ppm > even_output.ppm
|
||||
./akari example.ppm odd_output.ppm
|
||||
gcc akari.c -o akari
|
||||
./akari < example.ppm > odd_output.ppm
|
||||
./akari - - even < example.ppm > even_output.ppm
|
||||
./akari example.ppm odd_output.ppm
|
||||
```
|
||||
|
||||
`Akari` accepts 3 input formats:
|
||||
@@ -83,7 +83,7 @@ ASCII art. Since the source code is formatted as ASCII art, it's only
|
||||
natural to try:
|
||||
|
||||
```sh
|
||||
./akari akari.c akari2.c
|
||||
./akari akari.c akari2.c
|
||||
```
|
||||
|
||||
`akari2.c` is also a valid C program, and accepts up to 1 argument.
|
||||
@@ -92,29 +92,29 @@ expanded output to `stdout`. If the extra argument is specified, the
|
||||
output text will also pass through a rot13 filter.
|
||||
|
||||
```sh
|
||||
gcc akari2.c -o akari2
|
||||
./akari2 < input.txt > expanded_output.txt
|
||||
./akari2 rot13 < input.txt > expanded_and_rot13_output.txt
|
||||
gcc akari2.c -o akari2
|
||||
./akari2 < input.txt > expanded_output.txt
|
||||
./akari2 rot13 < input.txt > expanded_and_rot13_output.txt
|
||||
```
|
||||
|
||||
You can combine the two programs together to have just a regular rot13
|
||||
filter:
|
||||
|
||||
```sh
|
||||
./akari2 rot13 < input.txt | ./akari > rot13.txt
|
||||
./akari2 rot13 < input.txt | ./akari > rot13.txt
|
||||
```
|
||||
|
||||
Of course, we wouldn't stop with just 2 programs, you can downsample
|
||||
the source *again* and get yet another C program:
|
||||
|
||||
```sh
|
||||
./akari < akari.c | ./akari > akari3.c
|
||||
./akari < akari.c | ./akari > akari3.c
|
||||
```
|
||||
|
||||
We must go deeper:
|
||||
|
||||
```sh
|
||||
./akari < akari.c | ./akari | ./akari > akari4.c
|
||||
./akari < akari.c | ./akari | ./akari > akari4.c
|
||||
```
|
||||
|
||||
`akari3.c` and `akari4.c` are still (mostly valid) C programs.
|
||||
|
||||
+15
-16
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Don_Yang">Don Yang</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,11 +141,11 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./akari</span> [ input_file <span class="kw">|</span> <span class="ex">-</span> ] [ output_file <span class="kw">|</span> <span class="ex">-</span> ] <span class="pp">[</span><span class="ss">even</span><span class="pp">]</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./akari</span> [ input_file <span class="kw">|</span> <span class="ex">-</span> ] [ output_file <span class="kw">|</span> <span class="ex">-</span> ] <span class="pp">[</span><span class="ss">even</span><span class="pp">]</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p><code>Akari</code> is an image downsampling utility that accepts 3 input formats:</p>
|
||||
<ul>
|
||||
@@ -172,10 +171,10 @@ will read from <code>stdin</code>.</p>
|
||||
<a href="https://en.wikipedia.org/wiki/Scan_line">scanlines</a>. By default <code>Akari</code> will
|
||||
keep odd pixels on odd <a href="https://en.wikipedia.org/wiki/Scan_line">scanlines</a>.</p>
|
||||
<h3 id="examples">Examples:</h3>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> akari.c <span class="at">-o</span> akari</span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./akari</span> <span class="op"><</span> example.ppm <span class="op">></span> odd_output.ppm</span>
|
||||
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./akari</span> <span class="at">-</span> <span class="at">-</span> even <span class="op"><</span> example.ppm <span class="op">></span> even_output.ppm</span>
|
||||
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./akari</span> example.ppm odd_output.ppm</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">gcc</span> akari.c <span class="at">-o</span> akari</span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">./akari</span> <span class="op"><</span> example.ppm <span class="op">></span> odd_output.ppm</span>
|
||||
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./akari</span> <span class="at">-</span> <span class="at">-</span> even <span class="op"><</span> example.ppm <span class="op">></span> even_output.ppm</span>
|
||||
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a> <span class="ex">./akari</span> example.ppm odd_output.ppm</span></code></pre></div>
|
||||
<p><code>Akari</code> accepts 3 input formats:</p>
|
||||
<ul>
|
||||
<li><a href="https://netpbm.sourceforge.net/doc/pgm.html">PGM</a>
|
||||
@@ -193,22 +192,22 @@ the included <a href="example.ppm">example.ppm</a>.</p>
|
||||
<p>Anything that is not parsable as <code>PGM</code> or <code>PPM</code> will be downsampled as
|
||||
ASCII art. Since the source code is formatted as ASCII art, it’s only
|
||||
natural to try:</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./akari</span> akari.c akari2.c</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./akari</span> akari.c akari2.c</span></code></pre></div>
|
||||
<p><code>akari2.c</code> is also a valid C program, and accepts up to 1 argument.
|
||||
By default, this second program reads text from <code>stdin</code> and writes
|
||||
expanded output to <code>stdout</code>. If the extra argument is specified, the
|
||||
output text will also pass through a rot13 filter.</p>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> akari2.c <span class="at">-o</span> akari2</span>
|
||||
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./akari2</span> <span class="op"><</span> input.txt <span class="op">></span> expanded_output.txt</span>
|
||||
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./akari2</span> rot13 <span class="op"><</span> input.txt <span class="op">></span> expanded_and_rot13_output.txt</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">gcc</span> akari2.c <span class="at">-o</span> akari2</span>
|
||||
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">./akari2</span> <span class="op"><</span> input.txt <span class="op">></span> expanded_output.txt</span>
|
||||
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./akari2</span> rot13 <span class="op"><</span> input.txt <span class="op">></span> expanded_and_rot13_output.txt</span></code></pre></div>
|
||||
<p>You can combine the two programs together to have just a regular rot13
|
||||
filter:</p>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./akari2</span> rot13 <span class="op"><</span> input.txt <span class="kw">|</span> <span class="ex">./akari</span> <span class="op">></span> rot13.txt</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./akari2</span> rot13 <span class="op"><</span> input.txt <span class="kw">|</span> <span class="ex">./akari</span> <span class="op">></span> rot13.txt</span></code></pre></div>
|
||||
<p>Of course, we wouldn’t stop with just 2 programs, you can downsample
|
||||
the source <em>again</em> and get yet another C program:</p>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./akari</span> <span class="op"><</span> akari.c <span class="kw">|</span> <span class="ex">./akari</span> <span class="op">></span> akari3.c</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./akari</span> <span class="op"><</span> akari.c <span class="kw">|</span> <span class="ex">./akari</span> <span class="op">></span> akari3.c</span></code></pre></div>
|
||||
<p>We must go deeper:</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./akari</span> <span class="op"><</span> akari.c <span class="kw">|</span> <span class="ex">./akari</span> <span class="kw">|</span> <span class="ex">./akari</span> <span class="op">></span> akari4.c</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./akari</span> <span class="op"><</span> akari.c <span class="kw">|</span> <span class="ex">./akari</span> <span class="kw">|</span> <span class="ex">./akari</span> <span class="op">></span> akari4.c</span></code></pre></div>
|
||||
<p><code>akari3.c</code> and <code>akari4.c</code> are still (mostly valid) C programs.
|
||||
<code>gcc -Wall</code> will output a few warnings, but still produce output
|
||||
executables. The output executables each print a message to <code>stdout</code>.</p>
|
||||
|
||||
Reference in new issue
Block a user