Skip to content

Commit

Permalink
doc: Add script and change backhaul
Browse files Browse the repository at this point in the history
  • Loading branch information
LDannijs committed Feb 5, 2024
1 parent ee25026 commit ac0c3db
Show file tree
Hide file tree
Showing 29 changed files with 153 additions and 29 deletions.
2 changes: 1 addition & 1 deletion doc/content/gateways/models/browan-minihub-pro/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: Browan
vendor_page: "https://www.browan.com/product/minihub-pro/detail"
description: "The Browan Minihub Pro is a low-cost LoRaWAN® gateway with a WiFi backhaul."
ip_rating:
backhaul: ["Wi-Fi"]
backhaul: [Wi-Fi]
weight:
aliases: [/gateways/browan-minihub-pro]
image: [minihub-pro.png]
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/ciscowirelessgateway/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "Cisco"
vendor_page: "https://www.cisco.com/c/en/us/products/routers/wireless-gateway-lorawan/"
description: "The Cisco LoRaWAN Gateway is carrier-grade solution suitable for users who have experience with Cisco software, and that are looking for an industrial-grade LoRaWAN gateway. It supports 16 channels, as well as geolocation."
ip_rating: "IP67"
backhaul: ["Ethernet", "Wi-Fi (add-on)", "Cellular (add-on)"]
backhaul: [Ethernet, Wi-Fi (add-on), Cellular (add-on)]
alias: [/gateways/ciscowirelessgateway]
image: [cisco.png]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/cloudgate/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "Option"
vendor_page: "https://www.option.com/products/"
description: "Option Wireless Technology’s CloudGate is the carrier-approved IoT solution platform that delivers device connectivity, security and processing power for global IoT applications."
ip_rating:
backhaul: ["Ethernet", "Wi-Fi (add-on)", "Cellular (add-on)"]
backhaul: [Ethernet, Wi-Fi (add-on), Cellular (add-on)]
aliases: [/gateways/cloudgate]
image: [CloudGate.png]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/cotx/x1/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: COTX
vendor_page: "https://www.cotxnetworks.com/hotspot/cotx-x1"
description: "COTX X1 is a standard LoRaWAN® indoor gateway. It is easy to install and deploy, highly compatible and has a user-friendly interface. COTX offers rich software tools, powerful back office management and technical support."
ip_rating:
backhaul: ["Ethernet", "Wi-Fi", "Cellular (optional)"]
backhaul: [Ethernet, Wi-Fi, Cellular (optional)]
aliases: [/gateways/cotx/x1]
image: [X1_1.png]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/cotx/x3/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: COTX
vendor_page: "https://www.cotxnetworks.com/hotspot/cotx-x3/"
description: "The COTX X3 gateway has similar characteristics to the COTX X1 gateway, only with additional features like outdoor support, BLE support, a small screen for easy monitoring and more."
ip_rating:
backhaul: ["Ethernet", "Wi-Fi"]
backhaul: [Ethernet, Wi-Fi]
aliases: [/gateways/cotx/x3]
image: [X3_1.png]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/cotx/x5/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ vendor_page: "https://www.cotxnetworks.com/hotspot/cotx-x5/"
description: "The COTX X5 gateway is an outdoor gateway intended for industrial IoT use cases, with a water and dust proof aluminium case."
aliases: [/gateways/cotx/x5]
ip_rating: "IP67"
backhaul: ["Ethernet", "Wi-Fi", "Cellular"]
backhaul: [Ethernet, Wi-Fi, Cellular]
image: [X5_1.png]
---

Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/dragino-lps8/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "Dragino"
vendor_page: "https://www.dragino.com/products/lora-lorawan-gateway/item/200-lps8n.html/"
description: "The Dragino LPS8N is a LoRaWAN® indoor gateway based on the open-source OpenWrt Linux operating system. The LPS8N provides ten programmable parallel demodulation paths. The gateway can be connected to the internet using Ethernet, WiFi, or optional Cellular (3G/4G) connectivity."
ip_rating:
backhaul: ["Ethernet", "Wi-Fi", "Cellular (optional)"]
backhaul: [Ethernet, Wi-Fi, Cellular (optional)]
weight:
aliases: [/gateways/dragino-lps8]
image: [dragino-lps8n.jpg]
Expand Down
4 changes: 2 additions & 2 deletions doc/content/gateways/models/kerlinkwirnetistation/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
title: "Kerlink Wirnet iStation"
vendor: "Kerlink"
vendor_page: "https://www.kerlink.com/product/wirnet-istation/"
description: "he Kerlink Wirnet iStation is an outdoor LoRaWAN® gateway. It offers cellular (4G with 3G/2G fallback) and Ethernet backhauls, as well as fully integrated internal GPS, 4G and LoRa antennas."
description: "The Kerlink Wirnet iStation is an outdoor LoRaWAN® gateway. It offers cellular (4G with 3G/2G fallback) and Ethernet backhauls, as well as fully integrated internal GPS, 4G and LoRa antennas."
ip_rating: "IP67"
backhaul: ["Ethernet", "Cellular (optional)"]
backhaul: [Ethernet, Cellular (optional)]
aliases: [/guides/connecting-gateways/kerlinkwirnetistation, /gateways/kerlinkwirnetistation]
image: [Kerlink-Wirnet-iStation.png]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/kerlinkwirnetstation/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "Kerlink"
vendor_page: "https://www.kerlink.com/product/wirnet-station/"
description: "The Kerlink Wirnet Station is a robust and highly reliable outdoor LoRaWAN gateway. It was the first commercially available LoRaWAN® gateway on the global market. It offers Ethernet and cellular (3G/2G) backhauls."
ip_rating:
backhaul: ["Ethernet", "Wi-Fi", "Cellular (optional)"]
backhaul: [Ethernet, Wi-Fi, Cellular (optional)]
aliases: [/gateways/kerlinkwirnetstation]
image: [wirnet-station.png]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/laird-sentrius/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "Laird"
vendor_page: "https://www.lairdconnect.com/iot-devices/lorawan-iot-devices/sentrius-rg1xx-lorawan-gateway-wi-fi-ethernet-optional-lte-us-only"
description: "The Laird Sentrius™ RG1xx is a secure, scalable, robust LoRaWAN-Enabled Gateway that supports Wi-Fi, Ethernet, and LTE backends."
ip_rating: "IP67 (optional)"
backhaul: ["Ethernet", "Wi-Fi", "Cellular (optional)"]
backhaul: [Ethernet, Wi-Fi, Cellular (optional)]
aliases: [/gateways/laird-sentrius]
image: [laird.png]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/mikrotik-knot/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "MikroTik"
vendor_page: "https://mikrotik.com/product/knot"
description: "The MikroTik KNOT LR8/LR9 kit is a universal device with exceptional connectivity options and protocol support. It is an IoT Gateway which can use ethernet or LTE-M (also known as CAT-M) technology as the gateway backhaul."
ip_rating: "IP20"
backhaul: ["Ethernet", "Wi-Fi", "Cellular"]
backhaul: [Ethernet, Wi-Fi, Cellular]
aliases: ["/gateways/mikrotik-knot"]
image: [mikrotik-knot.jpeg]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/mikrotik-ltap/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "MikroTik"
vendor_page: "https://mikrotik.com/product/ltap_lte_kit"
description: "The LtAP LTE kit is a compact weatherproof wireless access point with a built-in cellular modem that supports 4G (LTE) connectivity."
ip_rating: "IP54"
backhaul: ["Ethernet", "Wi-Fi", "Cellular"]
backhaul: [Ethernet, Wi-Fi, Cellular]
aliases: ["/gateways/mikrotik-ltap"]
image: [LtaP.jpg]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/mikrotikrouterboard/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "MikroTik"
vendor_page: "https://mikrotik.com/product/wap_lr8_kit"
description: "MikroTik Routerboard wAP LoRa8 kit is a LoRaWAN® gateway that contains a pre-installed UDP packet forwarder and an outdoor weatherproof wireless access point with 2.4 GHz WLAN interface and Ethernet port that could be used as a backend."
ip_rating: "IP54"
backhaul: ["Ethernet", "Wi-Fi", "Cellular"]
backhaul: [Ethernet, Wi-Fi, Cellular]
aliases: ["/gateways/mikrotikrouterboard"]
image: [lr8_kit.png]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/milesightug65/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "Milesight"
vendor_page: "https://www.milesight.com/iot/product/lorawan-gateway/ug65"
description: "The Milesight UG65 is a high-performance 8-channel LoRaWAN® gateway that offers reliable connectivity for industrial applications."
ip_rating: "IP65"
backhaul: ["Ethernet", "Wi-Fi", "Cellular (optional)"]
backhaul: [Ethernet, Wi-Fi, Cellular (optional)]
aliases: [/gateways/milesightug65]
image: [ug65.png]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/milesightug67/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "Milesight"
vendor_page: "https://www.milesight.com/iot/product/lorawan-gateway/ug67"
description: "The Milesight UG67 is a robust outdoor LoRaWAN® gateway designed for outdoor deployments. Powered by the SX1302 LoRa chip and a high-performance quad-core CPU, the UG67 can support connectivity with over 2000 nodes."
ip_rating: "IP67"
backhaul: ["Ethernet", "Cellular (optional)"]
backhaul: [Ethernet, Cellular (optional)]
aliases: [/gateways/milesightug67]
image: [ug67.png]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/milesightug85/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "Milesight"
vendor_page: "https://resource.milesight.com/milesight/iot/document/ug85_user_guide_en.pdf"
description: "The Milesight UG85 industrial LoRaWAN gateway delivers tenacious connection over network with full-featured design such as automated failover/failback, extended operating temperature, dual SIM cards, hardware watchdog, VPN, Gigabit Ethernet and beyond."
ip_rating: "IP30"
backhaul: ["Ethernet", "Wi-Fi (optional)", "Cellular (optional)"]
backhaul: [Ethernet, Wi-Fi (optional), Cellular (optional)]
aliases: [/gateways/milesightug85]
image: [ug85.png]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/milesightug87/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "Milesight"
vendor_page: "https://resource.milesight.com/milesight/iot/document/ug87_quick_start_guide_en.pdf"
description: "The Milesight UG87 industrial LoRaWAN gateway delivers tenacious connection over network with full-featured design such as automated failover/failback, extended operating temperature, dual SIM cards, hardware watchdog, VPN, Gigabit Ethernet and beyond."
ip_rating: "IP67"
backhaul: ["Ethernet", "Wi-Fi (optional)", "Cellular (optional)"]
backhaul: [Ethernet, Wi-Fi (optional), Cellular (optional)]
aliases: [/gateways/milesightug87]
image: [ug87.png]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/moko-mkgw2-lw/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "MOKOSMART"
vendor_page: "https://www.mokosmart.com/lorawan-gateway-mkgw2-lw/"
description: "MOKOSMART's 8 channel MKGW2 gateway is embedded with Semtech’s high performance multi-channel transceiver SX1301/SX1257 and MTK platform. It is for indoor use and is easy to install."
ip_rating: "IP66"
backhaul: ["Ethernet", "Wi-Fi"]
backhaul: [Ethernet, Wi-Fi]
aliases: [/gateways/moko-mkgw2-lw]
image: [mkgw2-lw.jpg]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/multitechconduit/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "MultiTech"
vendor_page: "http://www.multitech.net/developer/products/multiconnect-Conduit-platform/"
description: "The MultiTech MultiConnect® Conduit™ is a configurable, scalable cellular communications gateway for industrial IoT applications."
ip_rating: "IP30"
backhaul: ["Ethernet", "Wi-Fi (optional)", "Cellular (optional)"]
backhaul: [Ethernet, Wi-Fi (optional), Cellular (optional)]
aliases: [/guides/connecting-gateways/multitechconduit, /gateways/multitechconduit]
image: [multitech-conduit.png]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/nasysoutdoorgateway/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "NASys"
vendor_page: "https://www.nasys.no/product/lorawan-gateway/"
description: "NASys LoRaWAN Outdoor Gateway is an 8 Channel LoRaWAN gateway."
ip_rating: "IP67"
backhaul: ["Ethernet", "Cellular (optional)"]
backhaul: [Ethernet, Cellular (optional)]
aliases: [/gateways/nasysoutdoorgateway]
image: [IX1001.png]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/peplink-20x/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "Peplink"
vendor_page: "https://www.peplink.com/products/balance-20x/"
description: "Peplink’s Balance 20X is an SD-WAN branch router with an option to add LoRaWAN® gateway functionality using a LoRaWAN FlexModule Mini."
ip_rating:
backhaul: ["Ethernet", "Wi-Fi", "Cellular (optional)"]
backhaul: [Ethernet, Wi-Fi, Cellular (optional)]
aliases: [/gateways/peplink]
image: [B20X_LoRa.png]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/rak-7240/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: [RAKwireless]
vendor_page: "https://www.rakwireless.com/en-us/products/lpwan-gateways-and-concentrators/rak7240"
description: "The RAK7240 (WisGate Edge Prime) is a macro outdoor LoRaWAN® gateway, ideal for large scale deployments. It is highly reliable, customizable, and offers a WiFi, LTE and Ethernet backhaul."
ip_rating: "IP65"
backhaul: ["Ethernet", "Wi-Fi", "Cellular"]
backhaul: [Ethernet, Wi-Fi, Cellular]
aliases: [/gateways/rak-7240]
image: [rak7240.jpg]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/tektelickonamicro/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "Tektelic"
vendor_page: "https://tektelic.com/products/gateways/kona-micro-iot-gateway/"
description: "Tektelic Kona Micro IoT LoRaWAN Gateway is an 8 channel LoRaWAN gateway."
ip_rating: "IP30"
backhaul: ["Ethernet", "Cellular"]
backhaul: [Ethernet, Cellular]
aliases: [/gateways/tektelickonamicro]
image: [kona-micro.jpg]
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "The Things Industries"
vendor_page: "https://www.thethingsshop.com/products/the-things-indoor-gateway"
description: "The Things Indoor Gateway is an 8 Channel LoRaWAN® gateway."
ip_rating:
backhaul: ["Wi-Fi"]
backhaul: [Wi-Fi]
distributions: ["Sandbox", "Cloud"]
new_in_version: 3.13.3
aliases: [/gateways/thethingsindoorgateway]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "The Things Industries"
vendor_page: "https://www.thethingsnetwork.org/docs/gateways/gateway/"
description: "The Things Kickstarter Gateway is a LoRaWAN gateway."
ip_rating:
backhaul: ["Ethernet", "Wi-Fi"]
backhaul: [Ethernet, Wi-Fi]
aliases: [/gateways/thethingskickstartergateway]
image: [TTKG.png]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/thethingsoutdoor/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "The Things Industries"
vendor_page: "https://www.thethingsnetwork.org/docs/gateways/thethingsoutdoor/"
description: "The Things Outdoor Gateway (TTOG) is an industrial, outdoor and fully compliant gateway at a very low cost."
ip_rating: "IP67"
backhaul: ["Ethernet", "Cellular"]
backhaul: [Ethernet, Cellular]
aliases: [/gateways/thethingsoutdoor]
image: [TTOG.png]
---
Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/wifx-l1/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "Wifx"
vendor_page: "https://iot.wifx.net/en/products/wifx-l1/"
description: "The Wifx L1 is a robust and professional grade outdoor LoRaWAN® gateway in an ultra compact form factor, designed and assembled in Switzerland. It is the successor of the Wifx LORIX One."
ip_rating: "IP65"
backhaul: ["Ethernet"]
backhaul: [Ethernet]
image: [wifx-l1.png]
---

