topical media & game development

talk show tell print

lib-js-terminal-index.htm / htm



  <html>
  <head>
          <title>mass:werk termlib</title>
  
  <style type="text/css">
  body,p,a,td {
          font-family: courier,fixed,swiss,sans-serif;
          font-size: 12px;
          color: #cccccc;
  }
  .lh13 {
          line-height: 13px;
  }
  .lh15 {
          line-height: 15px;
  }
  pre {
          font-family: courier,fixed,swiss,sans-serif;
          font-size: 12px;
          color: #ccffaa;
          line-height: 15px;
  }
  .prop {
          font-family: courier,fixed,swiss,sans-serif;
          color: #bbee99;
          font-size: 12px;
          line-height: 15px;
  }
  h1 {
          font-family: courier,fixed,swiss,sans-serif;
          font-size: 16px;
          color: #cccccc;
  }
  a,a:link,a:visited {
          text-decoration: none;
          color: #77dd11;
  }
  a:hover {
          text-decoration: underline;
          color: #77dd11;
  }
  a:active {
          text-decoration: underline;
          color: #dddddd;
  }
  
  @media print {
          body { background-color: #ffffff; }
          body,p,a,td {
                  font-family: courier,fixed,swiss,sans-serif;
                  font-size: 12px;
                  color: #000000;
          }
          .lh13 {
                  line-height: 13px;
          }
          .lh15 {
                  line-height: 15px;
          }
          pre,.prop {
                  font-family: courier,fixed,swiss,sans-serif;
                  font-size: 12px;
                  color: #000000;
                  line-height: 15px;
          }
          h1 {
                  font-family: courier,fixed,swiss,sans-serif;
                  font-size: 16px;
                  color: #000000;
          }
          a,a:link,a:visited {
                  text-decoration: none;
                  color: #000000;
          }
          a:hover {
                  text-decoration: underline;
                  color: #000000;
          }
          a:active {
                  text-decoration: underline;
                  color: #000000;
          }
  }
  </style>
  </head>
  
  <body bgcolor="#222222" link="#77dd11" text="#cccccc" alink="#dddddd" vlink="#77dd11"
  topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0"><a name="top"></a>
  
  <table border="0" cellspacing="20" cellpadding="0" align="center">
  <tr>
          <td nowrap>termlib.js home</td>
          <td>|</td>
          <td nowrap><a href="lib-js-terminal-multiterm-test.htm">multiple terminals</a></td>
          <td>|</td>
          <td nowrap><a href="lib-js-terminal-parser-sample.htm">parser</a></td>
          <td>|</td>
          <td nowrap><a href="lib-js-terminal-faq.htm">faq</a></td>
          <td>|</td>
          <td nowrap><a href="lib-js-terminal-readme.txt" title="readme.txt (text/plain)">documentation</a></td>
          <td>|</td>
          <td nowrap><a href="lib-js-terminal-samples.htm">samples</a></td>
  </tr>
  </table>
  
  <table border="0" cellspacing="20" cellpadding="0" width="700" align="center">
          <tr><td>
                  <h1>mass:werk termlib.js</h1>
          </td></tr>
          <tr><td class="lh13">
                  The JavaScript library &quot;termlib.js&quot; provides a `Terminal' object, which
                  facillitates a simple and object oriented approach to generate and control a
                  terminal-like interface for web services.<br><br>
                  
                  "termlib.js" features direct keyboard input and powerful output methods
                  for multiple and simultanious instances of the `Terminal' object.<br><br>
                  
                  The library was written with the aim of simple usage and a maximum of compatibility
                  with minimal foot print in the global namespace.<br><br><br>
                  
                  
                  A short example:<br>
    <pre>
    var term = new Terminal( {handler: termHandler} );
    term.open();
  
    function termHandler() {
       this.newLine();
       var line = this.lineBuffer;
       if (line != &quot;&quot;) {
          this.write(&quot;You typed: &quot;+line);
       }
       this.prompt();
    }</pre>
            </td></tr>
          <tr><td class="lh13">
                  Starting with version 1.1 &quot;termlib.js&quot; comes with a <a href="lib-js-terminal-sample-socket.htm">socket extension</a> (&quot;termlib_socket.js&quot;) for client-server remote communication (commonly known as AJAX). This extensions provides a tightly integrated API for a simple and object oriented approch to XMLHttpRequests.<br><br>
                  Starting with version 1.2 &quot;termlib.js&quot; adds extended <a href="lib-js-terminal-sample-color.htm">support for colors</a>.<br>
                  Also starting with version 1.2 &quot;termlib.js&quot; incorporates now methods for <a href="lib-js-terminal-sample-import.htm">text import</a>.<br>(The import methods were previously external functions of a sample page.)<br><br>
                  Version 1.3 adds automatic text wrapping (see <a href="lib-js-terminal-faq.htm#wrapping">faq</a> for details).<br><br>
                  Version 1.4 adds <a href="lib-js-terminal-sample-style-settings.htm">support for custom styles and mark up</a>.
            </td></tr>
          <tr><td class="lh13">
          <b>License</b><br><br>
  
          This JavaScript-library is <u>free for private and academic use</u>.
          Please include a readable copyright statement and a backlink to &lt;http://www.masswerk.at> in the
          web page. The library should always be accompanied by the &quot;readme.txt&quot; and the sample HTML-documents.<br><br>
  
          The term &quot;private use&quot; includes any personal or non-commercial use, which is not related
          to commercial activites, but excludes intranet, extranet and/or public net applications
          that are related to any kind of commercial or profit oriented activity.<br><br>
  
          For commercial use see &lt;<a href="http://www.masswerk.at/" target="_blank">http://www.masswerk.at>&gt; for contact information.
          </td></tr>
          <tr><td class="lh13">
          <b>Distribution</b><br><br>
  
          This JavaScript-library may be distributed freely as long it is distributed together with the &quot;readme.txt&quot; and the sample HTML-documents and this document.<br><br>
  
          Any changes to the library should be commented and be documented in the readme-file.<br>
          Any changes must be reflected in the `Terminal.version' string as &quot;Version.Subversion&nbsp;(compatibility)&quot;.
          </td></tr>
          <tr><td class="lh13">
          <b>Disclaimer</b><br><br>
  
          This software is distributed AS IS and in the hope that it will be useful, but WITHOUT ANY
          WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
          PURPOSE. The entire risk as to the quality and performance of the product is borne by the
          user. No use of the product is authorized hereunder except under this disclaimer.
          </td></tr>
          <tr><td class="lh13">
          <b>History</b><br><br>
  
          This library evolved from the terminal script &quot;TermApp&quot; ((c) N. Landsteiner 2003) and is in its
          current form a down scaled spinn-off of the &quot;JS/UIX&quot; project. (JS/UIX is not a free&nbsp;software by now.)
          c.f.: &lt;<a href="http://www.masswerk.at/jsuix/" target="_blank">http://www.masswerk.at/jsuix>&gt;<br><br>
  
          For version history: see the <a href="readme.txt">readme.txt</a>.
          </td></tr>
          <tr><td class="lh13">
          &nbsp;<br>
          <b>Download</b><br><br>
          Be sure to have read the license information and the disclamer and that you are willing to respect copyrights.<br><br>
  
          <span class="prop">Download:</span> <a href="termlib.zip">termlib.zip</a> (~ 109 KB, incl. docs &amp; sample pages)<br><br>
          Current version is &quot;1.43 (original)&quot;, socket extension: 1.02.<br>
          The files are now provided with line breaks  in format &lt;CRLF&gt;.<br>
          &nbsp;
          </td></tr>
          <tr><td class="lh13">
          <b>Author</b><br><br>
          &copy; Norbert Landsteiner 2003-2009<br>
          mass:werk &#150; media environments<br>
          <a href="http://www.masswerk.at/" target="_blank">http://www.masswerk.at>
          </td></tr>
          <tr><td class="lh13">
          &nbsp;<br>
          Author's note:<br>
          Please do not contact me on questions of simple usage. There is an extensive documentation (readme.txt) including plenty of sample code that should provide all information you need.
          </td></tr>
          <tr><td class="lh13">
          &nbsp;<br>
                  <a href="#top">&gt; top of page</a>
          </td></tr>
          <tr><td class="lh13">
          &nbsp;
          </td></tr>
  </table>
  
  </body>
  </html>
  


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.