Skip to content

Commit f600d99

Browse files
committed
changing behaviour to avoid uploading assignment, input and output
1 parent 2ce81d1 commit f600d99

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,9 @@ Cargo.lock
4141

4242
main1
4343
main2
44+
45+
*/*/input1
46+
*/*/input2
47+
*/*/assignment
48+
*/*/output1
49+
*/*/output2

scrape.sh download.sh

+6-10
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@ DAY="$2"
77
mkdir -p "$YEAR/$DAY"
88
cd "$YEAR/$DAY" || exit
99

10-
touch output1 output2
11-
1210
if [ ! -f main1.go ]; then cp ../../go.template main1.go; fi
1311
if [ ! -f main2.go ]; then cp ../../go.template main2.go; fi
1412

1513
if [ ! -f Makefile ]; then cat >Makefile <<EOF
14+
download:
15+
http "https://adventofcode.com/$YEAR/day/$DAY/input" "Cookie:session=$AOC_SESSION;" >input
16+
1617
main1:
17-
go build -o main1 main1.go common.go
18+
go build -o main1 main1.go
1819
1920
main2:
20-
go build -o main2 main2.go common.go
21+
go build -o main2 main2.go
2122
2223
.PHONY: run1 run2 clean
2324
@@ -28,15 +29,10 @@ run2: main2
2829
./main2 <input
2930
3031
clean:
31-
rm -f main1 main2
32+
rm -f main1 main2 input
3233
3334
EOF
3435
fi
3536

3637
# download input files
3738
http "https://adventofcode.com/$YEAR/day/$DAY/input" "Cookie:session=$AOC_SESSION;" >input
38-
39-
# download assignment
40-
http "https://adventofcode.com/$YEAR/day/$DAY" "Cookie:session=$AOC_SESSION;" | pup 'article.day-desc' >tmp.html
41-
lynx -dump tmp.html -width 80 >assignment
42-
rm -f tmp.html

0 commit comments

Comments
 (0)