Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

108 righe
3.7 KiB

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