pb

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2022 License: BSD-3-Clause Imports: 6 Imported by: 0

README

pb GoDoc

Usage

local pb = require('pb')
local time = require('time')

local count = 100
local bar = pb.new(count)

bar:start()

for i=1, count, 1 do
  time.sleep(1)
  bar:increment()
end

bar:finish()
Configure progress bar
  • bar:configure({}) - change progress bar parameters. Avaliable options:
template - use custom template (Please see https://github.com/cheggaaa/pb/blob/master/v3/element.go for all available elements)
refresh_rate in ms (default 200ms)
writer (default stderr). Only supported value is `stdout`.

Documentation

Overview

Package pb implements github.com/cheggaaa/pb/v3 functionality for lua.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(L *lua.LState) int

func Finish

func Finish(L *lua.LState) int

func Increment

func Increment(L *lua.LState) int

func Loader

func Loader(L *lua.LState) int

Loader is the module loader function.

func New

func New(L *lua.LState) int

New (count) - total for progress bar

func Preload

func Preload(L *lua.LState)

Preload adds strings to the given Lua state's package.preload table. After it has been preloaded, it can be loaded using require:

local pb = require("pb")

func Start

func Start(L *lua.LState) int

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL