Skip to content

Commit

Permalink
do not download inputs again when refreshing indices
Browse files Browse the repository at this point in the history
  • Loading branch information
shahata committed Dec 25, 2024
1 parent 95662fc commit e6e7528
Show file tree
Hide file tree
Showing 12 changed files with 345 additions and 345 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ $ npm install
$ export ADVENT_SESSION=your-cookie-value

$ npm start [year]
- or -
$ npm start [year] [day-number]
```

The commands above will work for all years since 2015.
46 changes: 23 additions & 23 deletions src/2015/index.html

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions src/2016/index.html

Large diffs are not rendered by default.

122 changes: 61 additions & 61 deletions src/2017/index.html

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions src/2018/index.html

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions src/2019/index.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/2020/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ <h1 class="title-event">&nbsp;&nbsp;&nbsp;<span class="title-event-wrap">$year=<
</header>
<main>
<style>
.calendar .calendar-color-r { color:#ff0000; }
.calendar .calendar-color-w { color:#ffffff; }
.calendar .calendar-color-l { color:#ccccff; }
.calendar .calendar-color-p { color:#9900ff; }
.calendar .calendar-color-r { color:#ff0000; }
.calendar .calendar-color-a { color:#cccccc; }
.calendar .calendar-color-o { color:#ffcc99; }
.calendar .calendar-color-w { color:#ffffff; }
.calendar .calendar-color-g { color:#00cc00; }
.calendar .calendar-color-o { color:#ffcc99; }
.calendar .calendar-color-b { color:#333399; }
.calendar .calendar-color-l { color:#ccccff; }
@keyframes anim-seamonster {
0% { transform: translate(-.9em,0); }
50% { transform: translate( .9em,0); }
Expand Down
94 changes: 47 additions & 47 deletions src/2021/index.html

Large diffs are not rendered by default.

68 changes: 34 additions & 34 deletions src/2022/index.html

Large diffs are not rendered by default.

96 changes: 48 additions & 48 deletions src/2023/index.html

Large diffs are not rendered by default.

144 changes: 72 additions & 72 deletions src/2024/index.html

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions src/utils/solver.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,18 @@ export async function solveAll(year, day, run = true) {
await createSolver(year, day);
}
} else {
console.log(`Downloading questions (${year})...`);
console.log(`Downloading files (${year})...`);
let days = getDays(year);
var bar = new ProgressBar("[:bar] :percent", {
total: days.length + downloadIndexTicks,
total: (run ? days.length : 0) + downloadIndexTicks,
width: 40,
});
await downloadIndex(year, bar, days.length * 2);
for (let day of days) {
await downloadInput(year, day);
bar.tick();
if (run) {
for (let day of days) {
await downloadInput(year, day);
bar.tick();
}
}
await takeScreenshots(year);

Expand Down

0 comments on commit e6e7528

Please sign in to comment.