1
0
forked from x/ContextOS
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-03-07 03:44:34 +08:00
parent bc8eba229d
commit fa5065b0f3
26 changed files with 193 additions and 0 deletions

View File

@ -47,6 +47,8 @@ import (
_ "shylinux.com/x/contexts/src/hi"
_ "shylinux.com/x/contexts/src/h2"
_ "shylinux.com/x/contexts/src/h3"
)
func main() { print(ice.Run()) }

View File

@ -65,3 +65,4 @@ field "架构图" web.code.git.spide args `intshell`
spark md README.md
source h2/h2.shy
source h2/h2.shy
source h3/h3.shy

View File

@ -0,0 +1 @@
package main

View File

@ -0,0 +1,17 @@
package {{.Option "zone"}}
import (
"shylinux.com/x/ice"
)
type {{.Option "name"}} struct {
ice.{{.Option "type"}}
list string {{.Option "text"}}
}
func (s {{.Option "name"}}) List(m *ice.Message, arg ...string) {
s.{{.Option "type"}}.List(m, arg...)
}
func init() { ice.Cmd("{{.Option "key"}}", {{.Option "name"}}{}) }

View File

@ -0,0 +1,4 @@
chapter "{{.Option "name"}}"
field {{.Option "key"}}

View File

@ -0,0 +1,7 @@
src/binpack.go
src/version.go
etc/
bin/
var/
usr/
.*

View File

@ -0,0 +1,3 @@
module %s
go 1.11

View File

@ -0,0 +1,7 @@
package main
import (
"shylinux.com/x/ice"
)
func main() { print(ice.Run()) }

View File

@ -0,0 +1,2 @@
title "{{.Option "name"}}"

View File

@ -0,0 +1,12 @@
#! /bin/sh
if [ -f $PWD/.ish/plug.sh ]; then source $PWD/.ish/plug.sh; elif [ -f $HOME/.ish/plug.sh ]; then source $HOME/.ish/plug.sh; else
ctx_temp=$(mktemp); if curl -h &>/dev/null; then curl -o $ctx_temp -fsSL https://shylinux.com; else wget -O $ctx_temp -q http://shylinux.com; fi; source $ctx_temp intshell
fi
require miss.sh
ish_miss_prepare_compile
ish_miss_prepare_develop
ish_miss_prepare_project
ish_miss_make; if [ -n "$*" ]; then ish_miss_serve "$@"; fi

View File

@ -0,0 +1,9 @@
package main
import ice "shylinux.com/x/icebergs"
func init() {
ice.Info.Make = ice.MakeInfo{
%s
}
}

View File

@ -0,0 +1,11 @@
package main
import (
"encoding/base64"
ice "shylinux.com/x/icebergs"
"shylinux.com/x/icebergs/base/nfs"
)
func init() {
pack := ice.Maps{

View File

@ -0,0 +1,8 @@
}
nfs.PackFile.RemoveAll(ice.SRC)
for k, v := range pack {
if b, e := base64.StdEncoding.DecodeString(v); e == nil {
nfs.PackFile.WriteFile(k, b)
}
}
}

View File

@ -0,0 +1,4 @@
body fieldset.%s div.output {
background-color:red;
}

View File

@ -0,0 +1,5 @@
package %s
func init() {
}

View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<head>
<meta charset="utf-8"><title>volcanos</title>
<link href="/publish/can.css" rel="stylesheet">
</head>
<body>
<script src="/publish/can.js"></script>
<script>Volcanos({{.list}})</script>
</body>

View File

@ -0,0 +1,3 @@
Volcanos(chat.ONIMPORT, {_init: function(can, msg) {
msg.Echo("hello world").Dump(can)
}})

View File

@ -0,0 +1,2 @@
export ctx_dev=%s ctx_pod=%s ctx_mod=%s
temp=$(mktemp); if curl -V &>/dev/null; then curl -o $temp -fsSL $ctx_dev; else wget -O $temp -q $ctx_dev; fi && source $temp $ctx_mod

View File

@ -0,0 +1,6 @@
#!/bin/sh
demo() {
echo "hello world"
}

View File

@ -0,0 +1,2 @@
chapter "%s"

View File

@ -0,0 +1,12 @@
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<style type="text/css">%s</style>
<style type="text/css">%s</style>
</head>
<body>
<script>%s</script>
<script>%s</script>
<script>%s</script>
<script>%s</script>
</body>

14
src/template/web/cmd.html Normal file
View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=0.8,maximum-scale=0.8,user-scalable=no">
<meta charset="utf-8"><title>volcanos</title>
<link href="/index.css{{.version}}" rel="stylesheet">
<link href="/page/cache.css{{.version}}" rel="stylesheet">
<link href="/favicon.ico" rel="shortcut icon" type="image/ico">
</head>
<body>
<script>_version = "{{.version}}"</script>
<script src="/proto.js{{.version}}"></script>
<script src="/page/cache.js{{.version}}"></script>
<script>Volcanos({{.list}})</script>
</body>

View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=0.8,maximum-scale=0.8,user-scalable=no">
<meta charset="utf-8"><title>volcanos</title>
<link href="/index.css{{.version}}" rel="stylesheet">
<link href="/page/cache.css{{.version}}" rel="stylesheet">
<link href="/favicon.ico" rel="shortcut icon" type="image/ico">
</head>
<body>
<script>_version = "{{.version}}"</script>
<script src="/proto.js{{.version}}"></script>
<script src="/page/cache.js{{.version}}"></script>
<script>{{.script}}</script>
</body>

View File

@ -0,0 +1,17 @@
<!doctype html>
<html>
<head>
<style>button { font-size:24px; font-family:monospace; margin:10px; width:-webkit-fill-available; display:block; clear:both; }</style>
<script>
document.body.onkeydown = function(event) {
if (event.metaKey) {
switch (event.key) {
case "q": window.terminate(); break
}
}
}
</script>
</head>
<body>%s</body>
</html>

View File

@ -68,6 +68,13 @@
"type": "_open"
}
},
"8a5ce7": {
"meta": {
"text": "ice.bin space dial dev ops",
"time": "2023-03-06 20:27:03",
"type": "shell"
}
},
"937f9e": {
"meta": {
"name": "contexts.com.cn",
@ -91,6 +98,20 @@
"type": "link"
}
},
"c67e09": {
"meta": {
"text": "ssh root@192.168.8.1",
"time": "2023-03-06 19:13:51",
"type": "shell"
}
},
"cdbecd": {
"meta": {
"text": "ssh shy@shylinux.com",
"time": "2023-03-06 19:11:46",
"type": "shell"
}
},
"dd37a4": {
"meta": {
"text": "Safari.app",