Skip to content

Commit 2a32d4f

Browse files
committed
- Expanded README content.
Signed-off-by: schlopp96 <71921821+schlopp96@users.noreply.github.com>
1 parent 52acfba commit 2a32d4f

1 file changed

Lines changed: 28 additions & 23 deletions

File tree

README.md

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# PyLoadBar
22

3-
> _**Minimalist, easy-to-use loading sequence/progress bar module.**_
3+
> _**Minimalist load sequence/progress bar module.**_
44
55
---
66

77
## About
88

99
- Useful for small intermittant pauses between console text returns, or code actions.
1010

11-
- Customizable, optional loading and completion messages available to print to the console.
11+
- Customizable/optional loading and completion messages available to print to console (stdout).
1212

1313
- Loading message defaults to `"Loading..."`.
1414
- Completion message defaults to `"Done!"`.
1515

16-
- Includes an _optional_ progress bar (simply change the `enable_display: bool` parameter to equal `False` if you wish to disable the progress bar), toggled on by default.
16+
- Includes an _optional_ progress meter (simply change the `enable_display: bool` parameter to `False` if you wish to disable the progress meter), toggled on by default.
1717

1818
---
1919

@@ -25,9 +25,9 @@
2525
2626
- Run the following to install:
2727

28-
```python
29-
pip install PyLoadBar
30-
```
28+
```shell
29+
pip install PyLoadBar
30+
```
3131

3232
- You should now be able to import `PyLoadBar` directly to your application.
3333

@@ -37,19 +37,23 @@
3737

3838
> _Not_ recommended.
3939
40-
1. Download source code from the [PyLoadBar GitHub repo](https://github.com/schlopp96/PyLoadBar).
40+
1. Download source code `.zip` archive from the PyLoadBar GitHub [releases](https://github.com/schlopp96/PyLoadBar/releases/latest) page and extract contents to desired location.
41+
42+
- OR:
43+
44+
1. Clone repository with the git client of your preference with:
4145

42-
2. Extract contents of the containing `**.zip` file to desired install location.
46+
- `gh repo clone schlopp96/PyLoadBar`
4347

44-
3. Navigate to directory containing extracted contents, and open said folder within a terminal.
48+
2. Navigate to directory containing extracted contents, and open said folder within a terminal.
4549

46-
4. Enter `pip install -r requirements.txt` to install all dependencies for this package.
50+
3. Enter `pip install -r requirements.txt` to install all dependencies for this package.
4751

48-
5. Finally, move the `"PyLoadBar-vx.x.x"` diretory to your global Python 3rd-party package installation directory to be able to import `PyLoadBar` like any other module:
52+
4. Finally, move the `"PyLoadBar-vx.x.x"` directory to your global Python 3rd-party package installation directory to be able to import `PyLoadBar` like any other module:
4953

50-
- `"path/to/python/Lib/site-packages/here"`
54+
- `"~Python/Lib/site-packages/HERE"`
5155

52-
6. Done!
56+
5. Done!
5357

5458
---
5559

@@ -64,10 +68,10 @@
6468
```python
6569
>>> from PyLoadBar import PyLoadBar
6670

67-
>>> bar = PyLoadBar('Adding 50 to x', 'Okay!')
71+
>>> bar = PyLoadBar() # Initialize a new `PyLoadBar` instance.
6872

6973
>>> def add50(x):
70-
bar.load()
74+
bar.load(msg_loading='Adding 50 to x', msg_complete='Okay!', time=30, label='Solving', enable_display=True) # Call `load` method to start loading sequence.
7175
return x + 50
7276

7377
>>> print(add50(50))
@@ -78,32 +82,33 @@
7882
```python
7983
Adding 50 to x...
8084

81-
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:00<00:00, 8.94it/s].
85+
Solving: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:00<00:00, 8.94it/s].
8286

8387
Okay!
8488

8589
100
8690
```
8791

88-
- Of course, the _loading_ and _loading complete_ messages can be customized by passing custom strings to the `msg_loading: str` and `msg_complete: str` parameters respectively.
92+
- The **_loading_** and **_loading complete_** messages can be customized by passing custom strings to the `msg_loading: str` and `msg_complete: str` parameters respectively.
8993

90-
- Note that the progress bar **can be toggled** using the `enable_display: bool` parameter within the `load(msg_complete: str, msg_loading: str, time: int, enable_display: bool)` method.
94+
- Note that the progress bar **can be toggled** using the `enable_display: bool` parameter.
9195

92-
- The time taken to completely fill the progress bar can be determined using the `time: int` parameter.
96+
- The time taken to complete the loading sequence can be determined using the `time: int` parameter.
9397

98+
- Each unit of time is equivalent to 1/10th of a second.
9499
- Every 10 units = 1 second.
95100
- e.g. `load(time=5)` (default) would take 0.5 seconds to fill the progress bar.
96101

97-
- You may also label the progress bar with the `label: str` parameter, defaults to `None`.
102+
- You may also label the progress bar with the `label: str` parameter (defaults to `None`).
98103

99104
- Example:
100105

101106
```python
102107
>>> from PyLoadBar import PyLoadBar
103108

104-
>>> important_bar = PyLoadBar('Important Stuff Happening', 'Day Saved!', 50, 'Saving Day')
109+
>>> important_bar = PyLoadBar() # Initialize a new `PyLoadBar` instance.
105110

106-
>>> important_bar.load()
111+
>>> important_bar.load('Important Stuff Happening', 'Day Saved!', 50, 'Saving Day') # Call `load` method to start loading sequence.
107112

108113
Important Stuff Happening...
109114

@@ -116,7 +121,7 @@ Okay!
116121

117122
## Contributing to PyLoadBar
118123

119-
- If you wish to help contribute to this project, along with the tools you need to develop and run tests, please run the following in your virtual env:
124+
- If you wish to help contribute to this project, please run the following in your virtual env to acquire the necessary dependencies and tools you need to develop and run tests:
120125

121126
```python
122127
pip install PyLoadBar[dev]

0 commit comments

Comments
 (0)