Expand Down
2 changes: 1 addition & 1 deletion doc/content/gateways/models/wifx-lorix-one/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vendor: "Wifx"
vendor_page: "https://iot.wifx.net/en/products/lorix-one/"
description: "The LORIX One is a robust and professional grade outdoor LoRaWAN® gateway in an ultra compact form factor, designed and assembled in Switzerland."
ip_rating: "IP65"
backhaul: ["Ethernet"]
backhaul: [Ethernet]
image: [lorix-one.png]
---

Expand Down
124 changes: 124 additions & 0 deletions frontmatter.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
package main

import (
"bufio"
"encoding/csv"
"os"
"path/filepath"
"strings"
)

func parseFrontMatter(filePath string) (map[string]string, error) {
frontMatter := make(map[string]string)
file, err := os.Open(filePath)
if err != nil {
return nil, err
}
defer file.Close()

scanner := bufio.NewScanner(file)
readingFrontMatter := false

for scanner.Scan() {
line := scanner.Text()
if line == "---" {
if readingFrontMatter {
break
} else {
readingFrontMatter = true
continue
}
}
if readingFrontMatter {
parts := strings.SplitN(line, ":", 2)
if len(parts) == 2 {
key := strings.TrimSpace(parts[0])
value := strings.Trim(strings.TrimSpace(parts[1]), "\"[]")
frontMatter[key] = value
}
}
}

if err := scanner.Err(); err != nil {
return nil, err
}

return frontMatter, nil
}

