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>
19 lines
818 B
Go
19 lines
818 B
Go
package main
|
|
import ("encoding/csv";"os";"path/filepath")
|
|
func main() {
|
|
path := filepath.Join(`D:\vpn navi`,"store.csv")
|
|
f,_ := os.Open(path); r := csv.NewReader(f); r.FieldsPerRecord=-1; r.LazyQuotes=true; all,_ := r.ReadAll(); f.Close()
|
|
h := all[0]; di,ei := 3,4
|
|
for i,x := range h { if x=="default"{di=i}; if x=="en"{ei=i} }
|
|
for i:=1;i<len(all);i++ {
|
|
for len(all[i])<len(h){all[i]=append(all[i],"")}
|
|
if all[i][0]=="StoreLogo300x300" {
|
|
all[i][di]="screen/1.ru.300x300.png"
|
|
all[i][ei]="screen/1.ru.300x300.png"
|
|
}
|
|
}
|
|
out,_ := os.Create(path); out.Write([]byte{0xEF,0xBB,0xBF}); w:=csv.NewWriter(out); w.WriteAll(all); w.Flush(); out.Close()
|
|
listing := `D:\vpn navi\dist\microsoft-store\listing\store.csv`
|
|
data,_ := os.ReadFile(path); _ = os.WriteFile(listing, data, 0644)
|
|
}
|