Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rivea0 committed Sep 26, 2023
1 parent 7bb7234 commit 77a3d69
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 12 deletions.
55 changes: 43 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ With it, you can:

The project has a `words.csv` file that contains 181 words and definitions, adapted from [sat-words by Scholars' Academy](https://github.com/scholarsnyc/sat-words). All the words you add are appended to this main file.
With the field names `word` and `definition`, the structure of the file simply looks like this:

```
word,definition
arrogate,to take without justification
Expand All @@ -24,17 +25,54 @@ Vocab-build uses the [Rich library](https://github.com/Textualize/rich) to style

[Free Dictionary API](https://github.com/meetDeveloper/freeDictionaryAPI) is used for finding the definitions of words, as well as for finding the audio URL of a pronunciation.

### Clone the repository:

```
git clone [email protected]:rivea0/vocab-build.git
```

### `cd` into it:

```
cd vocab-build
```

### Create a virtual environment:

```
python -m venv vb-env
```

or:

```
python3 -m venv vb-env
```


### Activate it:

##### Unix/MacOS:

```
source vb-env/bin/activate
```

##### Windows:

```
vb-env\Scripts\activate.bat
```

### Install requirements:
```
python -m pip install -r requirements.txt
```


### The opening screen
If the program is run without any optional arguments (i.e., `python project.py`), the opening screen that is shown in the image below is displayed:
If the program is run without any optional arguments (i.e., `python project.py`), the opening screen like the one shown in the image below is displayed:

![The opening screen](./readme-images/opening_screen.jpg)
![The opening screen](./readme-images/opening-screen.png)

A "welcome" figlet (created with [pyfiglet](https://pypi.org/project/pyfiglet/)) is shown, followed by a table, informing the user of optional arguments to use to help them choose an action.

Expand Down Expand Up @@ -80,17 +118,10 @@ With the option `--play` or, `-p`, the user can play a "quiz game" where they ar

A random word from the `words.csv` file and four definitions (one of them being the correct one, and the rest being randomly chosen) are displayed.

![A word and four definitions displayed](./readme-images/play_n.jpg)


The user enters the number of the definition they choose, and if it is correct, a success message is displayed before continuing to the next question.

![Correct answer](./readme-images/play_c.jpg)

If the user gives the wrong answer, an informing message as well as the correct answer is displayed before continuing to the next question.

![Wrong answer](./readme-images/play_w.jpg)

The game continues until the user chooses to exit the game.

### The file structure
Expand All @@ -103,8 +134,8 @@ The project consists of four Python files, one of them being the test file, as w

### Requirements
The project requires the following packages:
- pyfiglet==0.8.post1
- requests==2.28.1
- pyfiglet==1.0.2
- requests==2.31.0
- rich==12.5.1

For testing:
Expand Down
Binary file added readme-images/opening-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 77a3d69

Please sign in to comment.