source code of /small-scripts/index.html.src
Last modified | |
Lines | 145 |
Parent directory Download CGIread sitemap Main page
Quick links: content
__HTML5__
__LDJSON__
__TITLE__
<meta name="description" content="Various poorly documented scripts
in Python or Bourne shell."/>
</head>
<body>
__NAVIGATION__
<main><div id="content">
__H1__
<h2>The scripts I'm most proud of</h2>
<dl>
<dt>
<a translate="no"
href="/read/?path=/small-scripts/minify&referer=/small-scripts/&title=Small+scripts">
minify.py
</a> - Simple XHTML minifier
</dt>
<dd>
<p>
It reads from <code>stdin</code> and writes to
<code>stdout</code>. The reason I wrote this script
was that the other HTML minifiers I used were
over-optimizing the HTML, causing validation errors.
</p>
<p>
I don't use this script any more, as my new design is
based on static XHTML5 being served. (Lighttpd can
compress static resources but not the output streams
from CGI scripts.)
</p>
</dd>
<dt>
<a translate="no"
href="/read/?path=/small-scripts/killbom&referer=/small-scripts/&title=Small+scripts">
killbom
</a> - Eliminate UTF-8 Byte Order Marks
</dt>
<dd>
<p>
This script removes all UTF-8 BOMs from all specified
files. Even BOMs, that somehow got somewhere else than
in the beginning of the file, are also removed.
</p>
<p><strong>
This script SHOULD NOT be run on binary files due to
its very literal operation.
</strong></p>
<blockquote>
<pre>Usage: killbom [file] ...
killbom removes all UTF-8 BOM marks from files.
WARNING: It really removes all sequences of '\0xEF\0xBB\0xBF'.
WARNING: It accepts no options. All arguments are treated as filenames.
</pre>
</blockquote>
</dd>
<dt>
<a translate="no"
href="/read/?path=/small-scripts/shrink-disavow&referer=/small-scripts/&title=Small+scripts">
shrink-disavow
</a> - Minify Google Webmaster Tools /
<span translate="no">Search Console</span>
</dt>
<dd>
<p>
It converts multiple complete URLs on the same domain
to the <code>domain: </code>syntax.
</p>
<blockquote>
<pre>Usage: script_name {infile} {outfile} [num_of_links]
num_of_links is the number of URLs from the same domain that will are
required for replacing all those URLs with a single 'domain:'.
The default value is two.
</pre>
</blockquote>
</dd>
<dt>
<a translate="no"
href="/read/?path=/mkhtml&referer=/small-scripts/&title=Small+scripts">
mkhtml
</a> - The key of my new design
</dt>
<dd>
<p>
The old design was based on fancy Python scripts
generating the content. I made it too automated for
too specific types of content.
</p>
<p>The objectives for the new design were:</p>
<ul>
<li>
Autogenerate the navigation.
The only thing I needed to be done automagically.
</li>
<li>
Work like a macro expander.
</li>
<li>
Generate (mostly) static content,
but work for scripts too.
</li>
<li>
Be ran from a Makefile.
</li>
</ul>
<p>It still has some downsides:</p>
<ul>
<li>
A bit terribly implemented.
</li>
<li>
A bit limited in certain cases.
</li>
<li>
Quite ad-hoc.
</li>
<li>
Weird macro syntax.
</li>
</ul>
</dd>
</dl>
<h2>Other scripts</h2>
<dl>
<dt translate="no">
<a href="/read/?path=/small-scripts/monitor&referer=/small-scripts/&title=Small+scripts">
monitor
</a>
</dt>
<dd>Fail2ban, ps aux | grep ..., °C, loadavg ...</dd>
</dl>
</div></main>
__FOOTER__
</body>
</html>