| author | |
| committer | |
| log | b8b77c64430dbdd107920dfa6b01d132031648e1 |
| tree | 3ae9f46d2fb91fd03b5f851f0698d3684f2e3b7d |
| parent | af185fe4e1496189fd90f6649f133ae171eadd96 |
2 files changed, 8 insertions(+), 4 deletions(-)
generate.zig+1-4| ... | ... | @@ -3,16 +3,13 @@ const std = @import("std"); |
| 3 | 3 | const common = @import("scripts/_common.zig"); |
| 4 | 4 | |
| 5 | 5 | pub fn main() !void { |
| 6 | // Blocks | |
| 6 | 7 | try common.Main(struct { |
| 7 | 8 | pub const source_url = "https://unicode.org/Public/UCD/latest/ucd/Blocks.txt"; |
| 8 | 9 | |
| 9 | 10 | pub const dest_file = "src/blocks.zig"; |
| 10 | 11 | |
| 11 | 12 | pub const dest_header = |
| 12 | \\// This file is part of the Unicode Character Database | |
| 13 | \\// See http://www.unicode.org/reports/tr44/ for more information. | |
| 14 | \\// | |
| 15 | \\ | |
| 16 | 13 | \\pub const Block = struct { |
| 17 | 14 | \\ from: u21, |
| 18 | 15 | \\ to: u21, |
scripts/_common.zig+7| ... | ... | @@ -22,6 +22,13 @@ pub fn Main(comptime T: type) type { |
| 22 | 22 | defer file.close(); |
| 23 | 23 | const w = file.writer(); |
| 24 | 24 | |
| 25 | try w.writeAll( | |
| 26 | \\// This file is part of the Unicode Character Database | |
| 27 | \\// See http://www.unicode.org/reports/tr44/ for more information. | |
| 28 | \\// | |
| 29 | \\ | |
| 30 | \\ | |
| 31 | ); | |
| 25 | 32 | try w.writeAll(T.dest_header); |
| 26 | 33 | |
| 27 | 34 | const req = try zfetch.Request.init(alloc, T.source_url, null); |