Download extract.csx from Cnass/gamemaker: direct link, hf CLI and curl.
- Browser
- Download file 653 Bytes
-
https://huggingface.co/spaces/Cnass/gamemaker/resolve/main/extract.csx
- Command line
-
hf download hf://spaces/Cnass/gamemaker/extract.csx
-
curl -L -o extract.csx https://huggingface.co/spaces/Cnass/gamemaker/resolve/main/extract.csx
653 Bytes
| using System.IO; | |
| using System.Text.Json; | |
| using System.Collections.Generic; | |
| var dict = new Dictionary<string, string>(); | |
| foreach (var str in Data.Strings) { | |
| if (!string.IsNullOrWhiteSpace(str.Content)) { | |
| if(!dict.ContainsKey(str.Content)) { | |
| dict.Add(str.Content, str.Content); | |
| } | |
| } | |
| } | |
| // Türkçe karakterlerin bozulmaması için özel kodlayıcı kullanıyoruz | |
| var options = new JsonSerializerOptions { | |
| WriteIndented = true, | |
| Encoder = System.Text.Encodings.Web.JavaScriptEncoder.UnsafeRelaxedJsonEscaping | |
| }; | |
| string json = JsonSerializer.Serialize(dict, options); | |
| File.WriteAllText("strings.json", json); | |