Compare commits

..

4 Commits

Author SHA1 Message Date
MkQtS
311b281000 improve codes (#3246) 2026-02-04 15:03:04 +08:00
秋野かえで
bfb35d7b68 split githubcopilot.com to github-copilot (#3245) 2026-02-04 14:34:55 +08:00
深鸣
daf4c10d0c category-entertainment-cn: add anitabi.cn (#3244) 2026-02-04 13:58:38 +08:00
深鸣
a188c2c058 geolocation-!cn: add osmand.net (#3243) 2026-02-04 13:57:46 +08:00
7 changed files with 29 additions and 7 deletions

View File

@@ -33,9 +33,17 @@ type DomainList struct {
func (d *DomainRule) domain2String() string {
var dstr strings.Builder
dstr.Grow(len(d.Type) + len(d.Value) + 10)
fmt.Fprintf(&dstr, "%s:%s", d.Type, d.Value)
if len(d.Attrs) != 0 {
fmt.Fprintf(&dstr, ":@%s", strings.Join(d.Attrs, ",@"))
dstr.WriteString(d.Type)
dstr.WriteByte(':')
dstr.WriteString(d.Value)
for i, attr := range d.Attrs {
if i == 0 {
dstr.WriteByte(':')
} else {
dstr.WriteByte(',')
}
dstr.WriteByte('@')
dstr.WriteString(attr)
}
return dstr.String()
}

View File

@@ -4,6 +4,7 @@ include:cerebras
include:comfy
include:cursor
include:elevenlabs
include:github-copilot
include:google-deepmind
include:groq
include:huggingface

View File

@@ -50,6 +50,8 @@ yeshen.com
51zmt.top
# 广东南方新媒体
aisee.tv
# 动画巡礼
anitabi.cn
# 暴风影音
baofeng.com
baofeng.net

View File

@@ -271,6 +271,8 @@ ldoceonline.com
immersivetranslate.com # 沉浸式翻译 (国际版)
## OriginLab (Graphing for Science and Engineering)
originlab.com
## OsmAnd
osmand.net
# Software development
include:category-dev

View File

@@ -1,4 +1,5 @@
include:github-ads
include:github-copilot
include:npmjs
atom.io
@@ -14,7 +15,6 @@ github.dev
github.io
githubapp.com
githubassets.com
githubcopilot.com
githubhackathon.com
githubnext.com
githubpreview.dev

1
data/github-copilot Normal file
View File

@@ -0,0 +1 @@
githubcopilot.com

14
main.go
View File

@@ -156,9 +156,17 @@ func parseEntry(line string) (Entry, error) {
// Formated plain entry: type:domain.tld:@attr1,@attr2
var plain strings.Builder
plain.Grow(len(entry.Type) + len(entry.Value) + 10)
fmt.Fprintf(&plain, "%s:%s", entry.Type, entry.Value)
if len(entry.Attrs) != 0 {
fmt.Fprintf(&plain, ":@%s", strings.Join(entry.Attrs, ",@"))
plain.WriteString(entry.Type)
plain.WriteByte(':')
plain.WriteString(entry.Value)
for i, attr := range entry.Attrs {
if i == 0 {
plain.WriteByte(':')
} else {
plain.WriteByte(',')
}
plain.WriteByte('@')
plain.WriteString(attr)
}
entry.Plain = plain.String()