Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooke Hatton committed Mar 18, 2022
1 parent e88f9da commit 6dc4bf2
Show file tree
Hide file tree
Showing 13 changed files with 273 additions and 253 deletions.
34 changes: 18 additions & 16 deletions docs/docs/printer/barchart.md
@@ -1,6 +1,6 @@
# BarChartPrinter

<!--
<!--
Replace all of the following strings with the current printer.
barchart BarChart BarChartPrinter DefaultBarChart
-->
Expand All @@ -9,7 +9,6 @@ Replace all of the following strings with the current printer.

<p align="center"><a href="https://github.com/pterm/pterm/blob/master/_examples/barchart/main.go" target="_blank">(Show source of demo)</a></p>


## Usage

### Basic usage
Expand Down Expand Up @@ -47,17 +46,19 @@ bars := pterm.Bars{
> [!TIP]
> Click the options and types to show the documentation on _pkg.go.dev_
|Option|Type|
|------|----|
|[Bars](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.Bars)|[Bars](https://pkg.go.dev/github.com/pterm/pterm#Bars)|
|[Horizontal](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.Horizontal)|bool|
|[ShowValue](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.ShowValue)|bool|
|[Height](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.Height)|int|
|[Width](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.Width)|int|
|[VerticalBarCharacter](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.VerticalBarCharacter)|string|
|[HorizontalBarCharacter](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.HorizontalBarCharacter)|string|
| Option | Type |
| ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| [Bars](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.Bars) | [Bars](https://pkg.go.dev/github.com/pterm/pterm#Bars) |
| [Horizontal](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.Horizontal) | bool |
| [ShowValue](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.ShowValue) | bool |
| [Height](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.Height) | int |
| [Width](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.Width) | int |
| [VerticalBarCharacter](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.VerticalBarCharacter) | string |
| [HorizontalBarCharacter](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.HorizontalBarCharacter) | string |
| [Writer](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.WithWriter) | io.Writer |

### Output functions

<!-- Remove comment of the correct interface -->

<!--
Expand All @@ -75,10 +76,10 @@ bars := pterm.Bars{

> This printer implements the interface [`RenderablePrinter`](https://github.com/pterm/pterm/blob/master/interface_renderable_printer.go)
|Function|Description|
|------|---------|
|Render()|Prints to Terminal|
|Srender()|Returns a string|
| Function | Description |
| --------- | ------------------ |
| Render() | Prints to Terminal |
| Srender() | Returns a string |

<!--
> This printer implements the interface [`LivePrinter`](https://github.com/pterm/pterm/blob/master/interface_live_printer.go)
Expand All @@ -96,4 +97,5 @@ bars := pterm.Bars{
-->

## Related
- [Override default printers](docs/customizing/override-default-printer.md)

- [Override default printers](docs/customizing/override-default-printer.md)
33 changes: 17 additions & 16 deletions docs/docs/printer/basictext.md
@@ -1,6 +1,6 @@
# BasicTextPrinter

<!--
<!--
Replace all of the following strings with the current printer.
basictext BasicText BasicTextPrinter DefaultBasicText
-->
Expand All @@ -9,7 +9,6 @@ Replace all of the following strings with the current printer.

<p align="center"><a href="https://github.com/pterm/pterm/blob/master/_examples/basictext/main.go" target="_blank">(Show source of demo)</a></p>


## Usage

### Basic usage
Expand All @@ -29,24 +28,26 @@ pterm.DefaultBasicText.Println("Hello, World!")
> [!TIP]
> Click the options and types to show the documentation on _pkg.go.dev_
|Option|Type|
|------|----|
|[Style](https://pkg.go.dev/github.com/pterm/pterm#BasicTextPrinter.WithStyle)|[*Style](https://pkg.go.dev/github.com/pterm/pterm#Style)|
| Option | Type |
| ------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| [Style](https://pkg.go.dev/github.com/pterm/pterm#BasicTextPrinter.WithStyle) | [\*Style](https://pkg.go.dev/github.com/pterm/pterm#Style) |
| [Writer](https://pkg.go.dev/github.com/pterm/pterm#BasicTextPrinter.WithWriter) | io.Writer |

### Output functions

> This printer implements the interface [`TextPrinter`](https://github.com/pterm/pterm/blob/master/interface_text_printer.go)
|Function|Description|
|------|---------|
|Sprint(a ...interface{})|Returns a string|
|Sprintln(a ...interface{})|Returns a string with a new line at the end|
|Sprintf(format string, a ...interface{})|Returns a string, formatted according to a format specifier|
|Sprintfln(format string, a ...interface{})|Returns a string, formatted according to a format specifier with a new line at the end|
|Print(a ...interface{})|Prints to the terminal|
|Println(a ...interface{})|Prints to the terminal with a new line at the end|
|Printf(format string, a ...interface{})|Prints to the terminal, formatted according to a format specifier|
|Printfln(format string, a ...interface{})|Prints to the terminal, formatted according to a format specifier with a new line at the end|
| Function | Description |
| ------------------------------------------ | -------------------------------------------------------------------------------------------- |
| Sprint(a ...interface{}) | Returns a string |
| Sprintln(a ...interface{}) | Returns a string with a new line at the end |
| Sprintf(format string, a ...interface{}) | Returns a string, formatted according to a format specifier |
| Sprintfln(format string, a ...interface{}) | Returns a string, formatted according to a format specifier with a new line at the end |
| Print(a ...interface{}) | Prints to the terminal |
| Println(a ...interface{}) | Prints to the terminal with a new line at the end |
| Printf(format string, a ...interface{}) | Prints to the terminal, formatted according to a format specifier |
| Printfln(format string, a ...interface{}) | Prints to the terminal, formatted according to a format specifier with a new line at the end |

## Related
- [Override default printers](docs/customizing/override-default-printer.md)

- [Override default printers](docs/customizing/override-default-printer.md)
23 changes: 13 additions & 10 deletions docs/docs/printer/bigtext.md
@@ -1,6 +1,6 @@
# BigTextPrinter

<!--
<!--
Replace all of the following strings with the current printer.
bigtext BigText BigTextPrinter DefaultBigText
-->
Expand Down Expand Up @@ -28,12 +28,14 @@ pterm.DefaultBigText.WithLetters(pterm.NewLettersFromString("Hello")).Render()
> [!TIP]
> Click the options and types to show the documentation on _pkg.go.dev_
|Option|Type|
|------|----|
|[Letters](https://pkg.go.dev/github.com/pterm/pterm#BigTextPrinter.WithLetters)|[Letters](https://pkg.go.dev/github.com/pterm/pterm#Letters)|
|[BigCharacters](https://pkg.go.dev/github.com/pterm/pterm#BigTextPrinter.WithBigCharacters)|map[string]string|
| Option | Type |
| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| [Letters](https://pkg.go.dev/github.com/pterm/pterm#BigTextPrinter.WithLetters) | [Letters](https://pkg.go.dev/github.com/pterm/pterm#Letters) |
| [BigCharacters](https://pkg.go.dev/github.com/pterm/pterm#BigTextPrinter.WithBigCharacters) | map[string]string |
| [Writer](https://pkg.go.dev/github.com/pterm/pterm#BigTextPrinter.WithWriter) | io.Writer |

### Output functions

<!-- Remove comment of the correct interface -->

<!--
Expand All @@ -51,10 +53,10 @@ pterm.DefaultBigText.WithLetters(pterm.NewLettersFromString("Hello")).Render()

> This printer implements the interface [`RenderablePrinter`](https://github.com/pterm/pterm/blob/master/interface_renderable_printer.go)
|Function|Description|
|------|---------|
|Render()|Prints to Terminal|
|Srender()|Returns a string|
| Function | Description |
| --------- | ------------------ |
| Render() | Prints to Terminal |
| Srender() | Returns a string |

<!--
> This printer implements the interface [`LivePrinter`](https://github.com/pterm/pterm/blob/master/interface_live_printer.go)
Expand All @@ -72,4 +74,5 @@ pterm.DefaultBigText.WithLetters(pterm.NewLettersFromString("Hello")).Render()
-->

## Related
- [Override default printers](docs/customizing/override-default-printer.md)

- [Override default printers](docs/customizing/override-default-printer.md)
71 changes: 36 additions & 35 deletions docs/docs/printer/box.md
@@ -1,6 +1,6 @@
# BoxPrinter

<!--
<!--
Replace all of the following strings with the current printer.
box Box BoxPrinter DefaultBox
-->
Expand All @@ -9,7 +9,6 @@ Replace all of the following strings with the current printer.

<p align="center"><a href="https://github.com/pterm/pterm/blob/master/_examples/box/main.go" target="_blank">(Show source of demo)</a></p>


## Usage

### Basic usage
Expand All @@ -29,43 +28,45 @@ pterm.DefaultBox.Println("test")
> [!TIP]
> Click the options and types to show the documentation on _pkg.go.dev_
|Option|Type|
|------|----|
|[BottomLeftCornerString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithBottomLeftCornerString)|string|
|[BottomPadding](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithBottomPadding)|int|
|[BottomRightCornerString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithBottomRightCornerString)|string|
|[BoxStyle](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithBoxStyle)|[*Style](https://pkg.go.dev/github.com/pterm/pterm#Style)|
|[HorizontalString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithHorizontalString)|string|
|[LeftPadding](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithLeftPadding)|int|
|[RightPadding](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithRightPadding)|int|
|[Text](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithText)|string|
|[TextStyle](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTextStyle)|[*Style](https://pkg.go.dev/github.com/pterm/pterm#Style)|
|[Title](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitle)|string|
|[TitleBottomCenter](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleBottomCenter)|boolean|
|[TitleBottomLeft](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleBottomLeft)|boolean|
|[TitleBottomRight](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleBottomRight)|boolean|
|[TitleTopCenter](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleTopCenter)|boolean|
|[TitleTopLeft](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleTopLeft)|boolean|
|[TitleTopRight](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleTopRight)|boolean|
|[TopLeftCornerString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTopLeftCornerString)|string|
|[TopPadding](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTopPadding)|int|
|[TopRightCornerString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTopRightCornerString)|string|
|[VerticalString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithVerticalString)|string|
| Option | Type |
| ----------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| [BottomLeftCornerString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithBottomLeftCornerString) | string |
| [BottomPadding](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithBottomPadding) | int |
| [BottomRightCornerString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithBottomRightCornerString) | string |
| [BoxStyle](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithBoxStyle) | [\*Style](https://pkg.go.dev/github.com/pterm/pterm#Style) |
| [HorizontalString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithHorizontalString) | string |
| [LeftPadding](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithLeftPadding) | int |
| [RightPadding](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithRightPadding) | int |
| [Text](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithText) | string |
| [TextStyle](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTextStyle) | [\*Style](https://pkg.go.dev/github.com/pterm/pterm#Style) |
| [Title](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitle) | string |
| [TitleBottomCenter](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleBottomCenter) | boolean |
| [TitleBottomLeft](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleBottomLeft) | boolean |
| [TitleBottomRight](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleBottomRight) | boolean |
| [TitleTopCenter](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleTopCenter) | boolean |
| [TitleTopLeft](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleTopLeft) | boolean |
| [TitleTopRight](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleTopRight) | boolean |
| [TopLeftCornerString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTopLeftCornerString) | string |
| [TopPadding](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTopPadding) | int |
| [TopRightCornerString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTopRightCornerString) | string |
| [VerticalString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithVerticalString) | string |
| [Writer](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithWriter) | io.Writer |

### Output functions

> This printer implements the interface [`TextPrinter`](https://github.com/pterm/pterm/blob/master/interface_text_printer.go)
|Function|Description|
|------|---------|
|Sprint(a ...interface{})|Returns a string|
|Sprintln(a ...interface{})|Returns a string with a new line at the end|
|Sprintf(format string, a ...interface{})|Returns a string, formatted according to a format specifier|
|Sprintfln(format string, a ...interface{})|Returns a string, formatted according to a format specifier with a new line at the end|
|Print(a ...interface{})|Prints to the terminal|
|Println(a ...interface{})|Prints to the terminal with a new line at the end|
|Printf(format string, a ...interface{})|Prints to the terminal, formatted according to a format specifier|
|Printfln(format string, a ...interface{})|Prints to the terminal, formatted according to a format specifier with a new line at the end|
| Function | Description |
| ------------------------------------------ | -------------------------------------------------------------------------------------------- |
| Sprint(a ...interface{}) | Returns a string |
| Sprintln(a ...interface{}) | Returns a string with a new line at the end |
| Sprintf(format string, a ...interface{}) | Returns a string, formatted according to a format specifier |
| Sprintfln(format string, a ...interface{}) | Returns a string, formatted according to a format specifier with a new line at the end |
| Print(a ...interface{}) | Prints to the terminal |
| Println(a ...interface{}) | Prints to the terminal with a new line at the end |
| Printf(format string, a ...interface{}) | Prints to the terminal, formatted according to a format specifier |
| Printfln(format string, a ...interface{}) | Prints to the terminal, formatted according to a format specifier with a new line at the end |

## Related
- [Override default printers](docs/customizing/override-default-printer.md)

- [Override default printers](docs/customizing/override-default-printer.md)

0 comments on commit 6dc4bf2

Please sign in to comment.