| author | |
| committer | |
| log | 5062f741b00f3e7ff5a505c83d2332e99f462ea5 |
| tree | 476feb7e0d55d207cd1e8b9e90627158c64881ff |
| parent | 49454115db3958db0157a13a059a3d7a76e19636 |
7 files changed, 10 insertions(+), 9 deletions(-)
scripts/BidiMirroring.zig+1-1| ... | @@ -2,7 +2,7 @@ const std = @import("std"); | ... | @@ -2,7 +2,7 @@ const std = @import("std"); |
| 2 | const common = @import("./_common.zig"); | 2 | const common = @import("./_common.zig"); |
| 3 | 3 | ||
| 4 | pub usingnamespace common.Main(struct { | 4 | pub usingnamespace common.Main(struct { |
| 5 | pub const source_url = "https://unicode.org/Public/" ++ common.version ++ "/ucd/BidiMirroring.txt"; | 5 | pub const source_file = "BidiMirroring"; |
| 6 | 6 | ||
| 7 | pub const dest_file = "src/bidi_mirroring.zig"; | 7 | pub const dest_file = "src/bidi_mirroring.zig"; |
| 8 | 8 |
scripts/CJKRadicals.zig+1-1| ... | @@ -2,7 +2,7 @@ const std = @import("std"); | ... | @@ -2,7 +2,7 @@ const std = @import("std"); |
| 2 | const common = @import("./_common.zig"); | 2 | const common = @import("./_common.zig"); |
| 3 | 3 | ||
| 4 | pub usingnamespace common.Main(struct { | 4 | pub usingnamespace common.Main(struct { |
| 5 | pub const source_url = "https://unicode.org/Public/" ++ common.version ++ "/ucd/CJKRadicals.txt"; | 5 | pub const source_file = "CJKRadicals"; |
| 6 | 6 | ||
| 7 | pub const dest_file = "src/cjk_radicals.zig"; | 7 | pub const dest_file = "src/cjk_radicals.zig"; |
| 8 | 8 |
scripts/CaseFolding.zig+1-1| ... | @@ -2,7 +2,7 @@ const std = @import("std"); | ... | @@ -2,7 +2,7 @@ const std = @import("std"); |
| 2 | const common = @import("./_common.zig"); | 2 | const common = @import("./_common.zig"); |
| 3 | 3 | ||
| 4 | pub usingnamespace common.Main(struct { | 4 | pub usingnamespace common.Main(struct { |
| 5 | pub const source_url = "https://unicode.org/Public/" ++ common.version ++ "/ucd/CaseFolding.txt"; | 5 | pub const source_file = "CaseFolding"; |
| 6 | 6 | ||
| 7 | pub const dest_file = "src/case_folding.zig"; | 7 | pub const dest_file = "src/case_folding.zig"; |
| 8 | 8 |
scripts/_common.zig+4-3| ... | @@ -6,7 +6,7 @@ const ansi = @import("ansi"); | ... | @@ -6,7 +6,7 @@ const ansi = @import("ansi"); |
| 6 | pub const version = "13.0.0"; | 6 | pub const version = "13.0.0"; |
| 7 | 7 | ||
| 8 | pub fn Main(comptime T: type) type { | 8 | pub fn Main(comptime T: type) type { |
| 9 | comptime std.debug.assert(@hasDecl(T, "source_url")); | 9 | comptime std.debug.assert(@hasDecl(T, "source_file")); |
| 10 | comptime std.debug.assert(@hasDecl(T, "dest_file")); | 10 | comptime std.debug.assert(@hasDecl(T, "dest_file")); |
| 11 | comptime std.debug.assert(@hasDecl(T, "dest_header")); | 11 | comptime std.debug.assert(@hasDecl(T, "dest_header")); |
| 12 | comptime std.debug.assert(@hasDecl(T, "dest_footer")); | 12 | comptime std.debug.assert(@hasDecl(T, "dest_footer")); |
| ... | @@ -18,6 +18,7 @@ pub fn Main(comptime T: type) type { | ... | @@ -18,6 +18,7 @@ pub fn Main(comptime T: type) type { |
| 18 | defer _ = gpa.deinit(); | 18 | defer _ = gpa.deinit(); |
| 19 | 19 | ||
| 20 | const max_size = std.math.maxInt(usize); | 20 | const max_size = std.math.maxInt(usize); |
| 21 | const source_url = "https://unicode.org/Public/" ++ version ++ "/ucd/" ++ T.source_file ++ ".txt"; | ||
| 21 | 22 | ||
| 22 | // | 23 | // |
| 23 | std.log.info("{s}", .{T.dest_file}); | 24 | std.log.info("{s}", .{T.dest_file}); |
| ... | @@ -39,10 +40,10 @@ pub fn Main(comptime T: type) type { | ... | @@ -39,10 +40,10 @@ pub fn Main(comptime T: type) type { |
| 39 | \\// zig fmt: off | 40 | \\// zig fmt: off |
| 40 | \\ | 41 | \\ |
| 41 | \\ | 42 | \\ |
| 42 | , .{T.source_url}); | 43 | , .{source_url}); |
| 43 | try w.writeAll(T.dest_header); | 44 | try w.writeAll(T.dest_header); |
| 44 | 45 | ||
| 45 | const req = try zfetch.Request.init(alloc, T.source_url, null); | 46 | const req = try zfetch.Request.init(alloc, source_url, null); |
| 46 | defer req.deinit(); | 47 | defer req.deinit(); |
| 47 | try req.do(.GET, null, null); | 48 | try req.do(.GET, null, null); |
| 48 | const r = req.reader(); | 49 | const r = req.reader(); |
scripts/arabic_shaping.zig+1-1| ... | @@ -2,7 +2,7 @@ const std = @import("std"); | ... | @@ -2,7 +2,7 @@ const std = @import("std"); |
| 2 | const common = @import("./_common.zig"); | 2 | const common = @import("./_common.zig"); |
| 3 | 3 | ||
| 4 | pub usingnamespace common.Main(struct { | 4 | pub usingnamespace common.Main(struct { |
| 5 | pub const source_url = "https://unicode.org/Public/" ++ common.version ++ "/ucd/ArabicShaping.txt"; | 5 | pub const source_file = "ArabicShaping"; |
| 6 | 6 | ||
| 7 | pub const dest_file = "src/arabic_shaping.zig"; | 7 | pub const dest_file = "src/arabic_shaping.zig"; |
| 8 | 8 |
scripts/bidi_brackets.zig+1-1| ... | @@ -2,7 +2,7 @@ const std = @import("std"); | ... | @@ -2,7 +2,7 @@ const std = @import("std"); |
| 2 | const common = @import("./_common.zig"); | 2 | const common = @import("./_common.zig"); |
| 3 | 3 | ||
| 4 | pub usingnamespace common.Main(struct { | 4 | pub usingnamespace common.Main(struct { |
| 5 | pub const source_url = "https://unicode.org/Public/" ++ common.version ++ "/ucd/BidiBrackets.txt"; | 5 | pub const source_file = "BidiBrackets"; |
| 6 | 6 | ||
| 7 | pub const dest_file = "src/bidi_brackets.zig"; | 7 | pub const dest_file = "src/bidi_brackets.zig"; |
| 8 | 8 |
scripts/blocks.zig+1-1| ... | @@ -2,7 +2,7 @@ const std = @import("std"); | ... | @@ -2,7 +2,7 @@ const std = @import("std"); |
| 2 | const common = @import("./_common.zig"); | 2 | const common = @import("./_common.zig"); |
| 3 | 3 | ||
| 4 | pub usingnamespace common.Main(struct { | 4 | pub usingnamespace common.Main(struct { |
| 5 | pub const source_url = "https://unicode.org/Public/" ++ common.version ++ "/ucd/Blocks.txt"; | 5 | pub const source_file = "Blocks"; |
| 6 | 6 | ||
| 7 | pub const dest_file = "src/blocks.zig"; | 7 | pub const dest_file = "src/blocks.zig"; |
| 8 | 8 |