56 lines
864 B
Bash
56 lines
864 B
Bash
|
#! /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 <<EOT >${T}/main.go
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
"aoc/helper"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
}
|
||
|
EOT
|
||
|
|
||
|
cat <<EOT >${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"
|