Skip to content

Commit 82f3eb6

Browse files
committed
update extension list
1 parent 3a68a58 commit 82f3eb6

40 files changed

+272
-179
lines changed

cli/gen_list.go

Lines changed: 48 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,15 @@ PostgreSQL Extensions (%d ext in %d pkg) categorized into %d categories.
5858
`, len(g.Cache.Extensions), pkgCount, len(g.Cache.Categories)))
5959
}
6060

61+
b.WriteString(`
62+
63+
| {{< category "time" >}} | {{< category "gis" >}} | {{< category "rag" >}} | {{< category "fts" >}} | {{< category "olap" >}} | {{< category "feat" >}} | {{< category "lang" >}} | {{< category "type" >}} |
64+
|------------------------|-------------------------|--------------------------|-------------------------|-------------------------|-------------------------|-------------------------|-------------------------|
65+
| {{< category "util" >}} | {{< category "func" >}} | {{< category "admin" >}} | {{< category "stat" >}} | {{< category "sec" >}} | {{< category "fdw" >}} | {{< category "sim" >}} | {{< category "etl" >}} |
66+
67+
68+
`)
69+
6170
// Generate sections for each category
6271
for _, cat := range g.Cache.Categories {
6372
catKey := strings.ToUpper(cat.Name)
@@ -191,13 +200,12 @@ weight: 200
191200
`)
192201
}
193202

194-
// Navigation
195-
var navItems []string
196-
for _, lc := range langs {
197-
navItems = append(navItems, LanguageShortcode(lc.lang))
198-
}
199-
b.WriteString(strings.Join(navItems, " "))
200-
b.WriteString("\n\n")
203+
b.WriteString(`
204+
205+
| {{< language "c" >}} | {{< language "c++" >}} | {{< language "rust" >}} | {{< language "java" >}} | {{< language "python" >}} | {{< language "sql" >}} | {{< language "data" >}} |
206+
|----------------------------|------------------------------|------------------------------|--------------------------------|--------------------------------|--------------------------------|-------------------------|
207+
208+
`)
201209

