`
天梯梦
  • 浏览: 13729578 次
  • 性别: Icon_minigender_2
  • 来自: 洛杉矶
社区版块
存档分类
最新评论

terminal or terminal-like

 
阅读更多

 

1. JavaScript Terminal

 

JavaScript Terminal is a terminal-like application to execute JavaScript interactively. The function to display HTML is also provided.

 

Tested environment: Firefox 1.5 (Linux), Safari 2.0.3 (Mac), IE 6.0 (Win), Firefox is recommended.

 

Additional libraries: SVGDoc library

 

Open the terminal

 

Tutorial

  • Output text.
    % puts("Hello World!")
    Hello World!
  • Output HTML. (the command is interpreted as HTML when head of it is "<".)
    % <span style="background-color:green;">hoge hoge</span>
    hoge hoge
  • Read an external JavaScript file.
    % require("prototype-1.4.0.js")
    It seems to be able to read even if the file is in a different server.
    % require("http://prototype.conio.net/dist/prototype-1.4.0.js")
  • Set startup script.
    % RC.set( "require(\"prototype-1.4.0.js\")" )
  • Edit text.
    % a="hoge hoge fuga"
    % Editor.open(a)   // you can edit the text by using an opened editor.
    % a=Editor.get()
  • Shake the window. (This depends on the environment.)
    % for(var i=0;i<30;i++){window.moveBy(-10,0);window.moveBy(10,0);}

Outline of library

 

terminal.js

name type description
Terminal object The object to mount the terminal
Terminal.init() function Initialization function of the terminal.
It is called from "onload" of the BODY tag usually.
Terminal.history() function The array of the input history strings is acquired.

 

jsterm.js

name type description
JSTerm object The object offered when JavaScript is executed.
JSTerm.write(string) function The string is output to the terminal.
JSTerm.puts(string) function The string with return-character is output to the terminal.
JSTerm.writeln(string) function It is same as "puts".
JSTerm.require(string) function A JavaScript file given as the string of URL is read.
JSTerm.RC object The object to store and execute the startup script in cookie.
JSTerm.RC.get() function The startup script is acquired from cookie.
JSTerm.RC.set(string) function The startup script is stored in cookie.
JSTerm.RC.run() function The startup script in cookie is executed.
When the terminal is initialized, it is called.
JSTerm.Editor object The object to operate editor driven by TEXTAREA.
JSTerm.Editor.open(string) function The editor is opened.
If the string is given, it is displayed.
JSTerm.Editor.close() function The editor is shut.
JSTerm.Editor.get() function The displayed string is acquired from the editor.
Even after the editor is shut, it is possible to acquire it.

Even if "JSTerm." is not put, the above-mentioned can be executed because the command line is evaluated under "with(JSTerm)" environment on the terminal.

 

from: http://www.genome.ist.i.kyoto-u.ac.jp/~ichinose/jsterm/

 

2. JQuery Terminal Emulator

 

JQuery Terminal Emulator is a plugin for creating command line interpreters in your applications. It can automatically call JSON-RPC service when user type commands or you can provide an object with methods, each method will be invoke on user command. Object can have nested objects which will create nested interpreter. You can also use a function in which you can parse user command by your own. It′s ideal if you want to provide additional functionality for power users. It can also be used as debuging tool.

 

  • You can create interpreter for your JSON-RPC service with one line of code.
  • Support for authentication (you can provide function when user enter login and password or if you use JSON-RPC it can automatically call login function on the server and pass token to all functions)
  • Stack of interpreters - you can create commands that trigger additional interpreters (eg. you can use couple of JSON-RPC service and run them when user type command)
  • Command Tree - you can use nested objects each command will invoke a function if the value is an object it will create new interpreter and use function from that object as commands. You can use as much nested commands as you like. if the value is a string it will create JSON-RPC service.
  • Tab completion with TAB key.
  • Support for command line history (it use Local Storage if posible or cookies)
  • Include keyboard shortcut from bash like CTRL+A, CTRL+D, CTRL+E etc.
  • Multiply terminals on one page (every terminal can have different command, it′s own authentication function and it′s own command history) - you can swich between them with CTRL+TAB
  • It catch all exceptions and display error messages in terminal (you can see errors in your javascript and php code in terminal if they are in interpreter function)
  • Support for basic text formating (color, background, underline, bold, italic) inside echo function
  • You can create and overwrite existing keyboard shortcuts

form: http://terminal.jcubic.pl/

 

3. JS/UIX documentation.

 

check : http://www.masswerk.at/jsuix/index.html

 

4. learn javascropt via terminal

 

check : http://www.codecademy.com/#!/exercises/0

 

分享到:
评论

相关推荐

    Android-Terminal-Emulator.zip

    Android Terminal Emulator is an open source project. Well written patches to fix bugs or add new features are welcome! Quick FAQ: This isn't a game emulator. This won't help you root your phone or ...

    rfc全部文档离线下载rfc1-rfc8505

    had been dialed up from a TTY (teletype) terminal. Additionally, we would like some ability to transmit a file in a somewhat different manner perhaps than simulating a teletype. Deep Use One of ...

    ZOC • SSH/Telnet Client and Terminal Emulator for Mac OS X

    ZOC is a professional SSH/... With its impressive list of emulations it lets you easily connect to hosts and mainframes, using communication methods like secure shell, telnet, serial cable or modem/isdn.

    conemu 代替 windows 控制台

    Today, ConEmu can be used with any other console application or simple GUI tools (like PuTTY for example). ConEmu is an active project, open to suggestions. Disclaimer. ConEmu is not a shell, so it ...

    convmv-1.15.tar.gz

    be more quiet about the "from" or "to" of a rename (if it screws up your terminal e.g.). This will in fact do nothing else than replace any non-ASCII character (bytewise) with ? and any control ...

    Softros LAN Messenger 7.3.4

    Would you like to try Softros LAN Messenger? Download your free trial version now! Key features: Instant messaging with LAN chat ability Create chat rooms with multiple users conversation. Secure ...

    路径规划论文 --英文

    IEEE_ITSC2011_Algebraic nonlinear estimation and flatness-based lat lon conrol or automotive vehicles.pdf IEEE_ITSC2011_The H2-Optimal Preview Controller for a Shared Lateral Control.pdf IEEE_ITSC2013...

    grub4dos-V0.4.6a-2017-02-04更新

    更新说明: 2017-02-04(yaya) Ls command: Empty Folder returns false. 2016-12-08(yaya) 修正lz4、vhd不显示解压缩进度指示。增加lzma解压缩进度指示。 2016-11-09(不点) 0x8205 bit 5 = 1: 使checkkey...

    Serial Programming Guide for POSIX Operating Systems

    **Serial communications** represent a method of transmitting data one bit at a time over a single communication channel or wire. This is in contrast to parallel communications, which use multiple ...

    Bochs - The cross platform IA-32 (x86) emulator

    - additions: configurable disk geometry, FAT32 support, read MBR and/or boot sector from file, volatile write support using hdimage redolog_t class, optional commit support on Bochs exit, save/...

    大圆形导线端子 [手册].pdf

    - **Regional Standards**: Compliance with regional regulations like UL (Underwriters Laboratories) in North America or VDE (Association for Electrical, Electronic & Information Technologies) in Europe...

    2009 达内Unix学习笔记

    集合了 所有的 Unix命令大全 ...telnet 192.168.0.23 自己帐号 sd08077-you0 ftp工具 192.168.0.202 tools-toolss ... 各个 shell 可互相切换 ksh:$ sh:$ csh:guangzhou% bash:bash-3.00$ ... 命令和参数之间必需用空格隔...

    MIL-STD-188_164B_CHG_NOTICE-1.055303.pdf

    Compliance with these requirements ensures efficient and secure communication in military operations, regardless of the terminal's mobility (fixed, transportable, or mobile). In addition to ...

    Qemu-1.0.1 for windows

    -h or -help display this help and exit -version display version information and exit -machine [type=]name[,prop[=value][,...]] selects emulated machine (-machine ? for list) property accel=accel1[:...

    qemu-0.13.0(编译过全处理器支持)

    -qmp dev like -monitor but opens in 'control' mode -mon chardev=[name][,mode=readline|control][,default] -debugcon dev redirect the debug console to char device 'dev' -pidfile file write PID to 'file'...

    Mastering Lambdas- Java Programming in a Multicore World

    - **Terminal Operations**: These operations produce a result or side-effect. Examples include `forEach`, `collect`, `reduce`, `min`, and `max`. - **Stateless Intermediate Operations**: These ...

    Ubuntu Pocket Guide and Reference: A concise companion for day-to-day Ubuntu use

    - **Command-Line Interface (CLI)**: In-depth coverage of the command-line interface, teaching users how to perform tasks using terminal commands. - **Software Management**: Instructions on managing ...

    DevelopersGuide_MinixOnARM

    By targeting popular development boards like the BeagleBone and BeagleBone Black, the project aims to provide a robust and flexible platform for developers and enthusiasts alike. The feature matrix ...

Global site tag (gtag.js) - Google Analytics