From b170ca24122c7878d3a1c58863b1dc3abea054ed Mon Sep 17 00:00:00 2001 From: vx-clutch Date: Sun, 30 Nov 2025 09:41:29 -0500 Subject: [PATCH] Inital commit --- README.md | 6 +++++ day | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 README.md create mode 100755 day diff --git a/README.md b/README.md new file mode 100644 index 0000000..7d54e1f --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# Advent of Code + +## 2025 + +I did a little bit of 2024 but did not complete it nor save it. This is my first year +with the goal of doing all of the challenges and recording it in a repository. diff --git a/day b/day new file mode 100755 index 0000000..7a99202 --- /dev/null +++ b/day @@ -0,0 +1,70 @@ +#!/bin/sh +# SPDX-License-Identifier: BSD-3-Clause +me=$0 +scriptversion="1.0.0" + +version="$me $scriptversion + +Copyright (C) 2025 vx-clutch. +This is free software; you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law." + +usage="\ +Usage: $me [OPTION]... +Start a new day + +Options: + --help print this help and exit + --version output version information +" + +while test $# -gt 0; do + case $1 in + --help) echo "$usage"; exit 0;; + --version) echo "$version"; exit 0;; + -*) + echo "$0: Unknown option '$1'." >&2 + echo "$0: Try '--help' for more information." >&2 + exit 1;; + esac + shift +done + +mkdir -p $(date "+%Y/%d") +cd $(date "+%Y/%d") + +cat <solution.py +#!/usr/bin/env python3 +import sys +import pathlib + +def read_input(): + path = pathlib.Path(sys.argv[1]) if len(sys.argv) > 1 else pathlib.Path("input.txt") + return path.read_text().rstrip("\n") + +def parse(data): + return data.splitlines() + +def part1(data): + return None + +def part2(data): + return None + +def main(): + raw = read_input() + data = parse(raw) + r1 = part1(data) + r2 = part2(data) + print(r1) + print(r2) + +if __name__ == "__main__": + main() +EOF + +touch input.txt + +chmod u+x solution.py + +echo "> "$(date "+https://adventofcode.com/%Y/day/%d")