From 05d995d3c25b012f652654d02715256a3a97c0fd Mon Sep 17 00:00:00 2001 From: cos Date: Tue, 7 Dec 2021 13:44:07 +0100 Subject: Add example.txt creation for simple inputs --- bin/fetch_input.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/fetch_input.sh b/bin/fetch_input.sh index d3a96ec..ec09328 100755 --- a/bin/fetch_input.sh +++ b/bin/fetch_input.sh @@ -66,6 +66,7 @@ if [ "${MODE}" = 'wget' ]; then authenticated_wget --output-document "input/${USERNAME}" \ "https://adventofcode.com/${YEAR}/day/${DEC}/input" elinks -dump "./input/page_${DEC}.html" >"input/page_${DEC}.txt" + sed -n 's/^ \([^ ]\)/\1/p' <"input/page_${DEC}.txt" >"input/example.txt" fi elif [ "${MODE}" = 'aocdl' ]; then # One could possibly use the golang implemenation instead of wget: -- cgit v1.2.3