Skip to content

Commit 1ce181e

Browse files
Show example where the 'format' of progress::progress_bar() is also customized [ci skip]
1 parent d2ececc commit 1ce181e

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

OVERVIEW.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,14 @@ handlers(list(
123123
))
124124
```
125125

126-
With this construct, we can make adjustments to the default behavior of these progress handlers. For example, we can configure the `width` and the `complete` arguments of `progress::progress_bar$new()`, and tell **beepr** to use a different `finish` sound and generate sounds at most every two seconds by setting:
126+
With this construct, we can make adjustments to the default behavior of these progress handlers. For example, we can configure the `format`, `width`, and `complete` arguments of `progress::progress_bar$new()`, and tell **beepr** to use a different `finish` sound and generate sounds at most every two seconds by setting:
127127

128128
```r
129129
handlers(list(
130-
handler_progress(width = 40, complete = "+"),
130+
handler_progress(
131+
format="(:spin) :current/:total (:message) [:bar] :percent in :elapsed ETA: :eta",
132+
width = 40, complete = "+"
133+
),
131134
handler_beepr(finish = 9, interval = 2.0)
132135
))
133136
```

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,14 @@ handlers(list(
125125
))
126126
```
127127

128-
With this construct, we can make adjustments to the default behavior of these progress handlers. For example, we can configure the `width` and the `complete` arguments of `progress::progress_bar$new()`, and tell **beepr** to use a different `finish` sound and generate sounds at most every two seconds by setting:
128+
With this construct, we can make adjustments to the default behavior of these progress handlers. For example, we can configure the `format`, `width`, and `complete` arguments of `progress::progress_bar$new()`, and tell **beepr** to use a different `finish` sound and generate sounds at most every two seconds by setting:
129129

130130
```r
131131
handlers(list(
132-
handler_progress(width = 40, complete = "+"),
132+
handler_progress(
133+
format="(:spin) :current/:total (:message) [:bar] :percent in :elapsed ETA: :eta",
134+
width = 40, complete = "+"
135+
),
133136
handler_beepr(finish = 9, interval = 2.0)
134137
))
135138
```

vignettes/progressr-intro.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,14 @@ handlers(list(
132132
))
133133
```
134134

135-
With this construct, we can make adjustments to the default behavior of these progress handlers. For example, we can configure the `width` and the `complete` arguments of `progress::progress_bar$new()`, and tell **beepr** to use a different `finish` sound and generate sounds at most every two seconds by setting:
135+
With this construct, we can make adjustments to the default behavior of these progress handlers. For example, we can configure the `format`, `width`, and `complete` arguments of `progress::progress_bar$new()`, and tell **beepr** to use a different `finish` sound and generate sounds at most every two seconds by setting:
136136

137137
```r
138138
handlers(list(
139-
handler_progress(width = 40, complete = "+"),
139+
handler_progress(
140+
format="(:spin) :current/:total (:message) [:bar] :percent in :elapsed ETA: :eta",
141+
width = 40, complete = "+"
142+
),
140143
handler_beepr(finish = 9, interval = 2.0)
141144
))
142145
```

0 commit comments

Comments
 (0)