source code of /small-scripts/index.html.src

Last modified
Lines 145

Parent directory Download CGIread sitemap Main page

Quick links: content

  1. __HTML5__
  2. __LDJSON__
  3.         __TITLE__
  4.         <meta name="description" content="Various poorly documented scripts
  5. in Python or Bourne shell."/>
  6.     </head>
  7.     <body>
  8.         __NAVIGATION__
  9.         <main><div id="content">
  10.             __H1__
  11.             <h2>The scripts I'm most proud of</h2>
  12.             <dl>
  13.                 <dt>
  14.                     <a translate="no"
  15. href="/read/?path=/small-scripts/minify&amp;referer=/small-scripts/&amp;title=Small+scripts">
  16.                         minify.py
  17.                     </a> - Simple XHTML minifier
  18.                 </dt>
  19.                 <dd>
  20.                     <p>
  21.                         It reads from <code>stdin</code> and writes to
  22.                         <code>stdout</code>.  The reason I wrote this script
  23.                         was that the other HTML minifiers I used were
  24.                         over-optimizing the HTML, causing validation errors.
  25.                     </p>
  26.                     <p>
  27.                         I don't use this script any more, as my new design is
  28.                         based on static XHTML5 being served. (Lighttpd can
  29.                         compress static resources but not the output streams
  30.                         from CGI scripts.)
  31.                     </p>
  32.                 </dd>
  33.                 
  34.                 <dt>
  35.                     <a translate="no"
  36. href="/read/?path=/small-scripts/killbom&amp;referer=/small-scripts/&amp;title=Small+scripts">
  37.                         killbom
  38.                     </a> - Eliminate UTF-8 Byte Order Marks
  39.                 </dt>
  40.                 <dd>
  41.                     <p>
  42.                         This script removes all UTF-8 BOMs from all specified
  43.                         files. Even BOMs, that somehow got somewhere else than
  44.                         in the beginning of the file, are also removed.
  45.                     </p>
  46.                     <p><strong>
  47.                         This script SHOULD NOT be run on binary files due to
  48.                         its very literal operation.
  49.                     </strong></p>
  50.                     <blockquote>
  51. <pre>Usage: killbom [file] ...
  52. killbom removes all UTF-8 BOM marks from files.
  53. WARNING: It really removes all sequences of '\0xEF\0xBB\0xBF'.
  54. WARNING: It accepts no options. All arguments are treated as filenames.
  55. </pre>
  56.                     </blockquote>
  57.                 </dd>
  58.                 
  59.                 <dt>
  60.                     <a translate="no"
  61. href="/read/?path=/small-scripts/shrink-disavow&amp;referer=/small-scripts/&amp;title=Small+scripts">
  62.                         shrink-disavow
  63.                     </a> - Minify Google Webmaster Tools /
  64.                     <span translate="no">Search Console</span>
  65.                 </dt>
  66.                 <dd>
  67.                     <p>
  68.                         It converts multiple complete URLs on the same domain
  69.                         to the <code>domain: </code>syntax.
  70.                     </p>
  71.                     <blockquote>
  72. <pre>Usage: script_name {infile} {outfile} [num_of_links]
  73. num_of_links is the number of URLs from the same domain that will are
  74. required for replacing all those URLs with a single 'domain:'.
  75. The default value is two.
  76. </pre>
  77.                     </blockquote>
  78.                 </dd>
  79.                 
  80.                 <dt>
  81.                     <a translate="no"
  82. href="/read/?path=/mkhtml&amp;referer=/small-scripts/&amp;title=Small+scripts">
  83.                         mkhtml
  84.                     </a> - The key of my new design
  85.                 </dt>
  86.                 <dd>
  87.                     <p>
  88.                         The old design was based on fancy Python scripts
  89.                         generating the content.  I made it too automated for
  90.                         too specific types of content.
  91.                     </p>
  92.                     <p>The objectives for the new design were:</p>
  93.                     <ul>
  94.                         <li>
  95.                             Autogenerate the navigation.
  96.                             The only thing I needed to be done automagically.
  97.                         </li>
  98.                         <li>
  99.                             Work like a macro expander.
  100.                         </li>
  101.                         <li>
  102.                             Generate (mostly) static content,
  103.                             but work for scripts too.
  104.                         </li>
  105.                         <li>
  106.                             Be ran from a Makefile.
  107.                         </li>
  108.                     </ul>
  109.                     <p>It still has some downsides:</p>
  110.                     <ul>
  111.                         <li>
  112.                             A bit terribly implemented.
  113.                         </li>
  114.                         <li>
  115.                             A bit limited in certain cases.
  116.                         </li>
  117.                         <li>
  118.                             Quite ad-hoc.
  119.                         </li>
  120.                         <li>
  121.                             Weird macro syntax.
  122.                         </li>
  123.                     </ul>
  124.                 </dd>
  125.             </dl>
  126.             
  127.             
  128.             <h2>Other scripts</h2>
  129.             <dl>
  130.                 <dt translate="no">
  131.                     <a href="/read/?path=/small-scripts/monitor&amp;referer=/small-scripts/&amp;title=Small+scripts">
  132.                         monitor
  133.                     </a>
  134.                 </dt>
  135.                 <dd>Fail2ban, ps aux | grep ..., °C, loadavg ...</dd>                
  136.             </dl>
  137.         </div></main>
  138.         __FOOTER__
  139.     </body>
  140. </html>