wordstudent

Word learning program
git clone git://git.wimdupont.com/wordstudent.git
Log | Files | Refs | LICENSE

commit dbf04c687f689b048059e98fccaa4ef024b8e2a5
parent 3a363fcffb58b41ca7a5f43a04c190807835155d
Author: Wim Dupont <wim@wimdupont.com>
Date:   Sat, 26 Aug 2023 15:36:40 +0200

rename

Diffstat:
MREADME.adoc | 16+++++++++++++++-
Mpom.xml | 4++--
Dsrc/main/java/com/wimdupont/WordStudentAdvancedApplication.java | 21---------------------
Asrc/main/java/com/wimdupont/WordStudentApplication.java | 21+++++++++++++++++++++
4 files changed, 38 insertions(+), 24 deletions(-)

diff --git a/README.adoc b/README.adoc @@ -1,6 +1,15 @@ = WordStudentAdvanced -Utilizes public https://couchdb.apache.org/[CouchDB] database. +Looks up words (saved in csv-file) in dictionary API and persists the data in https://couchdb.apache.org/[CouchDB] database. +Words are not looked up with api on subsequent runs unless it is removed from the database. + +Words are randomly shuffled each run. + +Navigation: + +* Use the "Show" button ("j", "down", "space") to show meaning of given word. +* Use the "Next" button ("l", "right") to go to next word. +* Use the "Previous" button ("h", "left") to return to previous word. == Setup @@ -9,3 +18,8 @@ Utilizes public https://couchdb.apache.org/[CouchDB] database. .. 'csv.dir': path of the csv file .. 'couchdb.connection-url': couchDb url (example: http://localhost:5984/wordtester) .. 'dictionary.client.connection-url': api url (https://api.dictionaryapi.dev/api/v2/entries/en/) + +== Run + +. $ mvn package +. $ java -jar target/WordStudent-1.0-SNAPSHOT.jar diff --git a/pom.xml b/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.wimdupont</groupId> - <artifactId>WordStudentAdvanced</artifactId> + <artifactId>WordStudent</artifactId> <version>1.0-SNAPSHOT</version> <properties> @@ -49,7 +49,7 @@ <addClasspath>true</addClasspath> <classpathPrefix>lib/</classpathPrefix> <mainClass> - com.wimdupont.WordStudentAdvancedApplication + com.wimdupont.WordStudentApplication </mainClass> </manifest> </archive> diff --git a/src/main/java/com/wimdupont/WordStudentAdvancedApplication.java b/src/main/java/com/wimdupont/WordStudentAdvancedApplication.java @@ -1,21 +0,0 @@ -package com.wimdupont; - -import com.wimdupont.client.DictionaryApi; -import com.wimdupont.client.WordRepository; -import com.wimdupont.service.WordFetcher; -import com.wimdupont.service.WordTester; - -import java.util.List; - -public class WordStudentAdvancedApplication { - - public static void main(String[] args) { - List<String> words = new WordFetcher().fetch(); - System.out.printf("Words in csv file: %s%n", words.size()); - - var wordTester = new WordTester(new WordRepository(), new DictionaryApi()); - wordTester.saveNew(words); - wordTester.startTest(words); - } - -} diff --git a/src/main/java/com/wimdupont/WordStudentApplication.java b/src/main/java/com/wimdupont/WordStudentApplication.java @@ -0,0 +1,21 @@ +package com.wimdupont; + +import com.wimdupont.client.DictionaryApi; +import com.wimdupont.client.WordRepository; +import com.wimdupont.service.WordFetcher; +import com.wimdupont.service.WordTester; + +import java.util.List; + +public class WordStudentApplication { + + public static void main(String[] args) { + List<String> words = new WordFetcher().fetch(); + System.out.printf("Words in csv file: %s%n", words.size()); + + var wordTester = new WordTester(new WordRepository(), new DictionaryApi()); + wordTester.saveNew(words); + wordTester.startTest(words); + } + +}