clean up and add README

This commit is contained in:
Jeeves 2025-02-14 17:05:43 -07:00
parent 3cb1325176
commit a7ca2f9377
2 changed files with 7 additions and 30 deletions

6
README.md Normal file
View file

@ -0,0 +1,6 @@
# Streamboy!
Jeeves' personal streaming toolkit.
{insert stereotypical message of This Is A Mess Not Designed For Others}
so Good Luck Have Fun :)

View file

@ -31,9 +31,6 @@ pub fn main() !void {
// }, allocator); // }, allocator);
// try vlc.spawn(); // try vlc.spawn();
// const buf = try allocator.alloc(u8, 1024 * 32);
// defer allocator.free(buf);
var tz_file = try std.fs.openFileAbsolute("/etc/localtime", .{}); var tz_file = try std.fs.openFileAbsolute("/etc/localtime", .{});
defer tz_file.close(); defer tz_file.close();
var tz = try std.tz.Tz.parse(allocator, tz_file.reader()); var tz = try std.tz.Tz.parse(allocator, tz_file.reader());
@ -44,14 +41,13 @@ pub fn main() !void {
try updateStatus(allocator); try updateStatus(allocator);
scroll += 1; scroll += 1;
} }
// Red Soul (Super Metroid) - Nostalvania, The OC Jazz Collective
// try vlc.kill(); // try vlc.kill();
} }
const base64_encoder = std.base64.standard.Encoder; const base64_encoder = std.base64.standard.Encoder;
const topic = "Something Fun For Everyone With Streamboy!!!!!!!!"; const topic = "Something Fun For Everyone With Streamboy!!!!!!!! git.jeevio.xyz/jeeves/streamboy";
var scroll: usize = 0; var scroll: usize = 0;
@ -137,28 +133,6 @@ fn getSongInfo(allocator: std.mem.Allocator) !SongInfo {
} }
} }
// var new_title: ?[]const u8 = null;
// if (title) |t| {
// std.debug.print("{s}\n", .{t});
// // if (std.mem.indexOf(u8, t, "&#")) |amp| {
// // if (std.mem.indexOfScalarPos(u8, t, amp, ';')) |semi| {
// // const int = try std.fmt.parseInt(u8, t[amp + 2 .. semi], 10);
// // const new = try allocator.alloc(u8, std.mem.replacementSize(u8, t, t[amp .. semi + 1], &[1]u8{int}));
// // errdefer allocator.free(new);
// // _ = std.mem.replace(u8, t, t[amp .. semi + 1], &[1]u8{int}, new);
// // new_title = new;
// // }
// // }
// }
// if (title) |t| title = try allocator.dupe(u8, t);
// errdefer if (title) |t| allocator.free(t);
// if (album) |a| album = try allocator.dupe(u8, a);
// errdefer if (album) |a| allocator.free(a);
// if (artist) |a| artist = try allocator.dupe(u8, a);
// errdefer if (artist) |a| allocator.free(a);
return .{ return .{
.title = title, .title = title,
.album = album, .album = album,
@ -219,9 +193,6 @@ fn updateTime(tz: std.Tz) !void {
}); });
} }
// example format
// Friday 14 February 2025 10:32:48 AM
fn getMonthName(month: std.time.epoch.Month) []const u8 { fn getMonthName(month: std.time.epoch.Month) []const u8 {
return switch (month) { return switch (month) {
.jan => "January", .jan => "January",