|
10 | 10 |
|
11 | 11 | - Users can choose between two different loading sequences: |
12 | 12 |
|
13 | | - - **A.** Progress-bar style loading sequence |
14 | | - - **B.** Animated-text style loading sequence |
| 13 | + - **A.** _Progress-bar_ style loading sequence |
| 14 | + - **B.** _Animated-text_ style loading sequence |
15 | 15 |
|
16 | | -- The desired loading sequence **can be toggled** using the `enable_bar: bool` parameter. |
17 | | - |
18 | | - - If `enable_bar: bool` is `False`, the progress-bar sequence will not be used, and the animated text-based loading sequence will be used instead. |
19 | | - |
20 | | -- The text-based loading sequence displays the loading message followed by incrementing dots, all printed to the same line. |
21 | | - |
22 | | -- Messages can be customized by passing custom strings to the `msg_loading: str` and `msg_complete: str` parameters respectively. |
| 16 | +- When instantiating a `PyLoadBar` object, messages can be customized by passing custom strings to the `msg_loading: str` and `msg_complete: str` parameters respectively. |
23 | 17 |
|
24 | 18 | - The loading message defaults to `"Loading..."` |
25 | 19 | - The completion message defaults to `"Done!"` |
|
28 | 22 |
|
29 | 23 | - **NOTE:** `enable_bar: bool` must be set to `True` for a label to be assigned to the progress bar. |
30 | 24 |
|
31 | | -- The time taken to complete each iteration can be determined using the `min_iter: float` and `max_iter: float` parameters. |
| 25 | +- The desired loading sequence **can be toggled** using the `enable_bar: bool` parameter. |
| 26 | + |
| 27 | + - If `enable_bar: bool` is `False`, the progress-bar sequence will not be used, and the animated text-based loading sequence will be used instead. |
| 28 | + |
| 29 | +- When calling the `start()` method and using the _progress-bar_ sequence, the time taken to complete each iteration can be determined using the `min_iter: float` and `max_iter: float` parameters. |
| 30 | + |
32 | 31 | - Each iteration length is randomized to a value between `min_iter: float` and `max_iter: float` seconds. |
33 | 32 | - e.g. `start(min_iter=0.5, max_iter=1.5)` would take anywhere between 0.5 - 1.5 seconds to complete a single iteration. |
34 | 33 |
|
| 34 | +- The _text-based_ loading sequence displays the loading message followed by incrementing dots, all printed to the same line. |
| 35 | + - Set number of seconds to complete a single text-sequence iteration using `txt_seq_speed: float`. |
| 36 | + - Defaults to `0.5` seconds per animation cycle. |
| 37 | + |
35 | 38 | --- |
36 | 39 |
|
37 | 40 | ## Installing PyLoadBar |
@@ -105,7 +108,7 @@ gh repo clone schlopp96/PyLoadBar |
105 | 108 |
|
106 | 109 | >>> bar = PyLoadBar(msg_loading='Loading', msg_complete='Done!', enable_bar=False) # Initialize loading sequence. |
107 | 110 |
|
108 | | - >>> bar.start(iter_total=1) # Start animated-text loading sequence. |
| 111 | + >>> bar.start(iter_total=1, txt_iter_speed=1) # Start animated-text loading sequence. |
109 | 112 |
|
110 | 113 | # Note that during actual use case, text is printed to same line followed by incrementing dots: |
111 | 114 |
|
|
0 commit comments