Skip to content

Commit

Permalink
Write to file instead of stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
ctroller committed Mar 21, 2018
1 parent 0b37ef4 commit 5110f5d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ file to `output.txt`, and do the same with the `template_participants.txt`
Then simply add users to the `participants.txt` file (one per line), and optionally modify
the `output.txt` file to your likings (use `{DATA}` as placeholder for the data).

**How to run**

The jar file is executable, so simply double-click it. Alternatively, run `java -jar rlfantasy.jar`
in your command line.

The app will output the result to a file named `rlfantasy.txt`.

**Advanced: Building + Dependencies**

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ch/christiantroller/rlfantasy/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private static void prettyPrintStats(List<Stats> stats) throws IOException {
++i;
}

System.out.print(template.replace("{DATA}", output.toString()));
Files.write(Paths.get("rlfantasy.txt"), template.replace("{DATA}", output.toString()).getBytes());
}

private static List<Stats> getAllStats() throws IOException {
Expand Down

0 comments on commit 5110f5d

Please sign in to comment.