You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLI-Exercises/README.md
+26-10
Original file line number
Diff line number
Diff line change
@@ -7,20 +7,29 @@ This TUI application includes 40 questions to test your CLI text processing skil
7
7
8
8
# Installation
9
9
10
-
You'll need to install `textual` first. See [Textual documentation](https://textual.textualize.io/getting_started/) for more details about installation. After that, you can clone this repository and run the `cli_exercises.py` script. Adjust terminal dimensions as needed. Example instructions shown below, adjust them based on your preferences and OS.
10
+
This app is available on PyPI as [cliexercises](https://pypi.org/project/cliexercises/). Example installation instructions are shown below, adjust them based on your preferences and OS.
After pressing **Ctrl+n** twice, you should get a screen similar to the one shown below:
23
+
To run the app without having to enter the virtual environment again, add this alias to `.bashrc` (or equivalent):
24
+
25
+
```bash
26
+
# you'll have to change the path
27
+
alias cliexercises='/path/to/textual_apps/bin/cliexercises'
28
+
```
29
+
30
+
As an alternative, you can install `textual` (see [Textual documentation](https://textual.textualize.io/getting_started/) for more details), clone this repository and run the `cli_exercises.py` file.
31
+
32
+
Adjust the terminal dimensions for the widgets to appear properly, for example 84x25 (characters x lines). Here's a some sample screenshot:
24
33
25
34
<palign="center"><imgsrc="./cli_exercises.png"alt="Sample screenshot for CLI exercises" /></p>
26
35
@@ -55,13 +64,20 @@ After pressing **Ctrl+n** twice, you should get a screen similar to the one show
55
64
***Delete** or **Ctrl+d** delete character under the cursor
56
65
***Enter** submit the code for execution
57
66
58
-
> **Note**
59
-
> Commands you have typed are automatically saved in `user_progress.json` (only when you press **Enter** to execute a command — navigating to another question and closing the app won't trigger the save logic). Theme choice is also saved. If you close the application and open it again, the first unsolved question will be displayed (i.e. already solved questions are skipped). If you use **Ctrl+s**, the solution *won't* be saved in `user_progress.json` — you'll have to navigate to another question and back (or close and open the app) to be considered for saving the changes. Once you have solved a question, only a different correct solution can override the previously saved command.
60
-
61
67
> **Warning**
62
68
> There is no safeguard against the command you are executing. They are treated as if you typed them from a shell session. For example, `ls` will list the contents of the current directory.
63
69
64
-
## Video demo
70
+
# User progress
71
+
72
+
Commands you have typed are automatically saved in `user_progress.json` in the same directory as the script. This happens only when you press **Enter** to execute a command — navigating to another question and closing the app won't trigger the save logic. Theme choice is also saved.
73
+
74
+
If you close the application and open it again, the first unsolved question will be displayed (i.e. already solved questions are skipped).
75
+
76
+
If you use **Ctrl+s**, the solution *won't* be saved in `user_progress.json` — you'll have to navigate to another question and back (or close and open the app) to be considered for saving the changes.
77
+
78
+
Once you have solved a question, only a different correct solution can override the previously saved command.
0 commit comments