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: README.md
+28-23Lines changed: 28 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,19 @@
1
1
# PyLoadBar
2
2
3
-
> _**Minimalist, easy-to-use loading sequence/progress bar module.**_
3
+
> _**Minimalist load sequence/progress bar module.**_
4
4
5
5
---
6
6
7
7
## About
8
8
9
9
- Useful for small intermittant pauses between console text returns, or code actions.
10
10
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).
12
12
13
13
- Loading message defaults to `"Loading..."`.
14
14
- Completion message defaults to `"Done!"`.
15
15
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.
17
17
18
18
---
19
19
@@ -25,9 +25,9 @@
25
25
26
26
- Run the following to install:
27
27
28
-
```python
29
-
pip install PyLoadBar
30
-
```
28
+
```shell
29
+
pip install PyLoadBar
30
+
```
31
31
32
32
- You should now be able to import `PyLoadBar` directly to your application.
33
33
@@ -37,19 +37,23 @@
37
37
38
38
> _Not_ recommended.
39
39
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:
41
45
42
-
2. Extract contents of the containing `**.zip` file to desired install location.
46
+
-`gh repo clone schlopp96/PyLoadBar`
43
47
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.
45
49
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.
47
51
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:
49
53
50
-
-`"path/to/python/Lib/site-packages/here"`
54
+
-`"~Python/Lib/site-packages/HERE"`
51
55
52
-
6. Done!
56
+
5. Done!
53
57
54
58
---
55
59
@@ -64,10 +68,10 @@
64
68
```python
65
69
>>>from PyLoadBar import PyLoadBar
66
70
67
-
>>> bar = PyLoadBar('Adding 50 to x', 'Okay!')
71
+
>>> bar = PyLoadBar() # Initialize a new `PyLoadBar` instance.
68
72
69
73
>>>defadd50(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.
-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.
89
93
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.
91
95
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.
93
97
98
+
- Each unit of time is equivalent to 1/10th of a second.
94
99
- Every 10 units = 1 second.
95
100
- e.g. `load(time=5)` (default) would take 0.5 seconds to fill the progress bar.
96
101
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`).
- 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:
0 commit comments