From b3725252311833ce6dd0afdeaf0fe87a1efd0216 Mon Sep 17 00:00:00 2001 From: shylinux Date: Sun, 23 Apr 2023 12:08:03 +0800 Subject: [PATCH] opt const --- src/hi/cmds.sh | 411 ------------------------ src/hi/he.js | 22 -- src/hi/he.sh | 8 - src/hi/hi.css | 3 - src/hi/hi.go | 26 -- src/hi/hi.html | 125 ------- src/hi/hi.js | 8 - src/hi/hi.py | 2 - src/hi/hi.sh | 10 - src/hi/hi.shy | 27 -- src/hi/icon.js | 20 -- src/hi/layout.js | 18 -- src/main.shy | 21 -- src/release/go.mod | 1 - src/template/web.code.autogen/gitignore | 2 +- 15 files changed, 1 insertion(+), 703 deletions(-) delete mode 100644 src/hi/cmds.sh delete mode 100644 src/hi/he.js delete mode 100755 src/hi/he.sh delete mode 100644 src/hi/hi.css delete mode 100644 src/hi/hi.go delete mode 100644 src/hi/hi.html delete mode 100644 src/hi/hi.js delete mode 100644 src/hi/hi.py delete mode 100644 src/hi/hi.sh delete mode 100644 src/hi/hi.shy delete mode 100644 src/hi/icon.js delete mode 100644 src/hi/layout.js diff --git a/src/hi/cmds.sh b/src/hi/cmds.sh deleted file mode 100644 index ecf37327..00000000 --- a/src/hi/cmds.sh +++ /dev/null @@ -1,411 +0,0 @@ -[ -[[ -bc -expr -test -true -false -printf -clear -echo -time -flock -getopt -script -scriptreplay -usleep -sleep -timeout -nohup -xargs -tee -env -printenv -tty -stty -busybox -add-shell -remove-shell -ash -sh - -ps -top -watch -pidof -pstree -renice -nice -setsid -setuidgid -kill -pkill -pgrep -killall -killall5 -free -lsof -fuser - -ls -ln -cp -mv -rm -rmdir -mkdir -mknod -mktemp -mkfifo -touch -truncate -link -unlink -readlink -stat -pwd -dirname -basename - -vi -ed -tr -wc -od -seq -factor -cat -tac -rev -cut -sed -awk -cmp -comm -head -tail -more -less -sort -diff -fold -uniq -paste -split -ascii -expand -unexpand -xxd -hexdump -hexedit -strings -patch -sum -crc32 -base32 -base64 -md5sum -sha1sum -sha3sum -sha256sum -sha512sum -uudecode -uuencode -dos2unix -unix2dos - -df -du -dd -hd -cpio -find -grep -egrep -fgrep -fsync -cksum -eject -mount -umount -mountpoint -findfs -mkdosfs -fdisk -mke2fs -fsck -fsfreeze -fsck.minix -freeramdisk -mkfs.ext2 -mkfs.minix -mkfs.vfat -chattr -iostat -xz -xzcat -bzcat -zcat -unzip -bzip2 -bunzip2 -gunzip -gzip -unxz -arch -tar -ar - -ifconfig -ifdown -ifup -arp -arping -ping -ping6 -traceroute -traceroute6 -route -ntpd -dnsd -dnsdomainname -nslookup -ipaddr -ip -nc -netstat -hostname -telnetd -telnet -whois -tftp -tftpd -ftpd -ftpget -ftpput -wget - -blkdiscard -blkid -chat -blockdev - -id -adduser -addgroup -delgroup -deluser -passwd -chpasswd -whoami -groups -users -su -w -who -last -login -logname -sendmail -mesg -chown -chgrp -chmod -getty - -beep -init -halt -reboot -runlevel -adjtimex -hwclock -uptime -logger -dmesg -syslogd -sysctl -chroot -crond -crontab -lsmod -rmmod -insmod -depmod -modinfo -modprobe -cal -date -uname -which -man - -acpid -bootchartd -brctl -chpst -chrt -chvt -conspy -cryptpw -cttyhack -dc -deallocvt -devmem -dhcprelay -dpkg -dpkg-deb -dumpkmap -dumpleases -envdir -envuidgid -ether-wake -fakeidentd -fallocate -fatattr -fbset -fbsplash -fdflush -fdformat -fgconsole -fstrim -getconf -hdparm -hostid -httpd -hush -i2cdetect -i2cdump -i2cget -i2cset -i2ctransfer -ifenslave -ifplugd -inetd -install -ionice -ipcalc -ipcrm -ipcs -iplink -ipneigh -iproute -iprule -iptunnel -kbd_mode -klogd -linux32 -linux64 -linuxrc -loadfont -loadkmap -logread -losetup -lpd -lpq -lpr -lsattr -lspci -lsscsi -lsusb -lzcat -lzma -lzop -makedevs -makemime -mdev -microcom -mim -mkpasswd -mkswap -mpstat -mt -nameif -nanddump -nandwrite -nbd-client -nl -nmeter -nologin -nproc -nsenter -openvt -partprobe -pipe_progress -pivot_root -pmap -popmaildir -poweroff -powertop -pscan -pwdx -raidautorun -rdate -rdev -readahead -readprofile -realpath -reformime -reset -resize -resume -rpm -rpm2cpio -rtcwake -run-init -run-parts -runsv -runsvdir -rx -setarch -setconsole -setfattr -setfont -setkeycodes -setlogcons -setpriv -setserial -showkey -shred -shuf -slattach -smemcap -softlimit -ssl_client -start-stop-daemon -sulogin -sv -svc -svlogd -svok -swapoff -swapon -switch_root -sync -taskset -tc -tcpsvd -ts -ttysize -tunctl -ubiattach -ubidetach -ubimkvol -ubirename -ubirmvol -ubirsvol -ubiupdatevol -udhcpc -udhcpc6 -udhcpd -udpsvd -uevent -unlzma -unshare -vconfig -vlock -volname -wall -watchdog -yes -zcip diff --git a/src/hi/he.js b/src/hi/he.js deleted file mode 100644 index 0fd2a5ef..00000000 --- a/src/hi/he.js +++ /dev/null @@ -1,22 +0,0 @@ -Volcanos(chat.ONIMPORT, {_init: function(can, msg) { - function degToRad(n) { return n * 2 * Math.PI / 360 } - function drawFill(ctx, cb) { ctx.beginPath(), cb(), ctx.fill() } - var ctx = can.page.Append(can, can._output, [{type: html.CANVAS, height: can.ConfHeight(), width: can.ConfWidth()}])._target.getContext("2d") - drawFill(ctx, function() { - ctx.strokeStyle = "red" - ctx.fillStyle = "green" - ctx.lineWidth = 2 - ctx.fillRect(0, 0, 200, 200) - ctx.moveTo(200, 200), ctx.arc(200, 200, 100, degToRad(-45), degToRad(90), false), ctx.lineTo(200, 200) - can.misc.Debug("what", 123) - - ctx.strokeStyle = "white" - ctx.lineWidth = 2 - ctx.font = "36px arial" - ctx.strokeText("Canvas text", 50, 50) - - ctx.fillStyle = "red" - ctx.font = "48px georgia" - ctx.fillText("Canvas text", 50, 150) - }) -}}) diff --git a/src/hi/he.sh b/src/hi/he.sh deleted file mode 100755 index 7fea5e14..00000000 --- a/src/hi/he.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -show() { - echo "$SHELL $TERM $PWD $HOME" - echo "hello world $content $@" - ish_sys_path_list -} -show diff --git a/src/hi/hi.css b/src/hi/hi.css deleted file mode 100644 index aaffedc9..00000000 --- a/src/hi/hi.css +++ /dev/null @@ -1,3 +0,0 @@ -p { - color: red; -} \ No newline at end of file diff --git a/src/hi/hi.go b/src/hi/hi.go deleted file mode 100644 index a9360db3..00000000 --- a/src/hi/hi.go +++ /dev/null @@ -1,26 +0,0 @@ -package hi - -import ( - "shylinux.com/x/ice" - "shylinux.com/x/icebergs/base/ctx" -) - -type hi struct { - ice.Zone - - list string `name:"list zone id auto insert" help:"示例"` -} - -func (s hi) Show(m *ice.Message, arg ...string) { - m.Echo("hello world").StatusTime() -} - -func (s hi) List(m *ice.Message, arg ...string) { - // ctx.Display(m, "hi.js") - // ctx.Display(m, "/require/shylinux.com/x/contexts@v2.9.2/src/hi/hi.js") - // ctx.Display(m, "http://localhost:9020/require/shylinux.com/x/contexts@v2.9.2/src/hi/hi.js") - ctx.Display(m, "https://shylinux.com/x/contexts@v2.9.2/src/hi/hi.js?content=what") - s.Zone.ListPage(m, arg...) -} - -func init() { ice.Cmd("web.code.hi.hi", hi{}) } diff --git a/src/hi/hi.html b/src/hi/hi.html deleted file mode 100644 index 954ac0d2..00000000 --- a/src/hi/hi.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - -

hello world

-

hello world

-

hello world

-

hello world

-
hello "'&world
-
hello world
-

hello world

- hello world - hello world - hello world - hello world - hello world - baidu - contacts - -
    -
  1. 1
  2. -
  3. 1
  4. -
  5. 1
  6. -
-
hello world
- hello world - hello world - hello world -

-	package main
-	func init() {
-		println("hello world")
-	}
-	
- msgCtrl+V - hello world - - hello world - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
hehihe
hehehe
hihihehehe
hihehehe
-
-
one
-
one
-
one
-
one
-
one
-
one
-
one
-
one
-
one
-
one
-
one
-
one
-
one
-
one
-
one
-
one
-
one
-
one
-
one
-
one
-
- - diff --git a/src/hi/hi.js b/src/hi/hi.js deleted file mode 100644 index 0598bac3..00000000 --- a/src/hi/hi.js +++ /dev/null @@ -1,8 +0,0 @@ -Volcanos(chat.ONIMPORT, {_init: function(can, msg) { - msg.Defer(function() { msg.Dump() }) - msg.Echo("hello world\n"+(can.Conf("content")||"")) - can.require(["he.js"], function() { }, function() { }) - // can.require(["/require/shylinux.com/x/contexts@v2.9.2/src/hi/he.js"], function() { }, function() { }) - // can.require(["http://localhost:9020/require/shylinux.com/x/contexts@v2.9.2/src/hi/he.js"], function() { }, function() { }) - // can.require(["https://shylinux.com/x/contexts@v2.9.2/src/hi/he.js?content=what"], function() { }, function() { }) -}}) diff --git a/src/hi/hi.py b/src/hi/hi.py deleted file mode 100644 index be5a3a29..00000000 --- a/src/hi/hi.py +++ /dev/null @@ -1,2 +0,0 @@ -print "hello world" -print "hello world" \ No newline at end of file diff --git a/src/hi/hi.sh b/src/hi/hi.sh deleted file mode 100644 index 2c93efa9..00000000 --- a/src/hi/hi.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -echo "$ISH_CTX_SCRIPT <= $ISH_CTX_MODULE" -echo "$TERM $PWD $HOME $PATH" -echo "hello world $content $@" - -require "he.sh?content=what" nice -require "/require/shylinux.com/x/contexts@v2.9.3/src/hi/he.sh" -require "http://192.168.10.8:9020/x/contexts@v2.9.3/src/hi/he.sh" -# require "https://shylinux.com/x/contexts@v2.9.3/src/hi/he.sh?content=what" diff --git a/src/hi/hi.shy b/src/hi/hi.shy deleted file mode 100644 index b4bd5974..00000000 --- a/src/hi/hi.shy +++ /dev/null @@ -1,27 +0,0 @@ -chapter "hi" - -chain ` -contexts - volcanos - volcanos - lib - page - panel - publish - icebergs - base - core - misc - toolkits -` ship.stroke-width 1 line.stroke-width 1 - -chart sequence ` -fe be os hd -0 call 1 some 3 -0 call 1 some 3 -0 call 1 some 3 -0 call 1 some 3 -0 call 1 some 3 -` marginx 80 - -field cli.system diff --git a/src/hi/icon.js b/src/hi/icon.js deleted file mode 100644 index 2b9b38ff..00000000 --- a/src/hi/icon.js +++ /dev/null @@ -1,20 +0,0 @@ -Volcanos(chat.ONIMPORT, {_init: function(can, msg) { - function appends(list) { can.core.Item(list, function(key, list) { can.core.Item(list, function(size, value) { - can.page.Append(can, can._output, [{view: html.IMG, style: { - "background": "url(/publish/icon/full.jpg)", "background-size": size*20+"px", height:size, width: size, - "background-repeat": "no-repeat", "background-position-x": -value[0]+"px", "background-position-y": -value[1]+"px", - border: "lightgray solid 1px", margin: "2px", float: "left", - }}]) - }), can.page.Append(can, can._output, [{type: "br", style: {"clear": "both"}}]) }) } - - appends({ - close: {16: [82, 158], 18: [93, 177], 20: [103, 197], 24: [123, 236]}, - create: {16: [27, 158], 18: [30, 177], 20: [33, 197], 24: [40, 236]}, - refresh: {16: [194, 241], 18: [218, 271], 20: [242, 301], 24: [291, 362]}, - back: {16: [27, 185], 18: [30, 208], 20: [33, 232], 24: [40, 278]}, - "goto": {16: [82, 185], 18: [92, 208], 20: [102, 232], 24: [123, 278]}, - }) - can.page.Append(can, can._output, [{text: "\u2715", style: {"font-size": "24px"}}]) - can.page.Append(can, can._output, [{view: html.IMG, style: {"background": "url(/publish/icon/full.jpg)", "background-size": "480px", height: 1290, width: 480}}]) - can.sup.onimport.size(can.sup, can.ConfHeight()+html.ACTION_HEIGHT, can.sup.ConfWidth(480)), can.sup.onexport.output(can.sup, msg) -}}) diff --git a/src/hi/layout.js b/src/hi/layout.js deleted file mode 100644 index 8743cf22..00000000 --- a/src/hi/layout.js +++ /dev/null @@ -1,18 +0,0 @@ -Volcanos(chat.ONIMPORT, {_init: function(can, msg) { - can.onappend.layout(can, can._output, html.FLEX, [ - {view: ["hi", html.DIV, "project"]}, [ - [ - {view: ["hi", html.DIV, "content"]}, - {view: ["he", html.DIV, "profile"]}, - ], - {view: ["he", html.DIV, "display"]}, - ], - ]).layout(can.ConfWidth(), can.ConfHeight()) - can.onmotion.clear(can, can._output) - var list = [ - {name: "h1", list: [{view: ["h1", html.DIV, "h1111"]}]}, - {name: "h2", list: [{view: ["h1", html.DIV, "h222"]}]}, - {name: "h3", list: [{view: ["h1", html.DIV, "h3333"]}]}, - ] - can.onappend.layout(can, can._output, "tabs-bottom", list) -}}) diff --git a/src/main.shy b/src/main.shy index b53787de..ff890880 100644 --- a/src/main.shy +++ b/src/main.shy @@ -48,24 +48,3 @@ field "趋势图" web.code.git.trend args `intshell` field "架构图" web.code.git.spide args `intshell` spark README.md -source h3/h3.shy -source h4/h4.shy -source h5/h5.shy -source h6/h6.shy -source h7/h7.shy -source h8/h8.shy -source h3/h3.shy -source h4/h4.shy -source h5/h5.shy -source h6/h6.shy -source h7/h7.shy -source h8/h8.shy -source h9/h9.shy -source h10/h10.shy -source h3/h3.shy -source h4/h4.shy -source h5/h5.shy -source h6/h6.shy -source h7/h7.shy -source h3/h3.shy -source h5/h5.shy diff --git a/src/release/go.mod b/src/release/go.mod index 0edda6d2..c2864881 100644 --- a/src/release/go.mod +++ b/src/release/go.mod @@ -5,7 +5,6 @@ go 1.11 require ( shylinux.com/x/golang-story v0.5.9 shylinux.com/x/linux-story v0.5.5 - shylinux.com/x/mysql-story v0.5.8 shylinux.com/x/nginx-story v0.5.8 shylinux.com/x/redis-story v0.5.9 ) diff --git a/src/template/web.code.autogen/gitignore b/src/template/web.code.autogen/gitignore index 583b87cd..74b854ec 100644 --- a/src/template/web.code.autogen/gitignore +++ b/src/template/web.code.autogen/gitignore @@ -1,6 +1,6 @@ src/binpack.go src/version.go -etc/ +etc/local.shy bin/ var/ usr/