***** 1. Proposed user commands file format standard for chat clients 1.1. (note: each line is numbered for easy reference while arguing about it) 1.1.1. (note: all it takes for an argument is 1 free(dom) software user) 1.1.2. (note: the above is both wrong and the result of some cultish belief) 1.1.3. (note: your mama) 1.2. started: 2002-10-20 1.2.1. revised: 2002-10-21 1.2.2. extended: 2002-10-22 1.2.3. rewritten: 2002-10-22 1.3. line numbering:
.. 1.3.1. repeat (..) as needed ***** 2. current formats 2.1. gyach format 2.1.1. ]|[optional alternate command with substitution variables] 2.1.1.1. following ']' with ':' = emote, '!' = shell, '!!' = local-only 2.2. curfloo format 2.2.1. : 2.2.1.2. following ':' with ':' = emote, '!' = shell, '!!' = local-only 2.3. curphoo format 2.3.1. : 2.3.1.1. 2.3.1.2. preceeding ':' with 2nd ':' = emote 2.3.2. ! 2.3.2.1. 2.3.2.2. preceeding '!' with 2nd '!' = local-only 2.4. Common: 2.4.1. Notations 2.4.1.1. : = comment to chat 2.4.1.2. :: = emote to chat 2.4.1.3. ! = shell command, echo to chat 2.4.1.4. !! = shell command, local-only echo 2.5. Distinguishing: 2.5.1. -- gyach, curfloo 2.5.2. | -- gyach only 2.5.3. multi-line, preformatted -- curphoo only 2.5.4. substitution variables 2.5.4.1. $0 = user name in gyach 2.5.4.2. %s = all typed after / in curphoo 2.5.4.3. $* = all typed after / in curfloo 2.5.4.4. $0 = in curfloo 2.5.4.5. $1 - $9 = treat all after / as space-separated list ***** 3. Proposed 2002-10-21 3.1. by "edge-op" 3.2. =req'd, [bar]=opt, foobar=const 3.2.1. filename = ~/./commands 3.2.2. 1 line per command 3.3. :[[:][![!]]][|[cmd w/vars]] 3.3.1. = user defined 3.3.2. : = plain, :: = emote, ! = shell, !! = local-only 3.3.3. [|[command]] = alt form of , 3.3.3.1. using same , with substitution variables 3.4. substitution variables: 3.4.1. [$*][%s] = complete string typed with 3.4.2. [$0]-[$9] = treat str typed with as space-separated list of sub vars in 3.4.3. [\$][\%s][\n][\t] = esc literals in 3.4.4. empty vars should not echo at all 3.5. # = comment 3.6. Examples 3.6.1. format (legend) 3.6.1.1. first line is what is in users' commands file 3.6.1.2. > indicates what is typed in chat 3.6.1.3. "" indicates output 3.6.2. plain chat 3.6.2.1. docs:see http://www.tldp.org | $0, see http://www.tldp.org 3.6.2.2. >/docs 3.6.2.3. "see http://www.tldp.org" 3.6.2.4. >/docs chat_joker 3.6.2.5. "chat_joker, see http://www.tldp.org" 3.6.3. emote 3.6.3.1. ducks::chases carnivorous ducks | chases $1 with carnivorous ducks 3.6.3.2. >/ducks 3.6.3.3. "(chat name here) chases carnivorous ducks" 3.6.3.4. >/ducks chat_joker 3.6.3.5. "(chat name here) chases chat_joker with carnivorous ducks" 3.6.4. shell 3.6.4.1. issue:!cat /etc/issue | !$* 3.6.4.2. >/issue 3.6.4.3. "(output from cat /etc/issue)" 3.6.4.4. >/issue cat /etc/issue; cat /etc/issue.net 3.6.4.5. "(output of command, if user screws up, tough)" 3.6.5. local-only 3.6.5.1. issue:!!cat /etc/issue | !!$* 3.6.5.2. >/issue 3.6.5.3. same as shell except it only shows on user's screen 3.6.5.4. >/issue cat /etc/issue; cat /etc/issue.net 3.6.5.5. same as shell except it only shows on user's screen 3.6.5.6. Note there is no reason why an alternate shell command couldn't be 3.6.5.7. a local-only version of the one on the left side of | ***** 4. Proposed 2002-10-21 4.1. by "mountainpenguin" 4.2. inlining command file 4.2.1. instead of having one large file, 4.2.2. make it so that you can include another file in. 4.3. section can be external file with block of text. 4.4. [3.3.2.] command type should be a word instead of cryptic characters... 4.4.1. (sendmail config all over again) 4.4.2. 4.4.3. is always user-defined name 4.4.4. is a constant 4.4.5. defines the case: plain text echo, emote, shell command, local only 4.4.6. is 4.4.7. : for ***** 5. Proposed 2002-10-22 5.1. by "buy_more_pepsi" 5.2. chain commands separated by ';' 5.2.1. ":is sad because he only has this much disk space;!df -k";!free ***** 6. Proposed 2002-10-22 6.1. by "mountainpenguin" 6.2. ::: 6.2.1. commandtype := shell|text 6.2.2. outputtype := comment|emote|local ***** 7. interpretation of 6., 2002-10-22 7.1. by "edge-op" 7.1.1. (Note: I don't like it and hope I've misinterpreted. 7.1.2. Three developers came up with custom user commands files 7.1.3. with very nearly the same format. It is my opinion that 7.1.4. a complete rewrite in order to produce a long-term, extensible, 7.1.5. feature-rich and feature anticipating standard is of much less 7.1.6. urgency than the need to make minor tweaks to what is, in order 7.1.7. to provide easy porting of custom commands among these three 7.1.8. chat clients. 7.1.9. Make it work, then make it pretty. 7.1.10. Users should not have impediments to trying out another client.) 7.2. name{ [ ct=s|t ] [ ot=c|e|l ] command } 7.2.1. command type, ct = shell (s) or text (t) 7.2.2. output type, ot = comment (c) or emote (e) or local (l) 7.2.3. anything within "" is treated as literal, except substitution variables 7.2.4. ';' or a newline delimits clause within {command} 7.2.5. extra whitespace is ignored 7.2.6. if there are any parse errors, all output is local-only 7.2.7. if alternate commands are used for the same name, 7.2.7.1. each version is enclosed by { } and separated by | 7.2.8. command may call other defined commands 7.2.9. empty substitution variables do not echo 7.2.10. comments within commands file begin with 7.2.10.1. # or // or /* */ or 7.3. Examples, user commands file: 7.3.1. free { ct=t; ot=e; "is sad because "; ct=s; df -k; free } 7.3.2. more { 7.3.2.1. {ct=t 7.3.2.2. "send me a new disk!" 7.3.2.3. free 7.3.2.4. } | { 7.3.2.5. ct=t 7.3.2.6. "$1, send me a new disk!" 7.3.2.7. free 7.3.2.8. } 7.3.2.9. } 7.3.3. comp { ct=t; ot=c; "my puter"; ct=s; grep -i mhz /proc/cpuinfo; 7.3.3.1. ct=t; "$1 it has "; ct=s; df -Th } ***** 8. Proposed 2002-10-23 8.1. by "mountainpenguin" 8.1.1. original filename = cc.xml 8.2. 8.3. 8.3.1. 8.3.1.1. 8.3.1.2. This is just a simple comment 8.3.1.3. 8.3.2. 8.3.2.1. 8.3.2.2. sleeping 8.3.2.3. 8.3.3. 8.3.3.1. 8.3.3.2. My OS is and it's version is . 8.3.3.3. 8.3.4. 8.3.4.1. 8.3.5. 8.3.5.1. 8.3.6. *****