202210
// Summary section
203211
if isZh {
@@ -338,6 +346,8 @@ description: "按开源许可证组织的 PostgreSQL 扩展"
338346
weight: 300
339347
---
340348
349+
按照所使用开源许可证,对 PostgreSQL 扩展进行分类。
350+
341351
`)
342352
} else {
343353
b.WriteString(`---
@@ -346,29 +356,19 @@ description: "PostgreSQL extensions organized by open source license"
346356
weight: 300
347357
---
348358
359+
PostgreSQL extension categorized by license.
360+
349361
`)
350362
}
351363

352-
// License badges
353-
permissive, copyleft := g.categorizeLicenses(licenses)
364+
b.WriteString(`
354365
355-
if len(permissive) > 0 {
356-
var badges []string
357-
for _, lic := range permissive {
358-
badges = append(badges, LicenseShortcode(lic))
359-
}
360-
b.WriteString(strings.Join(badges, " "))
361-
b.WriteString("\n\n")
362-
}
366+
| {{< license "MIT" >}} | {{< license "ISC" >}} | {{< license "PostgreSQL" >}} | {{< license "BSD 0-Clause" >}} | {{< license "BSD 2-Clause" >}} | {{< license "BSD 3-Clause" >}} |
367+
|:---------------------------|:-----------------------------|:-----------------------------|:-------------------------------|:-------------------------------|:-------------------------------|
368+
| {{< license "Artistic" >}} | {{< license "Apache-2.0" >}} | {{< license "MPL-2.0" >}} | | | |
369+
| {{< license "GPL-2.0" >}} | {{< license "GPL-3.0" >}} | {{< license "LGPL-2.1" >}} | {{< license "LGPL-3.0" >}} | {{< license "AGPL-3.0" >}} | {{< license "Timescale" >}} |
363370
364-
if len(copyleft) > 0 {
365-
var badges []string
366-
for _, lic := range copyleft {
367-
badges = append(badges, LicenseShortcode(lic))
368-
}
369-
b.WriteString(strings.Join(badges, " "))
370-
b.WriteString("\n\n")
371-
}
371+
`)
372372

373373
// Summary section
374374
if isZh {
@@ -411,15 +411,18 @@ func (g *ListGenerator) generateLicenseSection(license string, extensions []*Ext
411411
if isZh {
412412
countText = fmt.Sprintf("%d 个扩展", len(extensions))
413413
}
414-
b.WriteString(fmt.Sprintf("%s %s\n\n", LicenseShortcode(license), Badge(countText, "gray", "", "", "cube")))
415-
416-
// License info
417414
info := getLicenseInfo(license)
418415
refText := "License Text"
419416
if isZh {
420417
refText = "许可证文本"
421418
}
422-
b.WriteString(fmt.Sprintf("[%s %s](%s) : %s\n\n", license, refText, info.URL, info.Description))
419+
b.WriteString(fmt.Sprintf(`
420+
421+
| %s | %s |
422+
|:----|:---|
423+
| %s | %s |
424+
425+
`, LicenseShortcode(license), Badge(countText, "gray", "", "", "cube"), Badge(refText, "gray", "", info.URL, "scale"), info.Description))
423426

424427
// Table
425428
if isZh {
@@ -466,31 +469,6 @@ type licenseItem struct {
466469
order int
467470
}
468471

469-
func (g *ListGenerator) categorizeLicenses(licenses []licenseItem) ([]string, []string) {
470-
permissiveLicenses := []string{"MIT", "ISC", "PostgreSQL", "BSD 0-Clause", "BSD 2-Clause",
471-
"BSD 3-Clause", "Artistic", "Apache-2.0", "MPL-2.0"}
472-
copyleftLicenses := []string{"GPL-2.0", "GPL-3.0", "LGPL-2.1", "LGPL-3.0", "AGPL-3.0", "Timescale"}
473-
474-
var permissive, copyleft []string
475-
476-
for _, lic := range licenses {
477-
for _, p := range permissiveLicenses {
478-
if lic.name == p {
479-
permissive = append(permissive, p)
480-
break
481-
}
482-
}
483-
for _, c := range copyleftLicenses {
484-
if lic.name == c {
485-
copyleft = append(copyleft, c)
486-
break
487-
}
488-
}
489-
}
490-
491-
return permissive, copyleft
492-
}
493-
494472
// Helper functions
495473
func getLanguageDescriptions(isZh bool) map[string]string {
496474
if isZh {
@@ -523,21 +501,21 @@ type LicenseInfo struct {
523501

524502
func getLicenseInfo(license string) LicenseInfo {
525503
licenses := map[string]LicenseInfo{
526-
"PostgreSQL": {"https://opensource.org/licenses/postgresql", "Very liberal license based on the BSD license, allowing almost unlimited freedom.", 1},
527-
"Apache-2.0": {"https://opensource.org/licenses/Apache-2.0", "Permissive license with patent protection and attribution requirements.", 2},
528-
"MIT": {"https://opensource.org/licenses/MIT", "A permissive license that allows commercial use, modification, and private use.", 3},
529-
"BSD 3-Clause": {"https://opensource.org/license/bsd-3-clause", "Permissive license with attribution and endorsement restriction clauses.", 4},
530-
"BSD 2-Clause": {"https://opensource.org/license/bsd-2-clause", "Permissive license requiring attribution but allowing commercial use.", 5},
531-
"GPL-2.0": {"https://opensource.org/licenses/GPL-2.0", "Strong copyleft license requiring derivative works to be open source.", 6},
532-
"GPL-3.0": {"https://opensource.org/licenses/GPL-3.0", "Strong copyleft license with additional patent and hardware restrictions.", 7},
533-
"AGPL-3.0": {"https://opensource.org/licenses/AGPL-3.0", "Network copyleft license extending GPL to cover network-distributed software.", 8},
534-
"ISC": {"https://opensource.org/licenses/ISC", "A permissive license similar to MIT, allowing commercial use and modification.", 9},
535-
"Artistic": {"https://opensource.org/license/artistic-2-0", "Copyleft license allowing modification with certain distribution requirements.", 10},
536-
"Timescale": {"https://www.timescale.com/legal/licenses", "Proprietary license with restrictions on commercial use and distribution.", 11},
537-
"BSD 0-Clause": {"https://opensource.org/license/0bsd", "Public domain equivalent license with no restrictions on use.", 12},
538-
"LGPL-3.0": {"https://opensource.org/licenses/LGPL-3.0", "Weak copyleft license with additional patent and hardware provisions.", 13},
539-
"MPL-2.0": {"https://opensource.org/licenses/MPL-2.0", "Weak copyleft license allowing proprietary combinations with file-level copyleft.", 14},
540-
"LGPL-2.1": {"https://opensource.org/licenses/LGPL-2.1", "Weak copyleft license allowing proprietary applications to link dynamically.", 15},
504+
"PostgreSQL": {"https://opensource.org/licenses/postgresql", "Very liberal license based on the BSD license, allowing almost unlimited freedom.", 1},
505+
"Apache-2.0": {"https://opensource.org/licenses/Apache-2.0", "Permissive license with patent protection and attribution requirements.", 2},
506+
"MIT": {"https://opensource.org/licenses/MIT", "A permissive license that allows commercial use, modification, and private use.", 3},
507+
"BSD 3-Clause": {"https://opensource.org/license/bsd-3-clause", "Permissive license with attribution and endorsement restriction clauses.", 4},
508+
"BSD 2-Clause": {"https://opensource.org/license/bsd-2-clause", "Permissive license requiring attribution but allowing commercial use.", 5},
509+
"GPL-2.0": {"https://opensource.org/licenses/GPL-2.0", "Strong copyleft license requiring derivative works to be open source.", 6},
510+
"GPL-3.0": {"https://opensource.org/licenses/GPL-3.0", "Strong copyleft license with additional patent and hardware restrictions.", 7},
511+
"AGPL-3.0": {"https://opensource.org/licenses/AGPL-3.0", "Network copyleft license extending GPL to cover network-distributed software.", 8},
512+
"ISC": {"https://opensource.org/licenses/ISC", "A permissive license similar to MIT, allowing commercial use and modification.", 9},
513+
"Artistic": {"https://opensource.org/license/artistic-2-0", "Copyleft license allowing modification with certain distribution requirements.", 10},
514+
"Timescale": {"https://www.timescale.com/legal/licenses", "Proprietary license with restrictions on commercial use and distribution.", 11},
515+
"BSD 0-Clause": {"https://opensource.org/license/0bsd", "Public domain equivalent license with no restrictions on use.", 12},
516+
"LGPL-3.0": {"https://opensource.org/licenses/LGPL-3.0", "Weak copyleft license with additional patent and hardware provisions.", 13},
517+
"MPL-2.0": {"https://opensource.org/licenses/MPL-2.0", "Weak copyleft license allowing proprietary combinations with file-level copyleft.", 14},
518+
"LGPL-2.1": {"https://opensource.org/licenses/LGPL-2.1", "Weak copyleft license allowing proprietary applications to link dynamically.", 15},
541519
}
542520

543521
if info, ok := licenses[license]; ok {
@@ -549,4 +527,4 @@ func getLicenseInfo(license string) LicenseInfo {
549527
func getLicenseOrder(license string) int {
550528
info := getLicenseInfo(license)
551529
return info.Order
552-
}
530+
}

content/_index.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ Harness the synergistic superpower of the PostgreSQL extensions ecosystem with t
2929

3030
## Catalog
3131

32-
{{< category "time" >}} {{< category "gis" >}} {{< category "rag" >}} {{< category "fts" >}} {{< category "olap" >}} {{< category "feat" >}} {{< category "lang" >}} {{< category "type" >}}
33-
34-
{{< category "util" >}} {{< category "func" >}} {{< category "admin" >}} {{< category "stat" >}} {{< category "sec" >}} {{< category "fdw" >}} {{< category "sim" >}} {{< category "etl" >}}
32+
| {{< category "time" >}} | {{< category "gis" >}} | {{< category "rag" >}} | {{< category "fts" >}} | {{< category "olap" >}} | {{< category "feat" >}} | {{< category "lang" >}} | {{< category "type" >}} |
33+
|-------------------------|-------------------------|--------------------------|-------------------------|-------------------------|-------------------------|-------------------------|-------------------------|
34+
| {{< category "util" >}} | {{< category "func" >}} | {{< category "admin" >}} | {{< category "stat" >}} | {{< category "sec" >}} | {{< category "fdw" >}} | {{< category "sim" >}} | {{< category "etl" >}} |
3535

3636
{{< cards cols=5 >}}
3737
{{< card link="/cate/time" title="TIME" icon="clock" subtitle="TimescaleDB, Versioning & Temporal Table, Crontab, Async & Background Job Scheduler, ..." >}}
@@ -52,13 +52,15 @@ Harness the synergistic superpower of the PostgreSQL extensions ecosystem with t
5252
{{< card link="/cate/etl" title="ETL" icon="truck" subtitle="Logical Replication, Decoding, CDC in protobuf/JSON/Mongo format, Copy & Load & Compare Postgres Databases,..." >}}
5353
{{< /cards >}}
5454

55-
{{< license "MIT" >}} {{< license "ISC" >}} {{< license "PostgreSQL" >}} {{< license "BSD 0-Clause" >}} {{< license "BSD 2-Clause" >}} {{< license "BSD 3-Clause" >}} {{< license "Artistic" >}} {{< license "Apache-2.0" >}} {{< license "MPL-2.0" >}}
55+
| {{< license "MIT" >}} | {{< license "ISC" >}} | {{< license "PostgreSQL" >}} | {{< license "BSD 0-Clause" >}} | {{< license "BSD 2-Clause" >}} | {{< license "BSD 3-Clause" >}} |
56+
|:---------------------------|:-----------------------------|:-----------------------------|:-------------------------------|:-------------------------------|:-------------------------------|
57+
| {{< license "Artistic" >}} | {{< license "Apache-2.0" >}} | {{< license "MPL-2.0" >}} | | | |
58+
| {{< license "GPL-2.0" >}} | {{< license "GPL-3.0" >}} | {{< license "LGPL-2.1" >}} | {{< license "LGPL-3.0" >}} | {{< license "AGPL-3.0" >}} | {{< license "Timescale" >}} |
5659

57-
{{< license "GPL-2.0" >}} {{< license "GPL-3.0" >}} {{< license "LGPL-2.1" >}} {{< license "LGPL-3.0" >}} {{< license "AGPL-3.0" >}} {{< license "Timescale" >}}
58-
{{< language "c" >}} {{< language "c++" >}} {{< language "rust" >}} {{< language "java" >}} {{< language "python" >}} {{< language "sql" >}} {{< language "data" >}}
5960

61+
| {{< language "c" >}} | {{< language "c++" >}} | {{< language "rust" >}} | {{< language "java" >}} | {{< language "python" >}} | {{< language "sql" >}} | {{< language "data" >}} |
62+
|----------------------------|------------------------------|------------------------------|--------------------------------|--------------------------------|--------------------------------|-------------------------|
6063

61-
--------
6264

6365
## Projects
6466

content/_index.zh.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ Pigsty 提供了以下三样基础设施,帮助用户更好的利用 PostgreSQ
4343

4444
## 扩展分类
4545

46-
{{< category "time" >}} {{< category "gis" >}} {{< category "rag" >}} {{< category "fts" >}} {{< category "olap" >}} {{< category "feat" >}} {{< category "lang" >}} {{< category "type" >}}
47-
48-
{{< category "util" >}} {{< category "func" >}} {{< category "admin" >}} {{< category "stat" >}} {{< category "sec" >}} {{< category "fdw" >}} {{< category "sim" >}} {{< category "etl" >}}
46+
| {{< category "time" >}} | {{< category "gis" >}} | {{< category "rag" >}} | {{< category "fts" >}} | {{< category "olap" >}} | {{< category "feat" >}} | {{< category "lang" >}} | {{< category "type" >}} |
47+
|-------------------------|-------------------------|--------------------------|-------------------------|-------------------------|-------------------------|-------------------------|-------------------------|
48+
| {{< category "util" >}} | {{< category "func" >}} | {{< category "admin" >}} | {{< category "stat" >}} | {{< category "sec" >}} | {{< category "fdw" >}} | {{< category "sim" >}} | {{< category "etl" >}} |
4949

5050
{{< cards cols=5 >}}
5151
{{< card link="/zh/cate/time" title="TIME" icon="clock" subtitle="时间时态扩展:时序数据库 TimescaleDB,时态数据库,版本控制表,定时任务,异步后台任务调度扩展。" >}}
@@ -66,10 +66,11 @@ Pigsty 提供了以下三样基础设施,帮助用户更好的利用 PostgreSQ
6666
{{< card link="/zh/cate/etl" title="ETL" icon="truck" subtitle="数据复制扩展:逻辑复制,逻辑解码,DDL复制,JSON/BSON/Protobuf 变更抽取,数据迁移,数据导入,数据比对等。" >}}
6767
{{< /cards >}}
6868

69-
{{< license "MIT" >}} {{< license "ISC" >}} {{< license "PostgreSQL" >}} {{< license "BSD 0-Clause" >}} {{< license "BSD 2-Clause" >}} {{< license "BSD 3-Clause" >}} {{< license "Artistic" >}} {{< license "Apache-2.0" >}} {{< license "MPL-2.0" >}}
70-
71-
{{< license "GPL-2.0" >}} {{< license "GPL-3.0" >}} {{< license "LGPL-2.1" >}} {{< license "LGPL-3.0" >}} {{< license "AGPL-3.0" >}} {{< license "Timescale" >}}
72-
{{< language "c" >}} {{< language "c++" >}} {{< language "rust" >}} {{< language "java" >}} {{< language "python" >}} {{< language "sql" >}} {{< language "data" >}}
69+
| {{< license "MIT" >}} | {{< license "ISC" >}} | {{< license "PostgreSQL" >}} | {{< license "BSD 0-Clause" >}} | {{< license "BSD 2-Clause" >}} | {{< license "BSD 3-Clause" >}} |
70+
|----------------------------|------------------------------|------------------------------|--------------------------------|--------------------------------|--------------------------------|
71+
| {{< license "Artistic" >}} | {{< license "Apache-2.0" >}} | {{< license "MPL-2.0" >}} | | | |
72+
| {{< license "GPL-2.0" >}} | {{< license "GPL-3.0" >}} | {{< license "LGPL-2.1" >}} | {{< license "LGPL-3.0" >}} | {{< license "AGPL-3.0" >}} | {{< license "Timescale" >}} |
73+
| {{< language "c" >}} | {{< language "c++" >}} | {{< language "rust" >}} | {{< language "java" >}} | {{< language "python" >}} | {{< language "sql" >}} |{{< language "data" >}}|
7374

7475
--------
7576

content/list/cate.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ weight: 100
55

66
PostgreSQL Extensions (431 ext in 364 pkg) categorized into 16 categories.
77

8+
9+
10+
| {{< category "time" >}} | {{< category "gis" >}} | {{< category "rag" >}} | {{< category "fts" >}} | {{< category "olap" >}} | {{< category "feat" >}} | {{< category "lang" >}} | {{< category "type" >}} |
11+
|------------------------|-------------------------|--------------------------|-------------------------|-------------------------|-------------------------|-------------------------|-------------------------|
12+
| {{< category "util" >}} | {{< category "func" >}} | {{< category "admin" >}} | {{< category "stat" >}} | {{< category "sec" >}} | {{< category "fdw" >}} | {{< category "sim" >}} | {{< category "etl" >}} |
13+
14+
815
## TIME
916

1017
TimescaleDB, Versioning & Temporal Table, Crontab, Async & Background Job Scheduler, ...

content/list/cate.zh.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ weight: 100
55

66
PostgreSQL 扩展(431 ext / 364 pkg)归属 16 个分类。
77

8+
9+
10+
| {{< category "time" >}} | {{< category "gis" >}} | {{< category "rag" >}} | {{< category "fts" >}} | {{< category "olap" >}} | {{< category "feat" >}} | {{< category "lang" >}} | {{< category "type" >}} |
11+
|------------------------|-------------------------|--------------------------|-------------------------|-------------------------|-------------------------|-------------------------|-------------------------|
12+
| {{< category "util" >}} | {{< category "func" >}} | {{< category "admin" >}} | {{< category "stat" >}} | {{< category "sec" >}} | {{< category "fdw" >}} | {{< category "sim" >}} | {{< category "etl" >}} |
13+
14+
815
## TIME
916

1017
时间时态扩展:时序数据库 TimescaleDB,时态数据库,版本控制表,定时任务,异步后台任务调度扩展。

content/list/lang.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ excludeSearch: true
55
weight: 200
66
---
77

8-
{{< language "C" >}} {{< language "SQL" >}} {{< language "Rust" >}} {{< language "Data" >}} {{< language "C++" >}} {{< language "Python" >}} {{< language "Java" >}}
8+
9+
10+
| {{< language "c" >}} | {{< language "c++" >}} | {{< language "rust" >}} | {{< language "java" >}} | {{< language "python" >}} | {{< language "sql" >}} | {{< language "data" >}} |
11+
|----------------------------|------------------------------|------------------------------|--------------------------------|--------------------------------|--------------------------------|-------------------------|
912

1013
## Summary
1114

content/list/lang.zh.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ excludeSearch: true
55
weight: 200
66
---
77

8-
{{< language "C" >}} {{< language "SQL" >}} {{< language "Rust" >}} {{< language "Data" >}} {{< language "C++" >}} {{< language "Python" >}} {{< language "Java" >}}
8+
9+
10+
| {{< language "c" >}} | {{< language "c++" >}} | {{< language "rust" >}} | {{< language "java" >}} | {{< language "python" >}} | {{< language "sql" >}} | {{< language "data" >}} |
11+
|----------------------------|------------------------------|------------------------------|--------------------------------|--------------------------------|--------------------------------|-------------------------|
912

1013
## 概览
1114

0 commit comments

Comments
 (0)