فهرست منبع

doc(*): update official website

Signed-off-by: Jiyong Huang <huangjy@emqx.io>
Jiyong Huang 3 سال پیش
والد
کامیت
8c87aaaa44

+ 13 - 8
docs/en_US/plugins/functions/tensorflow_lite_tutorial.md

@@ -1,10 +1,15 @@
 # Run TensorFlow Lite model with eKuiper function plugin
 
-[LF Edge eKuiper](https://docs.emqx.io/en/kuiper/latest/) is an edge lightweight IoT data analytics / streaming software which can be run at all kinds of resource constrained IoT devices.
+[LF Edge eKuiper](https://www.lfedge.org/projects/ekuiper/) is an edge lightweight IoT data analytics / streaming
+software which can be run at all kinds of resource constrained IoT devices.
 
-[TensorFlow Lite](https://www.tensorflow.org/lite/guide) is a set of tools to help developers run TensorFlow models on mobile, embedded, and IoT devices. It enables on-device machine learning inference with low latency and a small binary size.
+[TensorFlow Lite](https://www.tensorflow.org/lite/guide) is a set of tools to help developers run TensorFlow models on
+mobile, embedded, and IoT devices. It enables on-device machine learning inference with low latency and a small binary
+size.
 
-By integrating eKuiper and TensorFlow Lite, users can analyze the data in stream by AI with prebuilt TensorFlow models. In this tutorial, we will walk you through building a eKuiper plugin to label pictures (binary data) produced by an edge device in stream by pre-trained image recognition TensorFlow model.
+By integrating eKuiper and TensorFlow Lite, users can analyze the data in stream by AI with prebuilt TensorFlow models.
+In this tutorial, we will walk you through building a eKuiper plugin to label pictures (binary data) produced by an edge
+device in stream by pre-trained image recognition TensorFlow model.
 
 ## Prerequisite
 
@@ -185,13 +190,13 @@ import (
 	"time"
 )
 
-func main(){
+func main() {
 	const TOPIC = "tfdemo"
 
 	images := []string{
 		"peacock.png",
 		"frog.jpg",
-        // other images you want
+		// other images you want
 	}
 	opts := mqtt.NewClientOptions().AddBroker("tcp://yourownhost:1883")
 	client := mqtt.NewClient(opts)
@@ -199,16 +204,16 @@ func main(){
 		panic(token.Error())
 	}
 	for _, image := range images {
-		fmt.Println("Publishing " + image);
+		fmt.Println("Publishing " + image)
 		payload, err := ioutil.ReadFile(image)
-		if err != nil{
+		if err != nil {
 			fmt.Println(err)
 			continue
 		}
 		if token := client.Publish(TOPIC, 0, false, payload); token.Wait() && token.Error() != nil {
 			fmt.Println(token.Error())
 		} else {
-			fmt.Println("Published " + image);
+			fmt.Println("Published " + image)
 		}
 		time.Sleep(1 * time.Second)
 	}

+ 7 - 3
docs/en_US/plugins/plugins_tutorial.md

@@ -1,6 +1,9 @@
 # A lightweight loT edge stream processing - eKuiper plugin development tutorial
 
-[LF Edge eKuiper](https://www.emqx.io/products/kuiper) is a lightweight loT streaming data processing software based on SQL. It provides a set of plugin mechanism for implementing customized source, sink and SQL function to extend the ability of  stream processing. This tutorial gives a detailed introduction to the process of development, compilation, and deployment of the eKuiper plugin.
+[LF Edge eKuiper](https://www.lfedge.org/projects/ekuiper/) is a lightweight loT streaming data processing software
+based on SQL. It provides a set of plugin mechanism for implementing customized source, sink and SQL function to extend
+the ability of stream processing. This tutorial gives a detailed introduction to the process of development,
+compilation, and deployment of the eKuiper plugin.
 
 ## Overview
 
@@ -62,6 +65,7 @@ The eKuiper plugin has three types. The source code can be put into the correspo
 - Edit go.mod, add Mysql driver module
 
 The complete source code of mysql.go is as follows:
+
 ```go
 package main
 
@@ -70,9 +74,9 @@ package main
 import (
 	"database/sql"
 	"fmt"
+	_ "github.com/go-sql-driver/mysql"
 	"github.com/lf-edge/ekuiper/common"
 	"github.com/lf-edge/ekuiper/xstream/api"
-	_ "github.com/go-sql-driver/mysql"
 )
 
 type mysqlConfig struct {
@@ -83,7 +87,7 @@ type mysqlConfig struct {
 type mysqlSink struct {
 	conf *mysqlConfig
 	//The db connection instance
-	db   *sql.DB
+	db *sql.DB
 }
 
 func (m *mysqlSink) Configure(props map[string]interface{}) error {

+ 1 - 1
docs/zh_CN/getting_started.md

@@ -2,7 +2,7 @@
 
 ## 下载和安装
 
-通过 <https://github.com/lf-edge/ekuiper/releases> 或 <https://www.emqx.cn/downloads#kuiper> 获取安装包.
+通过 <https://github.com/lf-edge/ekuiper/releases>  获取安装包.
 
 ### zip、tar.gz 压缩包
 

+ 10 - 8
docs/zh_CN/plugins/functions/tensorflow_lite_tutorial.md

@@ -1,10 +1,12 @@
 # 使用 eKuiper 函数插件运行TensorFlow Lite 模型
 
-[LF Edge eKuiper](https://docs.emqx.io/en/kuiper/latest/) 是一款边缘轻量级物联网数据分析/流软件,可在各种资源受限的物联网设备上运行。
+[LF Edge eKuiper](https://www.lfedge.org/projects/ekuiper/) 是一款边缘轻量级物联网数据分析/流软件,可在各种资源受限的物联网设备上运行。
 
-[TensorFlow Lite](https://www.tensorflow.org/lite/guide) 是一组帮助开发人员在移动端、嵌入式和物联网设备上运行 TensorFlow 模型的工具,它使得设备上的机器学习预测具有低延迟和较小的二进制容量。
+[TensorFlow Lite](https://www.tensorflow.org/lite/guide) 是一组帮助开发人员在移动端、嵌入式和物联网设备上运行 TensorFlow
+模型的工具,它使得设备上的机器学习预测具有低延迟和较小的二进制容量。
 
-通过集成 eKuiper 和 TensorFlow Lite,用户可以通过包含预先构建的 TensorFlow 模型的AI分析流中的数据。 在本教程中,我们将引导您构建一个 eKuiper 插件,通过预先训练的图像识别 TensorFlow 模型,标记边缘设备生成的流图片(二进制数据)。
+通过集成 eKuiper 和 TensorFlow Lite,用户可以通过包含预先构建的 TensorFlow 模型的AI分析流中的数据。 在本教程中,我们将引导您构建一个 eKuiper 插件,通过预先训练的图像识别 TensorFlow
+模型,标记边缘设备生成的流图片(二进制数据)。
 
 ## 先决条件
 
@@ -186,13 +188,13 @@ import (
 	"time"
 )
 
-func main(){
+func main() {
 	const TOPIC = "tfdemo"
 
 	images := []string{
 		"peacock.png",
 		"frog.jpg",
-        // 其他你需要的图像
+		// 其他你需要的图像
 	}
 	opts := mqtt.NewClientOptions().AddBroker("tcp://yourownhost:1883")
 	client := mqtt.NewClient(opts)
@@ -200,16 +202,16 @@ func main(){
 		panic(token.Error())
 	}
 	for _, image := range images {
-		fmt.Println("Publishing " + image);
+		fmt.Println("Publishing " + image)
 		payload, err := ioutil.ReadFile(image)
-		if err != nil{
+		if err != nil {
 			fmt.Println(err)
 			continue
 		}
 		if token := client.Publish(TOPIC, 0, false, payload); token.Wait() && token.Error() != nil {
 			fmt.Println(token.Error())
 		} else {
-			fmt.Println("Published " + image);
+			fmt.Println("Published " + image)
 		}
 		time.Sleep(1 * time.Second)
 	}