Changeset 14885 for misc/runpugs

Show
Ignore:
Timestamp:
12/13/06 11:12:45 (2 years ago)
Author:
andara
Message:

[runpugs]
-Devel version now more responsive thanks to mod_perl.
It's my first mod_perl script, please test it at
http://feather.perl6.nl:8080/runpugs/
-Next release will preload Pugs to cut startup delay.

Location:
misc/runpugs
Files:
9 added
13 modified

Legend:

Unmodified
Added
Removed
  • misc/runpugs/README

    r14299 r14885  
    11============================================================================== 
    2 2006/10/12      Release of version 0.1.0 of runpugs/WebTerminal 
     22006/12/12      Release of version 0.2.0 of runpugs/WebTerminal 
    33============================================================================== 
    44 
    55NAME 
    66    runpugs: a web teminal for interactive pugs  
    7     WebTerminal: library for building a web terminal for interactive shells 
     7    Web/Terminal: library for building a web terminal for interactive shells 
    88 
    99INSTALLATION 
     
    1111    (e.g. ~/apache on feather, or /var/www elsewhere) 
    1212    Rename html folder if required (e.g. htdocs -> html or public_html) 
    13     * To run, simply point your browser at it. To avoid a wait, you might start 
    14     * the terminal server script (bin/termserv.pl) manually. If you don't, the cgi script will take care of it, but it takes a bit longer. 
     13    * Start the terminal server script (bin/termserv2.pl)  
     14    * To run, simply point your browser to /cgi-bin/runpugs (stable CGI 
     15     version) or just /runpugs/ (unstable version with asynchronous 
     16     JavaScript interface, running under mod_perl) 
    1517 
    1618DESCRIPTION 
    1719    runpugs has two main components:  
    1820    -a cgi script (cgi-bin/runpugs) which uses an html template 
    19     (data/runpugs.html). The latter calls the runpugs.cc stylesheet from 
     21    (data/runpugs.html). The latter calls the runpugs.css stylesheet from 
    2022    htdocs/runpugs.css 
    21     -a server (bin/termserv.pl) which handles the interactive pugs sessions and communicates with 
     23    -a server (bin/termserv2.pl) which handles the interactive pugs sessions and communicates with 
    2224    the cgi script. The pugs sessions stay alive for some time (currently 10') if 
    2325    left inactive. 
    2426 
    25    The underlying library, WebTerminal, can in principle be used for any 
    26    interactive shell, not just pugs. But I'll have to do some refactoring and 
    27    cleaning-up first. Then we can have Python :-) 
    28    See the (currently non-exisiting) POD for more info. 
     27    The unstable version has some AJAX-like goodness and runs under mod_perl. 
     28    The entrypoint is /htdocs/runpugs/index.html, which calls /perl/runpugs.pl 
     29 
     30   The underlying library, Web/Terminal, can in principle be used for any 
     31   interactive shell, not just pugs. So we could have runpython :-) 
     32   See the POD for more info. 
    2933 
    3034AUTHOR 
     
    4044============================================================================== 
    4145 
    42 CHANGES IN VERSION 0.1.0 
    43     none (initial version) 
     46CHANGES IN VERSION 0.2.0 
     47    -Web/Terminal replaces the original WebTerminal modules. This 
     48    implementation is much more generic and configurable. 
     49    -The user interface is much improved, esp. in the unstable version. 
    4450 
    4551============================================================================== 
  • misc/runpugs/TODO

    r14299 r14885  
    1 runpugs version 0.1.0 TODO: 
     1runpugs version 0.2.0 TODO: 
    22 
    3 2006/10/12 
     32006/12/06 
    44* Unicode: hack Net::Telnet so it handles Unicode 
    5 * Refactor to make more generic 
    6     -prompt handling should be in cgi-bin/runpugs, not in Dispatcher.pm 
    7     -Various configuration variables should be in a Config.pm module,  
    8      and be overriden from the scripts. 
    9     -let Dispatcher::send() return reply and prompt separately 
    10 * add POD 
     5* Improve POD 
    116* Add proper copyright & licensing info, in particular to Msg.pm 
    12 * use async JavaScript for front-end? cfr. tryruby.hobix.com 
     7* Put more functionality in JS (clear, timeout, history) 
     8* Use true AJAX for front-end (prototype.js) 
     9* Convert to Perl: this is a nice long-term goal.  
     10    Perl 5 Modules to be ported: 
     11    - IO::Pty (xs based) 
     12    - Proc::Daemon 
     13    - A stripped-down Net::Telnet, purely to manage communication via IO::Pty 
     14    - YAML::Syck (xs based) 
     15    - The Perl 6 equivalents of POSIX, Errno, IO::Select, Carp 
     16   Of course we can use the Perl 5 implementations for the time being. 
     17* Test mod_perl; tailor code for mod_perl?    
  • misc/runpugs/bin/termdispatcher2.pl

    r14512 r14885  
    88use Web::Terminal::Settings; 
    99use Web::Terminal::Dispatcher; 
    10 $Web::Terminal::Settings::port=2058; 
     10#$Web::Terminal::Settings::port=2058; 
    1111 
    1212 
     
    2121my $ip="127.0.0.1"; 
    2222(my $reply,my $prompt,my $histref) = 
    23 &Web::Terminal::Dispatcher::send($id,$ip,0,0,$cmd); 
     23&Web::Terminal::Dispatcher::send($id,$ip,0,1,$cmd); 
    2424print $reply; 
    2525print "\nHistory\n"; 
  • misc/runpugs/bin/termserv2.pl

    r14374 r14885  
    11#!/usr/bin/perl 
     2use strict; 
     3use warnings; 
    24BEGIN { 
    35$ENV{PERLIO}= ":utf8"; 
     
    1012use Web::Terminal::Server; 
    1113use  Web::Terminal::Settings; 
    12 $Web::Terminal::Settings::port=2058; 
     14#$Web::Terminal::Settings::port=2058; 
    1315$ENV{PUGS_SAFEMODE}=1; 
     16my $v=1-$Web::Terminal::Settings::daemon; 
     17print "Starting server\n" if $v; 
    1418&Web::Terminal::Server::run(); 
    1519 
  • misc/runpugs/cgi-bin/runpugs

    r14850 r14885  
    2121use utf8; 
    2222use lib '../lib/'; 
    23 #use WebTerminal::Settings; 
    24 use WebTerminal::Dispatcher; 
    25  
     23use Web::Terminal::Settings; 
     24use Web::Terminal::Dispatcher; 
     25#$Web::Terminal::Settings::port=2058; 
    2626#push (@INC, "$wwwpath$htmlpath$project"); 
    2727 
     
    3030if ($MAX_SIZE_UPLOAD) { $CGI::POST_MAX=1024 * $MAX_SIZE_UPLOAD; } 
    3131use CGI::Carp qw(fatalsToBrowser); 
    32  
    33 CGI::nph();   # Treat script as a non-parsed-header script 
     32use HTML::Entities; 
     33 
     34#CGI::nph();   # Treat script as a non-parsed-header script 
    3435$ENV{PATH} = ""; # no PATH should be needed 
    3536$ENV{SAFE_MODE}=1; 
     
    3839 
    3940my $sessionid=$query->param("sessionid"); 
    40 my $motd=""; 
     41 
     42my $motd=''; 
    4143if (not $sessionid) { 
    4244my $nid=crypt(rand(),'WV'); 
     
    4547my $now=time()-1159056000; # 36 year, 275 days offset 
    4648$sessionid=$nid.$now; 
    47  
    4849$motd=' 
    49 <p class="warning">Please test the <em>development version</em> of <tt>runpugs</tt>: try the <a 
    50 href="http://feather.perl6.nl:8080/runpugs/">interactive session</a> 
    51 with <em>command history</em> or <a 
    52 href="http://feather.perl6.nl:8080/cgi-bin/runpugs2?ia=0">run a full Perl 6 script</a>.</p> 
     50<p class="warning">Please test the <em><a 
     51href="http://feather.perl6.nl:8080/runpugs/">development version</a></em> of 
     52<tt>runpugs</tt>, now with AJAX and mod_perl.</p>  
    5353'; 
     54#or <a 
     55#href="http://feather.perl6.nl:8080/cgi-bin/runpugs2?ia=0">run a full Perl 6 
     56#script</a>.</p> 
     57#'; 
     58 
    5459} 
    5560 
     
    6873#$ip='127.'.int(rand(100)).'.'.int(rand(100)).'.'.int(rand(100)); 
    6974#} 
     75    my $prompt=$Web::Terminal::Settings::prompt; 
     76    my $allinone=1; 
    7077######### MAIN SITEMANAGER PROGRAM ################### 
    7178 
    7279if ( $query->param()) {      # an action has been chosen 
    73     my $cmd=$query->param("cmd"); 
     80 
     81    my $cmd=''; 
     82    if ($allinone==1) { 
     83    $cmd=$query->param("cmd");     
     84    my @cmdlines=split("\n",$cmd); 
     85        for my $cmdline (reverse @cmdlines) { 
     86            $cmdline=~/^\s*$/ && next; 
     87            $cmdline=~/$Web::Terminal::Settings::prompt_pattern/ 
     88            && do { 
     89                $cmd=$cmdline; 
     90                $cmd=~s/$Web::Terminal::Settings::prompt_pattern//; 
     91                chomp $cmd; 
     92                last; 
     93        }; 
     94        } 
     95    } else { 
     96    $cmd=$query->param("cmdline"); 
     97    } 
    7498    my $action =  $query->param("action")||'runpugs'; 
    7599    if ($action =~ /^(\w+)$/) { 
     
    101125    my $sessionid=shift; 
    102126    my $ip=shift; 
    103     my $reply='pugs> '; 
    104     my $testing=$query->param('testing')||1; 
    105127    my $dev=$query->param('reldev')||0; 
    106128    $dev=$dev*1; 
    107     if (not $testing) { 
    108     $reply = "Sorry, runpugs is not available at the moment."; 
    109     } else { 
    110     $cmd=~s/^.+?pugs([\>\.])/pugs$1/s; 
    111     #NO UNICODE! 
    112 #    $cmd=tr/\0-\x{10ffff}/\0-\xff_/; 
    113     if ($cmd=~/clear/) { 
    114         $cmd=''; 
    115     } elsif ($cmd!~/^\p{IsASCII}*$/) { 
    116         $cmd=''; 
    117         $reply = "Sorry, Unicode is not yet supported.\npugs> "; 
    118     } else { 
    119     if ($cmd=~/>\s+(\:*help)\b/) { 
    120         $cmd=~s/$1/:h/; 
    121     } elsif ($cmd=~/>\s+(\:*(quit|bye))\b/) { 
    122         $cmd=~s/$1/:q/; 
    123     }  
    124     $reply = &WebTerminal::Dispatcher::send($sessionid,$ip,$dev,$cmd); 
    125     $reply="\n".$reply; 
    126     } 
    127     } 
    128     #$reply.="\n$ip\n$sessionid\n"; 
    129129    my $devc=''; 
    130130    my $relc='checked'; 
     
    132132        $devc='checked'; 
    133133        $relc=''; 
    134     } 
     134        } 
     135    my $ia=$query->param('ia'); 
     136    if (not defined $ia) {$ia=1} 
     137    my $interactive=$ia*1; 
    135138    my $html=''; 
    136     open(HTML,"<../data/runpugs.html"); 
     139    if ($interactive==1) { 
     140    my $clear=0; 
     141    my $nprompt=$query->param('prompt')||$prompt; 
     142    my $preply='';     
     143    if($allinone==0 and $query->param('output')) { 
     144        $preply=$query->param('output'); 
     145    } elsif ($allinone==1 and $query->param('cmd')) { 
     146    $preply=$query->param('cmd'); 
     147    } 
     148    my $reply=$Web::Terminal::Settings::prompt; 
     149    my @history=(); 
     150    my $prevcmd=''; 
     151    my $testing=0; 
     152    if ($testing==1) { 
     153        $reply = "Sorry, runpugs is not available at the moment."; 
     154    } else { 
     155        if(not $query->param('history') or ($query->param('history') eq '')) { 
     156#            $cmd=~s/^.+?${Web::Terminal::Settings::prompt_pattern}/$1/s; 
     157        } else { 
     158#            $cmd=$Web::Terminal::Settings::prompt; 
     159#            $cmd.=$query->param('history'); 
     160            $cmd=$query->param('history'); 
     161        } 
     162        if ($cmd=~/clear/) { 
     163        $clear=1; 
     164            $cmd=''; 
     165            $preply=''; 
     166        } elsif ($cmd!~/^\p{IsASCII}*$/) { #NO UNICODE! 
     167            $cmd=''; 
     168            $reply = "Sorry, Unicode is not yet supported.\n".$Web::Terminal::Settings::prompt; 
     169        } else { 
     170            if ($cmd=~/>\s+(\:*help)\b/) { 
     171                $cmd=~s/$1/:h/; 
     172            } elsif ($cmd=~/>\s+(\:*(quit|bye))\b/) { 
     173                $cmd=~s/$1/:q/; 
     174            }  
     175            ($reply, $nprompt, my $histref) = &Web::Terminal::Dispatcher::send($sessionid,$ip,$dev,$interactive,$cmd); 
     176            if (defined $histref) { 
     177                @history=@{$histref}; 
     178                $prevcmd=$history[-1]; 
     179            } 
     180            #$cmd=$prompt.$history[-1]; 
     181            $prompt=$nprompt; 
     182            #$reply="\n".$reply.$prompt; 
     183        } 
     184    } 
     185    my $npromptw=HTML::Entities::encode_entities($nprompt); 
     186    my $replyw="$preply$prompt$prevcmd\n$reply"; 
     187    if($allinone==1){ 
     188    $replyw="$preply\n$reply"; 
     189    } 
     190    if($clear==1) { 
     191        $replyw=''; 
     192    } 
     193   my $nrows=scalar split("\n",$replyw);  
     194#    $nrows++; 
     195     ($replyw=~/^\s*$/) && ($nrows=1); 
     196    if ($nrows>20) {$nrows=20;} 
     197    my $historylist="\n"; 
     198    for my $entry (@history) { 
     199        my $entryw=HTML::Entities::encode_entities($entry); 
     200        $historylist.='<option value="'.$entryw.'">'.$entryw.'</option>'."\n"; 
     201    } 
     202    if ($allinone==1) { 
     203        $replyw.=$nprompt; 
     204    } 
     205    open(HTML,"<../data/runpugs2.html"); 
    137206    while(<HTML>) { 
    138     s/_TESTING_/$testing/; 
     207        /_HIST_/ && do { 
     208            $html.=$historylist; 
     209            next; 
     210        }; 
     211        /_SKIPT_/ && ($allinone==1) && next; 
     212        /_SKIPC_/ && ($allinone==0) && next; 
    139213    /_MOTD_/ && do { 
    140     $html.=$motd; 
    141     next; 
    142     }; 
    143     s/_DEV_/$devc/; 
    144     s/_REL_/$relc/; 
    145         /input.*name=\"sessionid\"/ && do {$html.='<input type="hidden" name="sessionid" value="'.$sessionid.'">'."\n";next }; 
    146         /(pugs\&gt\;\&nbsp\;)/ && do {$html.=$cmd.$reply;next}; 
    147  
    148         /([^\`\\]+$)/ && do {$html.=$1}; 
    149  
    150       } 
     214        $html.=$motd; 
     215            next; 
     216                }; 
     217        s/_DEV_/$devc/; 
     218        s/_REL_/$relc/; 
     219        /input.*name=\"sessionid\"/ && do { 
     220            $html.='<input type="hidden" name="sessionid" value="'.$sessionid.'">'."\n"; 
     221            next;  
     222            }; 
     223        s/_PROMPTW_/$npromptw/; 
     224=not_now         
     225        /_PREPLYW_/ && do { 
     226#            $html.=$preplyw; 
     227            next; 
     228        }; 
     229        /_CMDW_/ && do { 
     230#            chomp $html; 
     231#            $html.=$prevcmdw."\n\n"; 
     232            next; 
     233        }; 
     234        /_BSKIP_/ && do { 
     235#        ($replyw=~/^\s*$/) && ($html.='<!--'); 
     236        next; 
     237        }; 
     238        /_ESKIP_/ && do { 
     239#        ($replyw=~/^\s*$/) && ($html.='-->'); 
     240        next; 
     241        }; 
     242=cut 
     243        (/_REPLYW_/ && ($allinone==0))|| 
     244        (/_ALL_/ && ($allinone==1)) 
     245        and do { 
     246            chomp $html; 
     247            $html.=$replyw; 
     248            next; 
     249        }; 
     250        /_NPROMPTW_/ && ($allinone==0) && do { 
     251            chomp $html; 
     252            $html.=$npromptw; 
     253            next; 
     254        }; 
     255        s/_NROWS_/$nrows/; 
     256        /([^\`\\]+$)/ && do {$html.=$1}; 
     257    } 
    151258        close HTML; 
     259 
     260    } else { #not-interactive 
     261    my $script=$query->param('script')||''; 
     262            (my $reply,my $nprompt, my $histref) = 
     263            &Web::Terminal::Dispatcher::send($sessionid,$ip,$dev,$interactive,$script); 
     264   my $nrows=scalar split("\n",$reply);  
     265#    $nrows++; 
     266     ($reply=~/^\s*$/) && ($nrows=1); 
     267    if ($nrows>20) {$nrows=20;} 
     268    open(HTML,"<../data/runpugs2s.html"); 
     269    while(<HTML>) { 
     270        s/_DEV_/$devc/; 
     271        s/_REL_/$relc/; 
     272        s/_NROWS_/$nrows/; 
     273        /_REPLYW_/ && do { 
     274            chomp $html; 
     275            $html.=$reply; 
     276            next; 
     277        }; 
     278        /_SCRIPT_/ && do { 
     279            chomp $html; 
     280            $html.=$script; 
     281            next; 
     282        }; 
     283        /([^\`\\]+$)/ && do {$html.=$1}; 
     284    } 
     285    close HTML; 
     286    } 
    152287        &printhttpheader(); 
    153288        print $html; 
     
    157292################### PRINTHTTPHEADER ####################### 
    158293sub printhttpheader { 
    159 #   my $cookie; 
    160294     unless ($headerprinted) { 
    161  
    162 #     if ($sessionid) { 
    163 #         $cookie = $query->cookie( -name    => 'sessionid', 
    164 #                           -"value" => $sessionid, 
    165 #                           -path    => '/' ); 
    166 #       } 
    167  
    168 $headerprinted=1; 
    169  
    170 #        if ($sessionid) { 
    171 #         print $query->header(-pragma=>'no-cache', 
    172 #                      -cookie=>$cookie, 
    173 #                      -charset=>$lang_charset, 
    174 #                            ); 
    175 #       } else { 
     295        $headerprinted=1; 
    176296         print $query->header(-pragma=>'no-cache', 
    177297                      -charset=>$lang_charset, 
    178298                              ); 
    179 #       } 
    180299   } 
    181300   } 
  • misc/runpugs/cgi-bin/runpugs3

    r14850 r14885  
    2323use Web::Terminal::Settings; 
    2424use Web::Terminal::Dispatcher; 
    25 $Web::Terminal::Settings::port=2058; 
     25#$Web::Terminal::Settings::port=2058; 
    2626#push (@INC, "$wwwpath$htmlpath$project"); 
    2727 
     
    3232use HTML::Entities; 
    3333 
    34 CGI::nph();   # Treat script as a non-parsed-header script 
     34#CGI::nph();   # Treat script as a non-parsed-header script 
    3535$ENV{PATH} = ""; # no PATH should be needed 
    3636$ENV{SAFE_MODE}=1; 
     
    204204            next;  
    205205            }; 
     206            s/_PROMPTW_/$npromptw/; 
    206207        /_ALL_/ && ($allinone==1) 
    207208        and do { 
  • misc/runpugs/data/runpugs.html

    r14733 r14885  
    77<link rel="stylesheet" type="text/css" href="/runpugs.css"> 
    88<script language="JavaScript"> 
     9var nchars=0; 
     10function getnchars() { 
     11return document.terminal.cmd.value.length 
     12} 
    913 
     14function getcursorpos() { 
     15        var obj=document.terminal.cmd; 
     16        if(document.selection) { 
     17        obj.focus();                     
     18                var rng=document.selection.createRange();                        
     19        rng.moveStart('character',-nchars); 
     20                return rng.text.length; 
     21        } else if(obj.selectionStart>=0) { // FireFox 
     22        var start = obj.selectionStart; 
     23        var end   = obj.selectionEnd; 
     24                if (start<=end) { 
     25                        return start; 
     26                } else { 
     27                        return end; 
     28           } 
     29        } 
     30} 
     31 
     32function catchbackspace(myfield,e) 
     33{ 
     34var keycode; 
     35if (window.event) {keycode = window.event.keyCode; 
     36} 
     37else if (e) { 
     38keycode = e.which; 
     39} 
     40else return true; 
     41 
     42if (keycode == 13) 
     43{ 
     44document.terminal.submit();  
     45return false; 
     46} 
     47if (keycode==38) { 
     48return false; 
     49} 
     50if ((keycode==8)||(keycode==37)||(keycode==46)) { 
     51    if ((getnchars()>nchars) && (getcursorpos() > nchars)) { 
     52        return true; 
     53    } else { 
     54        return false; 
     55    } 
     56} else { 
     57    return true; 
     58} 
     59} 
     60 
     61//  onkeypress="return catchbackspace(this,event)" onkeydown="return catchbackspace(this,event)" 
    1062function submitenter(myfield,e) 
    1163{ 
     
    1971return false; 
    2072} 
     73else { 
     74if (keycode == 8) { 
     75if (getnchars()>nchars) { 
     76return true; 
     77} else { 
     78return false; 
     79} 
     80} else { 
     81return true; 
     82} 
     83} 
     84} 
     85 
     86function select_enter() 
     87{ 
     88/* _SKIPC_ 
     89document.terminal.cmdline.value=document.terminal.hist.options[document.terminal.hist.selectedIndex].value; 
     90document.terminal.hist.selectedIndex=0; 
     91document.terminal.cmdline.focus(); 
     92_SKIPC_ */ 
     93/* _SKIPT_ 
     94document.terminal.cmd.value+=document.terminal.hist.options[document.terminal.hist.selectedIndex].value; 
     95document.terminal.hist.selectedIndex=0; 
     96document.terminal.cmd.focus(); 
     97document.terminal.cmd.scrollTop =document.terminal.cmd.scrollHeight;  
     98_SKIPT_ */ 
     99} 
     100 
     101function select_enter_OFF(myfield,e) 
     102{ 
     103var keycode; 
     104if (window.event) keycode = window.event.keyCode; 
     105else if (e) keycode = e.which; 
     106else return true; 
     107if (keycode == 13) 
     108{ 
     109document.terminal.cmdline.value=document.terminal.hist.options[document.terminal.hist.selectedIndex].value; 
     110return false; 
     111} 
    21112else 
    22113return true; 
     
    27118<div id="mainwindow"> 
    28119<h1>Run Perl 6 now -- in your browser!</h1> 
    29  
    30 <form id="term" name="terminal" action="/cgi-bin/runpugs" method="POST">                   
    31 <input type="hidden" name="testing" value="_TESTING_"> 
     120<form id="term" name="terminal" action="/cgi-perl/runpugs" method="POST">                   
     121<input type="hidden" name="prompt" value="_PROMPTW_"> 
    32122<input type="hidden" name="sessionid" value=""> 
     123<input type="hidden"    name="ia" value="1"> 
    33124<input type="hidden"    name="action" value="runpugs"> 
    34 <h2>Interactive Pugs Session</h2> 
    35 <!-- _MOTD_ --> 
    36125<input type="radio" id="rel" value="0" name="reldev" _REL_ ><label 
    37126for="rel">Release version</label>&nbsp;&nbsp; 
     
    39128for="dev">Development version</label> 
    40129<div id="termwindow"> 
    41 <textarea id="cmd" name="cmd" rows="23" cols="80" wrap="virtual" onKeyPress="return submitenter(this,event)"> 
    42 pugs&gt;&nbsp; 
     130<select name="history" id="hist" onChange="select_enter()"> 
     131<option value="">--- Recent commands ---</option> 
     132_HIST_ 
     133</select> 
     134<br> 
     135<!-- _SKIPT_ 
     136<textarea id="cmd" name="cmd" rows="20" cols="80" wrap="virtual" onkeypress="return catchbackspace(this,event)" onkeydown="return catchbackspace(this,event)"> 
     137_ALL_ 
    43138</textarea> 
     139_SKIPT_ --> 
     140<!--_SKIPC_ 
     141<textarea readonly id="output" name="output" rows="_NROWS_" cols="80" wrap="virtual"> 
     142_REPLYW_ 
     143</textarea> 
     144<br> 
     145<label for="cmdline"><span class="prompt"> 
     146_NPROMPTW_ 
     147</span> 
     148<input type="text" size="74" id="cmdline" name="cmdline" value="" 
     149onKeyPress="return submitenter(this,event)"> 
     150</label> 
     151_SKIPC_ -->  
    44152</div> 
    45153<input id="enter" type="submit" value="Submit">&nbsp;&nbsp;&nbsp; 
     
    47155<script language="JavaScript"> 
    48156document.terminal.enter.style.display='none'; 
    49 document.terminal.cmd.focus(); 
    50 document.terminal.cmd.scrollTop =document.terminal.cmd.scrollHeight; 
     157document.terminal.cmdline.focus() // _SKIPT_ 
     158document.terminal.cmd.focus() // _SKIPC_ 
     159document.terminal.output.scrollTop =document.terminal.output.scrollHeight; // _SKIPT_ 
     160document.terminal.cmd.scrollTop =document.terminal.cmd.scrollHeight; // _SKIPC_ 
     161//if (document.terminal.output.rows==1) { 
     162//document.terminal.output.style.height="2ex"; 
     163//} 
     164nchars=document.terminal.cmd.value.length; 
    51165</script> 
    52 <p>This live web terminal runs the <a href="http://www.pugscode.org">Pugs</a> interpreter for <a 
    53 href="http://dev.perl.org/perl 6/">Perl 6</a>. Please <a 
     166<p>This live web terminal runs the <a href="http://www.pugscode.org">pugs</a> interpreter for <a 
     167href="http://dev.perl.org/perl 6/">Perl&nbsp;6</a>. Please <a 
    54168href="http://feather.perl6.nl/~andara/runpugs/">read the documentation</a>. 
    55169</p> 
  • misc/runpugs/data/runpugs2.html

    r14743 r14885  
    125125</p> 
    126126   -->                             
    127 <form id="term" name="terminal" action="/cgi-bin/runpugs2" method="POST">                   
     127   <!-- _MOTD_ --> 
     128<form id="term" name="terminal" action="/cgi-bin/runpugs" method="POST">                   
    128129<input type="hidden" name="prompt" value="_PROMPTW_"> 
    129130<input type="hidden" name="sessionid" value=""> 
     
    134135<input type="radio" id="dev" value="1" name="reldev" _DEV_ ><label 
    135136for="dev">Development version</label> 
    136 <!-- 
    137 <br><br> 
    138 <span class="tabon">Interactive Pugs Session</span> 
    139 &nbsp;&nbsp;<a class="taboff" href="/cgi-bin/runpugs2?ia=0">Run a Perl 6 Script</a> 
    140 --> 
    141137<div id="termwindow"> 
    142138<select name="history" id="hist" onChange="select_enter()">