ImportSubscription no longer requires only http(s): paste awg://, AWG .conf/JSON, or naive links; subscription parser also reads hosted AWG and Clash wireguard/naive. Site lists support emails and FAQ; Store listing texts/tools updated. Co-authored-by: Cursor <cursoragent@cursor.com>
62 lines
1.8 KiB
Go
62 lines
1.8 KiB
Go
package main
|
|
|
|
import (
|
|
"encoding/csv"
|
|
"os"
|
|
"path/filepath"
|
|
)
|
|
|
|
func main() {
|
|
path := filepath.Join(`D:\vpn navi`, "store.csv")
|
|
f, err := os.Open(path)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
r := csv.NewReader(f)
|
|
r.FieldsPerRecord = -1
|
|
r.LazyQuotes = true
|
|
all, err := r.ReadAll()
|
|
f.Close()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
h := all[0]
|
|
di, ei := 3, 4
|
|
for i, x := range h {
|
|
if x == "default" {
|
|
di = i
|
|
}
|
|
if x == "en" {
|
|
ei = i
|
|
}
|
|
}
|
|
ru := "© 2026 EvilFox. Все права защищены. EvilFox, логотип EvilFox и связанные знаки являются товарными знаками или зарегистрированными товарными знаками EvilFox. Прочие названия продуктов и компаний, упомянутые в приложении или на странице продукта, могут быть товарными знаками соответствующих владельцев."
|
|
en := "© 2026 EvilFox. All rights reserved. EvilFox, the EvilFox logo, and related marks are trademarks or registered trademarks of EvilFox. Other product and company names mentioned in the app or product listing may be trademarks of their respective owners."
|
|
for i := 1; i < len(all); i++ {
|
|
for len(all[i]) < len(h) {
|
|
all[i] = append(all[i], "")
|
|
}
|
|
if all[i][0] == "CopyrightTrademarkInformation" {
|
|
all[i][di] = ru
|
|
all[i][ei] = en
|
|
}
|
|
}
|
|
out, err := os.Create(path)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
if _, err := out.Write([]byte{0xEF, 0xBB, 0xBF}); err != nil {
|
|
panic(err)
|
|
}
|
|
w := csv.NewWriter(out)
|
|
if err := w.WriteAll(all); err != nil {
|
|
panic(err)
|
|
}
|
|
w.Flush()
|
|
out.Close()
|
|
listing := filepath.Join(`D:\vpn navi`, "dist", "microsoft-store", "listing", "store.csv")
|
|
if data, err := os.ReadFile(path); err == nil {
|
|
_ = os.WriteFile(listing, data, 0644)
|
|
}
|
|
}
|