Skip to content

Commit 5fb8ba6

Browse files
more details in the documentation about the download automation
Took 11 minutes
1 parent 9381e74 commit 5fb8ba6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,8 @@ When the `DaySetup::main` runs it:
2323
2. prepares the initial Java code for the main algorithm
2424
3. prepares the tests to run the algorithm with the proper input
2525

26+
This repo does follow the automation guidelines on the `/r/adventofcode` [community wiki](https://www.reddit.com/r/adventofcode/wiki/faqs/automation). Specifically:
2627

28+
- Inputs files are downloaded once and locally cached
29+
- It is always possible delete the local copy and ensure to download a new uncorrupted copy
30+
- The `User-Agent` header contains the info about this repository

src/main/java/aminetti/adventofcode2024/DaySetup.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static void main(String... args) throws IOException, InterruptedException
3333
int year = LocalDate.now().getYear();
3434
int day = getCurrentDay();
3535

36-
cleanCodeAndTestAndInputForDay(year, day);
36+
// cleanCodeAndTestAndInputForDay(year, day);
3737

3838
downloadDayInput(year, day);
3939
prepareCodeForDay(year, day);
@@ -72,7 +72,7 @@ static String getInput(int year, int day) throws IOException, InterruptedExcepti
7272

7373
HttpRequest req = HttpRequest.newBuilder()
7474
.uri(uri)
75-
.header("User-Agent", "github.com/albertominetti/")
75+
.header("User-Agent", "github.com/albertominetti/adventofcode2024")
7676
.GET().build();
7777

7878
try (HttpClient client = HttpClient.newBuilder()

0 commit comments

Comments
 (0)