func hasRequiredFields(frontMatter map[string]string, requiredFields []string) bool {
for _, field := range requiredFields {
if _, ok := frontMatter[field]; !ok {
return false
}
}
return true
}

func frontMatterToCSV(rootDirectory, csvPath, repoBaseURL string) error {
csvFile, err := os.Create(csvPath)
if err != nil {
return err
}
defer csvFile.Close()

writer := csv.NewWriter(csvFile)
defer writer.Flush()

headers := []string{"title", "vendor", "vendor_page", "description", "ip_rating", "backhaul", "image_url"}
if err := writer.Write(headers); err != nil {
return err
}

requiredFields := []string{"title", "vendor", "description", "image"}

err = filepath.Walk(rootDirectory, func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
if info.IsDir() || filepath.Base(path) != "_index.md" {
return nil
}

frontMatter, err := parseFrontMatter(path)
if err != nil {
return err
}

if hasRequiredFields(frontMatter, requiredFields) {
imageRelativePath := frontMatter["image"]
imagePath := filepath.Join(filepath.Dir(path), imageRelativePath)
relPath, err := filepath.Rel(rootDirectory, imagePath)
if err != nil {
return err
}
imageURL := repoBaseURL + "/" + strings.ReplaceAll(relPath, "\\", "/")

row := make([]string, len(headers))
for i, header := range headers[:len(headers)-1] { // Exclude image_url from headers for mapping
row[i] = frontMatter[header]
}
row[len(headers)-1] = imageURL // Add image_url at the end
if err := writer.Write(row); err != nil {
return err
}
}

return nil
})

if err != nil {
return err
}

return nil
}

func main() {
rootDirectoryPath := "doc/content/gateways/models"
csvPath := "gateways.csv"
repoBaseURL := "https://raw.githubusercontent.com/TheThingsIndustries/lorawan-stack-docs/master/doc/content/gateways/models"
if err := frontMatterToCSV(rootDirectoryPath, csvPath, repoBaseURL); err != nil {
panic(err)
}
}

0 comments on commit ac0c3db

Please sign in to comment.