# README
AOC - Advent Of Code
This tool will automatically download the input file for AOC's challenge and provide boilerplate code to open the input file so you can immediately start coding.
AOC Session Cookie is REQUIRED
Add this session to an environment variable named AOC_SESSION. (If you cannot set an environment variable, or don't want to, you can run the script with the flag --session instead.
Usage
This will download today's challenge with go boilerplate
./aoc get
This will download the challenge for the 15th
./aoc get 15
This will download today's challenge with python boilerplate
./aoc get --lang python
All Custom Options:
./aoc get [dayNum] [--lang (go|python)] [--year (2015|2016|2017)] [--session session-here]
Development
Glide is needed for dep management
glide update
To produce the binaries needed run
make binaries
To add a new boilerplate language
- Add boilerplate.(language) to the languages folder
- Update Makefile with
echo "const (language) = \"$$(cat languages/boilerplate.(language) | base64)\"" >> langs.go
- Update main.go with a new case
case "(language)": f, err := os.Create(directory + "main.(language)") check(err) decoded, err := base64.StdEncoding.DecodeString((language)) check(err) f.WriteString(string(decoded)) f.Close()
- Build and test
- Make a Pull Request with the changes