mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-25 16:58:06 +08:00
opt code
This commit is contained in:
parent
bc8eba229d
commit
fa5065b0f3
@ -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()) }
|
||||
|
@ -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
|
||||
|
1
src/template/web.code.autogen/binpack.go
Normal file
1
src/template/web.code.autogen/binpack.go
Normal file
@ -0,0 +1 @@
|
||||
package main
|
17
src/template/web.code.autogen/demo.go
Normal file
17
src/template/web.code.autogen/demo.go
Normal 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"}}{}) }
|
4
src/template/web.code.autogen/demo.shy
Normal file
4
src/template/web.code.autogen/demo.shy
Normal file
@ -0,0 +1,4 @@
|
||||
chapter "{{.Option "name"}}"
|
||||
|
||||
field {{.Option "key"}}
|
||||
|
7
src/template/web.code.autogen/gitignore
Normal file
7
src/template/web.code.autogen/gitignore
Normal file
@ -0,0 +1,7 @@
|
||||
src/binpack.go
|
||||
src/version.go
|
||||
etc/
|
||||
bin/
|
||||
var/
|
||||
usr/
|
||||
.*
|
3
src/template/web.code.autogen/go.mod
Normal file
3
src/template/web.code.autogen/go.mod
Normal file
@ -0,0 +1,3 @@
|
||||
module %s
|
||||
|
||||
go 1.11
|
7
src/template/web.code.autogen/main.go
Normal file
7
src/template/web.code.autogen/main.go
Normal file
@ -0,0 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
)
|
||||
|
||||
func main() { print(ice.Run()) }
|
2
src/template/web.code.autogen/main.shy
Normal file
2
src/template/web.code.autogen/main.shy
Normal file
@ -0,0 +1,2 @@
|
||||
title "{{.Option "name"}}"
|
||||
|
12
src/template/web.code.autogen/miss.sh
Normal file
12
src/template/web.code.autogen/miss.sh
Normal 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
|
9
src/template/web.code.autogen/version.go
Normal file
9
src/template/web.code.autogen/version.go
Normal file
@ -0,0 +1,9 @@
|
||||
package main
|
||||
|
||||
import ice "shylinux.com/x/icebergs"
|
||||
|
||||
func init() {
|
||||
ice.Info.Make = ice.MakeInfo{
|
||||
%s
|
||||
}
|
||||
}
|
11
src/template/web.code.binpack/binpack.go
Normal file
11
src/template/web.code.binpack/binpack.go
Normal 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{
|
8
src/template/web.code.binpack/binpack_end.go
Normal file
8
src/template/web.code.binpack/binpack_end.go
Normal 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)
|
||||
}
|
||||
}
|
||||
}
|
4
src/template/web.code.css/demo.css
Normal file
4
src/template/web.code.css/demo.css
Normal file
@ -0,0 +1,4 @@
|
||||
body fieldset.%s div.output {
|
||||
background-color:red;
|
||||
}
|
||||
|
5
src/template/web.code.go/demo.go
Normal file
5
src/template/web.code.go/demo.go
Normal file
@ -0,0 +1,5 @@
|
||||
package %s
|
||||
|
||||
func init() {
|
||||
|
||||
}
|
9
src/template/web.code.html/demo.html
Normal file
9
src/template/web.code.html/demo.html
Normal 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>
|
3
src/template/web.code.js/demo.js
Normal file
3
src/template/web.code.js/demo.js
Normal file
@ -0,0 +1,3 @@
|
||||
Volcanos(chat.ONIMPORT, {_init: function(can, msg) {
|
||||
msg.Echo("hello world").Dump(can)
|
||||
}})
|
2
src/template/web.code.sh/cmd.sh
Normal file
2
src/template/web.code.sh/cmd.sh
Normal 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
|
6
src/template/web.code.sh/demo.sh
Normal file
6
src/template/web.code.sh/demo.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
demo() {
|
||||
echo "hello world"
|
||||
}
|
||||
|
2
src/template/web.code.shy/demo.shy
Normal file
2
src/template/web.code.shy/demo.shy
Normal file
@ -0,0 +1,2 @@
|
||||
chapter "%s"
|
||||
|
12
src/template/web.code.website/index.html
Normal file
12
src/template/web.code.website/index.html
Normal 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
14
src/template/web/cmd.html
Normal 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>
|
14
src/template/web/main.html
Normal file
14
src/template/web/main.html
Normal 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>
|
17
src/template/webview/home.html
Normal file
17
src/template/webview/home.html
Normal 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>
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user