Added Config builder
This commit is contained in:
parent
281f43fe1d
commit
962aa6a86c
8 changed files with 174 additions and 10 deletions
|
@ -15,6 +15,14 @@ public class ReadingTimeSample {
|
|||
rt.setPostfix("minute to read");
|
||||
rt.setPlural("minutes to read");
|
||||
|
||||
// final Config config =
|
||||
// new Config.Builder()
|
||||
// .text(Files.readString(text))
|
||||
// .postfix("minute to read")
|
||||
// .plural("minutes to read")
|
||||
// .build();
|
||||
// final ReadingTime rt = new ReadingTime(config);
|
||||
|
||||
System.out.println("It will take " + rt.calcReadingTime() + ' ' + ReadingTime.wordCount(rt.getText())
|
||||
+ " words and " + ReadingTime.imgCount(rt.getText()) + " images at " + rt.getWpm()
|
||||
+ " words per minute.");
|
||||
|
|
|
@ -12,7 +12,7 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation("net.thauvin.erik:readingtime:0.9.2")
|
||||
implementation("net.thauvin.erik:readingtime:0.9.3-SNAPSHOT")
|
||||
}
|
||||
|
||||
java {
|
||||
|
|
|
@ -15,6 +15,14 @@ public class ReadingTimeSample {
|
|||
rt.setPostfix("minute to read");
|
||||
rt.setPlural("minutes to read");
|
||||
|
||||
// final Config config =
|
||||
// new Config.Builder()
|
||||
// .text(Files.readString(text))
|
||||
// .postfix("minute to read")
|
||||
// .plural("minutes to read")
|
||||
// .build();
|
||||
// final ReadingTime rt = new ReadingTime(config);
|
||||
|
||||
System.out.println("It will take " + rt.calcReadingTime() + ' ' + ReadingTime.wordCount(rt.getText())
|
||||
+ " words and " + ReadingTime.imgCount(rt.getText()) + " images at " + rt.getWpm()
|
||||
+ " words per minute.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue