diff --git a/makeday.sh b/makeday.sh new file mode 100755 index 0000000..88f8801 --- /dev/null +++ b/makeday.sh @@ -0,0 +1,55 @@ +#! /bin/bash +# vim: ts=2:sw=2:sts=2:tw=95:ai:fo+=ro + +## Author: Sebastian Mark +## CC-BY-SA (https://creativecommons.org/licenses/by-sa/4.0/deed.de) + +if [[ $# -eq 0 ]]; then + YEAR=$(date +%Y) + DAY=$(date +%d) + T=${YEAR}/${DAY} +else + T=$1 +fi + +mkdir -p $T +touch ${T}/input + +cat <${T}/main.go +package main + +import ( + "fmt" + + "aoc/helper" +) + +func main() { +} +EOT + +cat <${T}/main.py +#!/usr/bin/env python +# -*- encoding: utf-8; py-indent-offset: 4 -*- + +# Author: Sebastian Mark +# CC-BY-SA (https://creativecommons.org/licenses/by-sa/4.0/deed.de) + +# pylint: disable=missing-module-docstring,missing-function-docstring,consider-using-f-string + + +def readinput(): + with open("input", "r", encoding="utf-8") as file: + lines = file.readlines() + return lines + + +def main(): + pass + + +if __name__ == "__main__": + main() +EOT + +echo "initialized $T"