Added files

This commit is contained in:
Medvidek77 2025-03-31 22:55:41 +02:00
parent 00518f628b
commit c20536084b
6 changed files with 196 additions and 2 deletions

24
src/main.zig Normal file
View file

@ -0,0 +1,24 @@
const std = @import("std");
const url = @import("url.zig");
const json = @import("json.zig");
const dbg_print = std.debug.print;
pub fn main() !void {
// gpa allocator
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit();
const allocator = gpa.allocator();
var args = try std.process.argsWithAllocator(allocator);
defer args.deinit();
while (args.next()) |arg| {
dbg_print("{s}", .{arg});
}
const data = try url.fetch(allocator, "https://tidal.401658.xyz/track/?id=286266927&quality=LOSSLESS");
defer allocator.free(data);
try json.extract(allocator, data);
}