diff --git a/CHANGELOG b/CHANGELOG index 6f5d7cb..e928f47 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +v1.4.7 +- fix issue of unwanted characters in some files + v1.4.6 - CLI enhancement - Unpacking dir choice diff --git a/README.md b/README.md index f4131e0..f4a17b2 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Or you can either use a **precompiled binary** package for your architecture or ### Download precompiled binary Windows | Linux --------|------- -[win-x64](https://github.com/cipheras/gopkgr/releases/download/v1.4.6/gopkgr-win-x64.exe) | [linux-x64](https://github.com/cipheras/gopkgr/releases/download/v1.4.6/gopkgr-linux-x64) +[win-x64](https://github.com/cipheras/gopkgr/releases/download/v1.4.7/gopkgr-win-x64.exe) | [linux-x64](https://github.com/cipheras/gopkgr/releases/download/v1.4.7/gopkgr-linux-x64) For other versions or releases go to [release page](https://github.com/cipheras/gopkgr/releases). diff --git a/gopkgr.go b/gopkgr.go index 472e499..6f0b6a1 100644 --- a/gopkgr.go +++ b/gopkgr.go @@ -56,7 +56,6 @@ func pkr() { fmt.Fprintf(f, "\"%v\",", path) replacer := strings.NewReplacer("[", "{", "]", "}", " ", ",") bytstr = append(bytstr, replacer.Replace(fmt.Sprint(filebyt))) - // count++ } return nil }) @@ -65,16 +64,17 @@ func pkr() { fmt.Fprintf(f, "file := [][]byte{") //open byt Cprint(N, "Starting packing") time.Sleep(1 * time.Second) - replacer := strings.NewReplacer("[", "", "]", "", " ", "") + // replacer := strings.NewReplacer("[", "", "]", "", " ", "") for i, v := range bytstr { - var ss []string - for i, c := range v { - if i%500 == 0 && i > 0 && string(c) != "," && string(c) != "0" && string(c) != "{" && string(c) != "}" { - ss = append(ss, "+ \n") - } - ss = append(ss, string(c)) - } - fmt.Fprintf(f, "%v,", replacer.Replace(fmt.Sprint(ss))) + // var ss []string + // for i, c := range v { + // if i%1000 == 0 && i > 0 && string(c) != "," && string(c) != "0" && string(c) != "{" && string(c) != "}" { + // ss = append(ss, "+ \n") + // } + // ss = append(ss, string(c)) + // } + // fmt.Fprintf(f, "%v,", replacer.Replace(fmt.Sprint(ss))) + fmt.Fprintf(f, "%v,", v) fmt.Printf("\033[100D \033[48;5;22m:Packing [%v/%v]\033[0m [%v%v]", i+1, len(bytstr), strings.Repeat("#", i+1), strings.Repeat(".", len(bytstr)-i-1)) } fmt.Fprintln(f, "}") //close byt @@ -114,7 +114,7 @@ func unpkr(unpdir string) error{ if err != nil { return err } - //defer os.RemoveAll(unpdir) + // defer os.RemoveAll(unpdir) fmt.Printf("\033[1000D \033[48;5;22m:Unpacking [%v/%v]\033[0m [%v%v]", i+1, len(pth), strings.Repeat("#", i+1), strings.Repeat(".", len(pth)-i-1)) } fmt.Printf("\n")