Skip to content
This repository has been archived by the owner on Jul 16, 2022. It is now read-only.

Commit

Permalink
Release v0.3.0
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Miura <[email protected]>
  • Loading branch information
miurahr committed Feb 8, 2022
1 parent 1defd28 commit e641664
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## [v0.3.0]
* Introduce `StarDictDictionary#loadDictionary` builder utility method.
* Hide `StarDictLoader#load` method.
* Don't search lowercase automatically.
* Add cache mechanism for articles.

## [v0.2.0]
* Change class names

Expand All @@ -12,6 +18,7 @@ All notable changes to this project will be documented in this file.
## v0.1.0
* First internal release

[Unreleased]: https://github.com/eb4j/stardict4j/compare/v0.2.0...HEAD
[Unreleased]: https://github.com/eb4j/stardict4j/compare/v0.3.0...HEAD
[v0.3.0]: https://github.com/eb4j/stardict4j/compare/v0.2.0...v0.3.0
[v0.2.0]: https://github.com/eb4j/stardict4j/compare/v0.1.1...v0.2.0
[v0.1.1]: https://github.com/eb4j/stardict4j/compare/v0.1.0...v0.1.1
30 changes: 14 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ A status of library development is considered as `Alpha`.
<dependency>
<groupId>io.github.eb4j</groupId>
<artifactId>stardict4j</artifactId>
<version>0.1.0</version>
<version>0.3.0</version>
</dependency>
```

</details>

### Gradle Groovy DSL

<details>validateAbsolutePath?
<details>

```groovy
implementation 'io.github.eb4j:stardict4j:0.1.0'
implementation 'io.github.eb4j:stardict4j:0.3.0'
```
</details>

Expand All @@ -42,7 +42,7 @@ implementation 'io.github.eb4j:stardict4j:0.1.0'
<details>

```kotlin
implementation("io.github.eb4j:stardict4j:0.1.0")
implementation("io.github.eb4j:stardict4j:0.3.0")
```

</details>
Expand All @@ -52,7 +52,7 @@ implementation("io.github.eb4j:stardict4j:0.1.0")
<details>

```
libraryDependencies += "io.github.eb4j" % "stardict4j" % "0.1.0"
libraryDependencies += "io.github.eb4j" % "stardict4j" % "0.3.0"
```

</details>
Expand All @@ -76,21 +76,19 @@ Each `DictionaryEntry` entry has `type` of entry such as `MEAN`, `HTML` or other
Here is a simple example how to use it.

```java
import io.github.eb4j.stardict.*;
import io.github.eb4j.stardict.StarDictDictionary;

public class Main {
public static void main(){
String word="testudo";
public static void main() {
String word = "testudo";
StarDictDictionary dict = StarDictDictionary.loadDictionary(
new File("dictionayr.ifo"), 500, Duration.ofMinutes(10));
for (StarDictDictionary.Entry en: dict.readArticles(word)){
for (StarDictDictionary.Entry en : dict.readArticles(word)) {
switch (en.getType()) {
case MEAN:
System.out.println(String.format("%s has meanings of %s\n", en.getWord(), en.getArticle()));
break;
case PHONETIC:
System.out.println(String.format("%s pronounce is %s\n", en.getWord(), en.getArticle()));
break;
default:
case MEAN -> System.out.println(String.format("%s has meanings of %s\n", en.getWord(), en.getArticle()));
case PHONETIC -> System.out.println(String.format("%s pronounce is %s\n", en.getWord(), en.getArticle()));
default -> {
}
}
}
}
Expand Down

0 comments on commit e641664

Please sign in to comment.