Changeset 4234


Ignore:
Timestamp:
Jan 6, 2010, 5:51:55 PM (11 years ago)
Author:
Sam Hocevar
Message:

Redirect old /toilet.html to /wiki/toilet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • web/trunk/www/toilet.html

    r4083 r4234  
    1 <?php header("Content-Type: text/html; charset=utf-8"); ?>
    21<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    32       "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
    4 
    53<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    6 
    74<head>
     5   <meta http-equiv="REFRESH" content="0;url=http://caca.zoy.org/wiki/toilet">
    86   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    9    <meta name="GENERATOR" content="vim" />
    10    <meta name="Author" content="sam@zoy.org (Sam Hocevar)" />
    11    <meta name="Description" content="libcaca - TOIlet" />
    12    <meta name="Keywords" content="libcaca, ASCII, ASCII ART, console, text mode, ncurses, slang, AAlib" />
    13    <title>libcaca - TOIlet</title>
    14    <link rel="icon" type="image/x-icon" href="/favicon.ico" />
    15    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
    16    <link rel="stylesheet" type="text/css" href="/main.css" />
    177</head>
    18 
    198<body>
    20 
    21 <?php include($_SERVER["DOCUMENT_ROOT"]."/header.inc"); ?>
    22 
    23 <h2> TOIlet </h2>
    24 
    25 <p> The TOIlet project attempts to create a free replacement for the <a
    26 href="http://www.figlet.org/">FIGlet</a> utility. TOIlet stands for “The
    27 Other Implementation’s letters”, coined after FIGlet’s “Frank, Ian and
    28 Glen’s letters”. </p>
    29 
    30 <p> TOIlet is in its very early development phase. It uses the powerful
    31 <i>libcucul</i> library to achieve various text-based effects. TOIlet
    32 implements or plans to implement the following features: </p>
    33 
    34 <ul>
    35   <li> The ability to load FIGlet fonts </li>
    36   <li> Support for Unicode input and output </li>
    37   <li> Support for colour output </li>
    38   <li> Support for various output formats: HTML, IRC, ANSI... </li>
    39 </ul>
    40 
    41 <p> TOIlet also aims for full FIGlet compatibility. It is currently able
    42 to load FIGlet fonts and perform horizontal smushing. </p>
    43 
    44 <h2> Live test </h2>
    45 
    46 <? $submit = $_POST['submit'];
    47    $text = substr(stripslashes($_POST['text']), 0, 1024);
    48    $font = $_POST['font'];
    49    $fontlist = array('emboss' => 'Emboss',
    50                      'emboss2' => 'Emboss 2',
    51                      'future' => 'Future',
    52                      'smblock' => 'Small Block',
    53                      'smbraille' => 'Small Braille',
    54                      'circle' => 'Circle',
    55                      'term' => 'Terminal');
    56    if(!isset($fontlist[$font])) $font = 'smblock';
    57    $filter = $_POST['filter'];
    58    $filterlist = array('""' => 'No filter',
    59                        'flip' => 'Flip',
    60                        'flop' => 'Flop',
    61                        'rotate' => 'Rotate');
    62    if(!isset($filterlist[$filter])) $filter = '""'; ?>
    63 
    64 <form method="post" action="toilet.html">
    65   <p>
    66     <select name="font">
    67       <? foreach($fontlist as $name => $desc) { ?>
    68         <option value="<?php echo $name; ?>"<? if($name == $font) echo ' selected="selected"';?>><?php echo $desc; ?></option>
    69       <? } ?>
    70     </select>
    71     <select name="filter">
    72       <? foreach($filterlist as $name => $desc) { ?>
    73         <option value="<?php echo $name; ?>"<? if($name == $filter) echo ' selected="selected"';?>><?php echo $desc; ?></option>
    74       <? } ?>
    75     </select>
    76     <input type="text" size="50" name="text"
    77            value="<? if($text) echo htmlspecialchars($text); ?>" />
    78     <input type="submit" name="submit" value="Generate" />
    79   </p>
    80 </form>
    81 
    82 <? if($submit) { ?>
    83   <div class="toilet">
    84     <p class="toilet"><pre><?
    85          exec('toilet -f '.$font.' -F '.$filter.' '.escapeshellarg($text),
    86               &$result);
    87          foreach($result as $line)
    88              echo htmlspecialchars($line)."\n";
    89       ?></pre></p>
    90   </div>
    91 <? } ?>
    92 
    93 <h2> Download </h2>
    94 
    95 <p> The latest TOIlet version is <a
    96 href="/files/toilet/toilet-0.1.tar.gz">toilet-0.1.tar.gz</a>. </p>
    97 
    98 <h2> Screenshot </h2>
    99 
    100 <p style="text-align: center;"><img src="toilet-sample.png" width="570"
    101 height="386" alt="TOIlet sample" /></p>
    102 
    103 <?php $rev = '$Id$';
    104       include($_SERVER['DOCUMENT_ROOT'].'/footer.inc'); ?>
    105 
    1069</body>
    10710</html>
Note: See TracChangeset for help on using the changeset viewer.