Skip to content

Commit

Permalink
Feature: separate candidate combiner & parent inferrer progress bar s…
Browse files Browse the repository at this point in the history
…ymbols (#780)
  • Loading branch information
emmercm authored Oct 22, 2023
1 parent 4c42ad1 commit af710cc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/console/progressBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ export const ProgressBarSymbol = {
SEARCHING: chalk.magenta(process.platform === 'win32' ? '○' : '↻'),
HASHING: chalk.magenta('#'),
INDEXING: chalk.magenta('#'),
// DATs & candidates
// DATs
GROUPING_SIMILAR: chalk.cyan('∩'),
MERGE_SPLIT: chalk.cyan('↔'),
// Candidates
GENERATING: chalk.cyan('Σ'),
FILTERING: chalk.cyan('∆'),
VALIDATING: chalk.cyan(process.platform === 'win32' ? '?' : '≟'),
COMBINING_ALL: chalk.cyan(process.platform === 'win32' ? 'U' : '∪'),
WRITING: chalk.yellow(process.platform === 'win32' ? '»' : '✎'),
RECYCLING: chalk.blue(process.platform === 'win32' ? '≠' : '♻'),
DELETING: chalk.red(process.platform === 'win32' ? 'X' : '✕'),
Expand Down
2 changes: 1 addition & 1 deletion src/modules/candidateCombiner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class CandidateCombiner extends Module {
return parentsToCandidates;
}

await this.progressBar.setSymbol(ProgressBarSymbol.GENERATING);
await this.progressBar.setSymbol(ProgressBarSymbol.COMBINING_ALL);
await this.progressBar.reset(parentsToCandidates.size);

const game = CandidateCombiner.buildGame(dat, parentsToCandidates);
Expand Down
2 changes: 1 addition & 1 deletion src/modules/datParentInferrer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default class DATParentInferrer extends Module {
return dat;
}

await this.progressBar.setSymbol(ProgressBarSymbol.GENERATING);
await this.progressBar.setSymbol(ProgressBarSymbol.GROUPING_SIMILAR);
await this.progressBar.reset(dat.getGames().length);

// Group games by their stripped names
Expand Down

0 comments on commit af710cc

Please sign in to comment.