Skip to content

Commit

Permalink
Merge pull request #349 from pterm/348-update-examples-and-docs-updat…
Browse files Browse the repository at this point in the history
…e-generation
  • Loading branch information
MarvinJWendt committed Apr 21, 2022
2 parents 0180a40 + 1691dd4 commit 284d698
Show file tree
Hide file tree
Showing 137 changed files with 10,565 additions and 1,019 deletions.
3,188 changes: 2,868 additions & 320 deletions README.md

Large diffs are not rendered by default.

4,075 changes: 4,075 additions & 0 deletions _examples/README.md

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions _examples/area/README.md
@@ -1,6 +1,10 @@
# area
### area/demo

![Animation](animation.svg)
![Animation](https://raw.githubusercontent.com/pterm/pterm/master/_examples/area/demo/animation.svg)

<details>

<summary>SHOW SOURCE</summary>

```go
package main
Expand All @@ -25,3 +29,6 @@ func main() {
}

```

</details>

10 changes: 0 additions & 10 deletions _examples/area/animation.svg

This file was deleted.

27 changes: 27 additions & 0 deletions _examples/area/demo/README.md
@@ -0,0 +1,27 @@
# area/demo

![Animation](animation.svg)

```go
package main

import (
"time"

"github.com/pterm/pterm"
)

func main() {
pterm.Info.Println("The previous text will stay in place, while the area updates.")
pterm.Print("\n\n") // Add two new lines as spacer.

area, _ := pterm.DefaultArea.WithCenter().Start() // Start the Area printer, with the Center option.
for i := 0; i < 10; i++ {
str, _ := pterm.DefaultBigText.WithLetters(pterm.NewLettersFromString(time.Now().Format("15:04:05"))).Srender() // Save current time in str.
area.Update(str) // Update Area contents.
time.Sleep(time.Second)
}
area.Stop()
}

```
10 changes: 10 additions & 0 deletions _examples/area/demo/animation.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
10 changes: 0 additions & 10 deletions _examples/barchart-mixed-values/animation.svg

This file was deleted.

10 changes: 0 additions & 10 deletions _examples/barchart-negative-values/animation.svg

This file was deleted.

0 comments on commit 284d698

Please sign in to comment.