Skip to content

Commit eaa814d

Browse files
committed
I'm crushing your head!
1 parent 1554859 commit eaa814d

5 files changed

Lines changed: 3066 additions & 8 deletions

File tree

apps/Terminal.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,6 @@ Now scrutinizing handleBackspace @MSKEUTJDK. Just want to enable basic multi-lin
105105
»*/
106106
//»
107107

108-
//This means that the terminal app window is reloaded by Ctrl+r (there is no onreload on the app)
109-
//let USE_ONRELOAD = false;
110-
111108
const RELOAD_LIBS=[
112109
//"games.poker",
113110
//"games.cfr"
@@ -117,6 +114,8 @@ let RELOAD_TERM_ONRELOAD = false;
117114

118115
//This means that the terminal app's onreload method is set to _onreload (to reload the shell)
119116
let USE_ONRELOAD = true;
117+
118+
//This means that the terminal app window is reloaded by Ctrl+r (there is no onreload on the app)
120119
//let USE_ONRELOAD = false;
121120
//let NO_ONRELOAD = false;
122121
//Terminal Imports«
@@ -3622,10 +3621,10 @@ async _reloadLibs(arr){//«
36223621
async _onreload(){//«
36233622

36243623
//Just reload the shell (if working on a devtest command)
3625-
// await this._reloadShell();
3624+
await this._reloadShell();
36263625

36273626
// await this._reloadLibs(["games.poker"]);
3628-
await this._reloadLibs(RELOAD_LIBS);
3627+
// await this._reloadLibs(RELOAD_LIBS);
36293628

36303629
}//»
36313630

apps/media/VideoCutter.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/*9/2/25: I want to enable the use of clips from arbitrary numbers of videos, and sequencing
2+
them in arbitrary orders. Then we can work on transitions (fades, etc) between clips.
3+
*/
14
//This application assumes there is only a video track in a webm file.
25
//Hence, the name of it is VideoCutter.
36

list.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
["README.md/2181","app",["3d",["index.html/1098"]],"apps",["Audio.js/4093","BinView.js/9814","Folder.js/11196","Help.js/979","MediaPlayer.js/2074","Music.js/4844","Terminal.js/97072","TextEdit.js/5301","WorkMan.js/3808","YourApp.js/418","dev",["GetPoint.js/551","Grok.js/14796","Poker.js/36551","Three.js/5119"],"games",["Arcade.js/12599"],"hw",["MidiCtl.js/3691"],"media",["2Cameras.js/3258","Camera.js/3673","MediaPlayer.js/16115","VideoCutter.js/44729"],"template",["Basic.js/489","Template.js/396","WebAudio.js/2877"],"util",["HTML.js/1428","ImageView.js/2703","Unicoder.js/16896"]],"coms",["audio.js/1766","esprima.js/171824","extra.js/10807","fs.js/27999","games",["cfr.js/115420","poker.js/107498","slum.js/71075","zhold",["poker1.js/25062"]],"mail.js/44010","shell.js/175037","template.js/336","test",["dummy.js/21"],"test.js/1982","yt.js/66863","zhold",["mail.js/22724"]],"desk",["index.html/1184"],"index.html/486","mods",["audio",["multi_freq_worklet.js/1502","random_walk_worklet.js/3039"],"games",["GBEmulator.js/9708","NESEmulator.js/222309","binjgb.wasm/87232"],"help",["shell.js/3591"],"hw",["midi.js/2323"],"lang",["shell.js/179108"],"term",["email.js/10406","less.js/19318","log.js/13292","vim.js/162675"],"util",["libwabt.js/1299054","math.js/12125","pretty.js/93856","walt.js/204893","wasm.js/42764","wasmparser.js/34331","webmparser.js/58730"],"workers",["poker.js/37420"]],"node",["server.js/7792","svcs",["imap.js/17772","mount.js/16553","smtp.js/1359","template.js/1831","ws.js/2156","ytdl.js/11982"]],"shell",["index.html/959"],"sys",["config.js/8659","desk.js/217563","fs.js/66825","terminal.js/4300","three.js/3443","util.js/32614"],"www",["blog.css/181","desk.css/1831","docs",["blog-template.html/291","help.html/9104","what-it-is.html/4370"],"examples",["test.sh/66"],"favicon.ico/15086","lotw256.png/41075","lotw48.png/2966","stuff",["noise.html/1669"]]]
1+
["README.md/2181","app",["3d",["index.html/1098"]],"apps",["Audio.js/4093","BinView.js/9814","Folder.js/11196","Help.js/979","MediaPlayer.js/2074","Music.js/4844","Terminal.js/97044","TextEdit.js/5301","WorkMan.js/3808","YourApp.js/418","dev",["GetPoint.js/551","Grok.js/14796","Poker.js/36551","Three.js/5119"],"games",["Arcade.js/12599"],"hw",["MidiCtl.js/3691"],"media",["2Cameras.js/3258","Camera.js/3673","MediaPlayer.js/16115","VideoCutter.js/44911"],"template",["Basic.js/489","Template.js/396","WebAudio.js/2877"],"util",["HTML.js/1428","ImageView.js/2703","Unicoder.js/16896"]],"coms",["audio.js/1766","esprima.js/171824","extra.js/10807","fs.js/27999","games",["cfr.js/115420","poker.js/107498","slum.js/71075","zhold",["poker1.js/25062"]],"mail.js/44010","shell.js/175037","template.js/336","test",["dummy.js/21"],"test.js/1982","yt.js/66863","zhold",["mail.js/22724"]],"desk",["index.html/1184"],"index.html/486","mods",["audio",["multi_freq_worklet.js/1502","random_walk_worklet.js/3039"],"games",["GBEmulator.js/9708","NESEmulator.js/222309","binjgb.wasm/87232"],"help",["shell.js/3591"],"hw",["midi.js/2323"],"lang",["shell.js/180274"],"term",["email.js/10406","less.js/19318","log.js/13292","vim.js/162675"],"util",["libwabt.js/1299054","math.js/12125","pretty.js/93856","showdown.js/93062","walt.js/204893","wasm.js/42764","wasmparser.js/34331","webmparser.js/58730"],"workers",["poker.js/37420"]],"node",["server.js/7792","svcs",["imap.js/17772","mount.js/16553","smtp.js/1359","template.js/1831","ws.js/2156","ytdl.js/11982"]],"shell",["index.html/959"],"sys",["config.js/8659","desk.js/217563","fs.js/66825","terminal.js/4300","three.js/3443","util.js/32614"],"www",["blog.css/181","desk.css/1831","docs",["blog-template.html/291","help.html/9104","what-it-is.html/4370"],"examples",["test.sh/66"],"favicon.ico/15086","lotw256.png/41075","lotw48.png/2966","stuff",["noise.html/1669"]]]

mods/lang/shell.js

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2180,12 +2180,59 @@ this.ok();
21802180
const com_devtest = class extends Com{
21812181
init(){
21822182
}
2183-
run(){
2183+
async run(){
2184+
this.ok("DEVTEST");
2185+
}
2186+
}
21842187

2185-
this.ok("DEVTEST!");
2188+
const com_markdown = class extends Com{/*«*/
2189+
#mod;
2190+
async init(){
2191+
let modret = await util.getMod("util.showdown");
2192+
if (!modret) return this.no("No showdown module");
2193+
this.#mod = modret.getmod();
2194+
}
2195+
async run(){
2196+
const{args, term} = this;
2197+
let converter = new this.#mod.Converter();
2198+
let fname = args.shift();
2199+
if (!fname) return this.no("Need a file name!");
2200+
let str = await fname.toText(term);
2201+
if (!str) return this.no("File not found!");
2202+
let html = converter.makeHtml(str);
2203+
this.out(html);
2204+
this.ok();
2205+
}
2206+
}/*»*/
2207+
const com_html = class extends Com{/*«*/
2208+
init(){
2209+
}
2210+
async openWin(val){
2211+
let win = await Desk.api.openApp("util.HTML", {appArgs: {text: val}});
2212+
if (!win) return this.no(`util.HTML: app not found`);
21862213
}
2214+
async run(){
2215+
const {args, opts, stdin} = this;
2216+
if (stdin){
2217+
this.openWin(stdin);
2218+
this.ok();
2219+
return;
2220+
}
2221+
else if (this.args.length){
2222+
this.no("Only supporting stdin methods!");
2223+
return;
2224+
}
2225+
else{
2226+
// Do this method (like in com_math) to wait for EOF before opening the window
2227+
// this.lines=[];
2228+
}
2229+
}
2230+
pipeIn(val){
2231+
if (!isEOF(val)) this.openWin(val);
2232+
else this.ok();
21872233
}
21882234

2235+
}/*»*/
21892236

21902237
const com_wat2wasm = class extends Com{//«
21912238

@@ -3175,6 +3222,8 @@ this.defCommands={//«
31753222
//continue: com_continue,
31763223
//break: com_break,
31773224
//poker: com_poker,
3225+
html: com_html,
3226+
markdown: com_markdown,
31783227
wat2wasm: com_wat2wasm,
31793228
wget: com_wget,
31803229
continue: com_loopctrl,

0 commit comments

Comments
 (0)