From 8e7fafbdfe54f7aa07f7b2d0aea53e9b55d60213 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 14 Jul 2022 21:36:35 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=95=B4=E7=90=86=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- README_zh_CN.md | 2 +- .../20201121224345-rc27qvo.sy | 144 +++++++++--------- .../20201121212605-9td1a62.sy | 144 +++++++++--------- .../20211226114929-08ap1r0.sy | 144 +++++++++--------- kernel/go.mod | 1 - kernel/go.sum | 2 - kernel/util/runtime.go | 12 -- 8 files changed, 218 insertions(+), 233 deletions(-) diff --git a/README.md b/README.md index b15c8bde9..63bc73116 100644 --- a/README.md +++ b/README.md @@ -268,9 +268,9 @@ SiYuan is made possible by the following open source projects. * [https://github.com/ConradIrwin/font](https://github.com/ConradIrwin/font) `MIT License` * [https://github.com/Masterminds/sprig](https://github.com/Masterminds/sprig) `MIT License` * [https://github.com/PuerkitoBio/goquery](https://github.com/PuerkitoBio/goquery) `BSD-3-Clause License` +* [https://github.com/Xuanwo/go-locale](https://github.com/Xuanwo/go-locale) `Apache-2.0 License` * [https://github.com/araddon/dateparse](https://github.com/araddon/dateparse) `MIT License` * [https://github.com/common-nighthawk/go-figure](https://github.com/common-nighthawk/go-figure) `MIT License` -* [https://github.com/denisbrodbeck/machineid](https://github.com/denisbrodbeck/machineid) `MIT License` * [https://github.com/dgraph-io/ristretto](https://github.com/dgraph-io/ristretto) `Apache-2.0 License` * [https://github.com/dustin/go-humanize](https://github.com/dustin/go-humanize) `MIT License` * [https://github.com/emirpasic/gods](https://github.com/emirpasic/gods) `BSD-2-Clause License` diff --git a/README_zh_CN.md b/README_zh_CN.md index 16ddf8fbd..110db6056 100644 --- a/README_zh_CN.md +++ b/README_zh_CN.md @@ -277,9 +277,9 @@ * [https://github.com/ConradIrwin/font](https://github.com/ConradIrwin/font) `MIT License` * [https://github.com/Masterminds/sprig](https://github.com/Masterminds/sprig) `MIT License` * [https://github.com/PuerkitoBio/goquery](https://github.com/PuerkitoBio/goquery) `BSD-3-Clause License` +* [https://github.com/Xuanwo/go-locale](https://github.com/Xuanwo/go-locale) `Apache-2.0 License` * [https://github.com/araddon/dateparse](https://github.com/araddon/dateparse) `MIT License` * [https://github.com/common-nighthawk/go-figure](https://github.com/common-nighthawk/go-figure) `MIT License` -* [https://github.com/denisbrodbeck/machineid](https://github.com/denisbrodbeck/machineid) `MIT License` * [https://github.com/dgraph-io/ristretto](https://github.com/dgraph-io/ristretto) `Apache-2.0 License` * [https://github.com/dustin/go-humanize](https://github.com/dustin/go-humanize) `MIT License` * [https://github.com/emirpasic/gods](https://github.com/emirpasic/gods) `BSD-2-Clause License` diff --git a/app/guide/20210808180117-6v0mkxr/20201121224345-rc27qvo.sy b/app/guide/20210808180117-6v0mkxr/20201121224345-rc27qvo.sy index a55d127fb..567995548 100644 --- a/app/guide/20210808180117-6v0mkxr/20201121224345-rc27qvo.sy +++ b/app/guide/20210808180117-6v0mkxr/20201121224345-rc27qvo.sy @@ -6,7 +6,7 @@ "id": "20201121224345-rc27qvo", "title": "Acknowledgements", "type": "doc", - "updated": "20220627111416" + "updated": "20220714213452" }, "Children": [ { @@ -29,7 +29,7 @@ "ListData": {}, "Properties": { "id": "20220522101213-z3hokh2", - "updated": "20220627111416" + "updated": "20220714213452" }, "Children": [ { @@ -942,6 +942,76 @@ } ] }, + { + "ID": "20220714213423-trvfz6b", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20220714213423-trvfz6b", + "updated": "20220714213452" + }, + "Children": [ + { + "ID": "20220714213423-98xbjwl", + "Type": "NodeParagraph", + "Properties": { + "id": "20220714213423-98xbjwl", + "updated": "20220714213452" + }, + "Children": [ + { + "Type": "NodeLink", + "Data": "span", + "Children": [ + { + "Type": "NodeOpenBracket" + }, + { + "Type": "NodeLinkText", + "Data": "https://github.com/Xuanwo/go-locale" + }, + { + "Type": "NodeCloseBracket" + }, + { + "Type": "NodeOpenParen" + }, + { + "Type": "NodeLinkDest", + "Data": "https://github.com/Xuanwo/go-locale" + }, + { + "Type": "NodeCloseParen" + } + ] + }, + { + "Type": "NodeText", + "Data": " " + }, + { + "Type": "NodeCodeSpan", + "Data": "code", + "Children": [ + { + "Type": "NodeCodeSpanOpenMarker" + }, + { + "Type": "NodeCodeSpanContent", + "Data": "Apache-2.0 License" + }, + { + "Type": "NodeCodeSpanCloseMarker" + } + ] + } + ] + } + ] + }, { "ID": "20220522101213-wnm7wrk", "Type": "NodeListItem", @@ -1082,76 +1152,6 @@ } ] }, - { - "ID": "20220522101213-wi37jo4", - "Type": "NodeListItem", - "ListData": { - "BulletChar": 42, - "Marker": "Kg==" - }, - "Properties": { - "id": "20220522101213-wi37jo4", - "updated": "20220522101213" - }, - "Children": [ - { - "ID": "20220522101213-ubnap2y", - "Type": "NodeParagraph", - "Properties": { - "id": "20220522101213-ubnap2y", - "updated": "20220522101213" - }, - "Children": [ - { - "Type": "NodeLink", - "Data": "span", - "Children": [ - { - "Type": "NodeOpenBracket" - }, - { - "Type": "NodeLinkText", - "Data": "https://github.com/denisbrodbeck/machineid" - }, - { - "Type": "NodeCloseBracket" - }, - { - "Type": "NodeOpenParen" - }, - { - "Type": "NodeLinkDest", - "Data": "https://github.com/denisbrodbeck/machineid" - }, - { - "Type": "NodeCloseParen" - } - ] - }, - { - "Type": "NodeText", - "Data": " " - }, - { - "Type": "NodeCodeSpan", - "Data": "code", - "Children": [ - { - "Type": "NodeCodeSpanOpenMarker" - }, - { - "Type": "NodeCodeSpanContent", - "Data": "MIT License" - }, - { - "Type": "NodeCodeSpanCloseMarker" - } - ] - } - ] - } - ] - }, { "ID": "20220522101213-0hnkohy", "Type": "NodeListItem", diff --git a/app/guide/20210808180117-czj9bvb/20201121212605-9td1a62.sy b/app/guide/20210808180117-czj9bvb/20201121212605-9td1a62.sy index 15155e3fe..b429201a5 100644 --- a/app/guide/20210808180117-czj9bvb/20201121212605-9td1a62.sy +++ b/app/guide/20210808180117-czj9bvb/20201121212605-9td1a62.sy @@ -6,7 +6,7 @@ "id": "20201121212605-9td1a62", "title": "致谢", "type": "doc", - "updated": "20220627111458" + "updated": "20220714213505" }, "Children": [ { @@ -29,7 +29,7 @@ "ListData": {}, "Properties": { "id": "20220522101224-ctmcj3d", - "updated": "20220627111458" + "updated": "20220714213505" }, "Children": [ { @@ -942,6 +942,76 @@ } ] }, + { + "ID": "20220714213505-1jo69vh", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20220714213505-1jo69vh", + "updated": "20220714213505" + }, + "Children": [ + { + "ID": "20220714213505-2fv6zng", + "Type": "NodeParagraph", + "Properties": { + "id": "20220714213505-2fv6zng", + "updated": "20220714213505" + }, + "Children": [ + { + "Type": "NodeLink", + "Data": "span", + "Children": [ + { + "Type": "NodeOpenBracket" + }, + { + "Type": "NodeLinkText", + "Data": "https://github.com/Xuanwo/go-locale" + }, + { + "Type": "NodeCloseBracket" + }, + { + "Type": "NodeOpenParen" + }, + { + "Type": "NodeLinkDest", + "Data": "https://github.com/Xuanwo/go-locale" + }, + { + "Type": "NodeCloseParen" + } + ] + }, + { + "Type": "NodeText", + "Data": " " + }, + { + "Type": "NodeCodeSpan", + "Data": "code", + "Children": [ + { + "Type": "NodeCodeSpanOpenMarker" + }, + { + "Type": "NodeCodeSpanContent", + "Data": "Apache-2.0 License" + }, + { + "Type": "NodeCodeSpanCloseMarker" + } + ] + } + ] + } + ] + }, { "ID": "20220522101224-kd4artt", "Type": "NodeListItem", @@ -1082,76 +1152,6 @@ } ] }, - { - "ID": "20220522101224-y04bj0j", - "Type": "NodeListItem", - "ListData": { - "BulletChar": 42, - "Marker": "Kg==" - }, - "Properties": { - "id": "20220522101224-y04bj0j", - "updated": "20220522101224" - }, - "Children": [ - { - "ID": "20220522101224-44d4hhu", - "Type": "NodeParagraph", - "Properties": { - "id": "20220522101224-44d4hhu", - "updated": "20220522101224" - }, - "Children": [ - { - "Type": "NodeLink", - "Data": "span", - "Children": [ - { - "Type": "NodeOpenBracket" - }, - { - "Type": "NodeLinkText", - "Data": "https://github.com/denisbrodbeck/machineid" - }, - { - "Type": "NodeCloseBracket" - }, - { - "Type": "NodeOpenParen" - }, - { - "Type": "NodeLinkDest", - "Data": "https://github.com/denisbrodbeck/machineid" - }, - { - "Type": "NodeCloseParen" - } - ] - }, - { - "Type": "NodeText", - "Data": " " - }, - { - "Type": "NodeCodeSpan", - "Data": "code", - "Children": [ - { - "Type": "NodeCodeSpanOpenMarker" - }, - { - "Type": "NodeCodeSpanContent", - "Data": "MIT License" - }, - { - "Type": "NodeCodeSpanCloseMarker" - } - ] - } - ] - } - ] - }, { "ID": "20220522101224-cv41vkc", "Type": "NodeListItem", diff --git a/app/guide/20211226090932-5lcq56f/20211226114929-08ap1r0.sy b/app/guide/20211226090932-5lcq56f/20211226114929-08ap1r0.sy index 74c6461d6..40af7191d 100644 --- a/app/guide/20211226090932-5lcq56f/20211226114929-08ap1r0.sy +++ b/app/guide/20211226090932-5lcq56f/20211226114929-08ap1r0.sy @@ -5,7 +5,7 @@ "icon": "1f64f", "id": "20211226114929-08ap1r0", "title": "致謝", - "updated": "20220627111449" + "updated": "20220714213510" }, "Children": [ { @@ -28,7 +28,7 @@ "ListData": {}, "Properties": { "id": "20220326092650-r61gazd", - "updated": "20220627111449" + "updated": "20220714213510" }, "Children": [ { @@ -941,6 +941,76 @@ } ] }, + { + "ID": "20220714213510-q1tx9ve", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20220714213510-q1tx9ve", + "updated": "20220714213510" + }, + "Children": [ + { + "ID": "20220714213510-l4v3b8t", + "Type": "NodeParagraph", + "Properties": { + "id": "20220714213510-l4v3b8t", + "updated": "20220714213510" + }, + "Children": [ + { + "Type": "NodeLink", + "Data": "span", + "Children": [ + { + "Type": "NodeOpenBracket" + }, + { + "Type": "NodeLinkText", + "Data": "https://github.com/Xuanwo/go-locale" + }, + { + "Type": "NodeCloseBracket" + }, + { + "Type": "NodeOpenParen" + }, + { + "Type": "NodeLinkDest", + "Data": "https://github.com/Xuanwo/go-locale" + }, + { + "Type": "NodeCloseParen" + } + ] + }, + { + "Type": "NodeText", + "Data": " " + }, + { + "Type": "NodeCodeSpan", + "Data": "code", + "Children": [ + { + "Type": "NodeCodeSpanOpenMarker" + }, + { + "Type": "NodeCodeSpanContent", + "Data": "Apache-2.0 License" + }, + { + "Type": "NodeCodeSpanCloseMarker" + } + ] + } + ] + } + ] + }, { "ID": "20220326092650-vzdjz6z", "Type": "NodeListItem", @@ -1081,76 +1151,6 @@ } ] }, - { - "ID": "20220511113332-16r3f9e", - "Type": "NodeListItem", - "ListData": { - "BulletChar": 42, - "Marker": "Kg==" - }, - "Properties": { - "id": "20220511113332-16r3f9e", - "updated": "20220511113333" - }, - "Children": [ - { - "ID": "20220511113332-xioftl4", - "Type": "NodeParagraph", - "Properties": { - "id": "20220511113332-xioftl4", - "updated": "20220511113333" - }, - "Children": [ - { - "Type": "NodeLink", - "Data": "span", - "Children": [ - { - "Type": "NodeOpenBracket" - }, - { - "Type": "NodeLinkText", - "Data": "https://github.com/denisbrodbeck/machineid" - }, - { - "Type": "NodeCloseBracket" - }, - { - "Type": "NodeOpenParen" - }, - { - "Type": "NodeLinkDest", - "Data": "https://github.com/denisbrodbeck/machineid" - }, - { - "Type": "NodeCloseParen" - } - ] - }, - { - "Type": "NodeText", - "Data": " " - }, - { - "Type": "NodeCodeSpan", - "Data": "code", - "Children": [ - { - "Type": "NodeCodeSpanOpenMarker" - }, - { - "Type": "NodeCodeSpanContent", - "Data": "MIT License" - }, - { - "Type": "NodeCodeSpanCloseMarker" - } - ] - } - ] - } - ] - }, { "ID": "20220326094728-aw70gf0", "Type": "NodeListItem", diff --git a/kernel/go.mod b/kernel/go.mod index 0799c6cf2..343b4c605 100644 --- a/kernel/go.mod +++ b/kernel/go.mod @@ -18,7 +18,6 @@ require ( github.com/Xuanwo/go-locale v1.1.0 github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be - github.com/denisbrodbeck/machineid v1.0.1 github.com/dgraph-io/ristretto v0.1.0 github.com/dustin/go-humanize v1.0.0 github.com/emirpasic/gods v1.18.1 diff --git a/kernel/go.sum b/kernel/go.sum index 5a31c25fc..805dff0f3 100644 --- a/kernel/go.sum +++ b/kernel/go.sum @@ -109,8 +109,6 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/denisbrodbeck/machineid v1.0.1 h1:geKr9qtkB876mXguW2X6TU4ZynleN6ezuMSRhl4D7AQ= -github.com/denisbrodbeck/machineid v1.0.1/go.mod h1:dJUwb7PTidGDeYyUBmXZ2GphQBbjJCrnectwCyxcUSI= github.com/dgraph-io/ristretto v0.1.0 h1:Jv3CGQHp9OjuMBSne1485aDpUkTKEcUqF+jm/LuerPI= github.com/dgraph-io/ristretto v0.1.0/go.mod h1:fux0lOrBhrVCJd3lcTHsIJhq1T2rokOu6v9Vcb3Q9ug= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= diff --git a/kernel/util/runtime.go b/kernel/util/runtime.go index 779803f80..91fa1c71c 100644 --- a/kernel/util/runtime.go +++ b/kernel/util/runtime.go @@ -24,7 +24,6 @@ import ( "time" "github.com/88250/gulu" - "github.com/denisbrodbeck/machineid" "github.com/dustin/go-humanize" ) @@ -65,17 +64,6 @@ func RandomSleep(minMills, maxMills int) { time.Sleep(time.Duration(r) * time.Millisecond) } -func GetDeviceID() string { - if "std" == Container { - machineID, err := machineid.ID() - if nil != err { - return gulu.Rand.String(12) - } - return machineID - } - return gulu.Rand.String(12) -} - func SetNetworkProxy(proxyURL string) { if err := os.Setenv("HTTPS_PROXY", proxyURL); nil != err { logger.Errorf("set env [HTTPS_PROXY] failed: %s", err)