open class Spinner {
open func start(message: String = "") {
}
open func display(_ message: String) {
}
open func stop(message: String? = nil) {
}
}
On start, during or termination of the animation. Show message beside spinner. Please, keep in mind that the spinner and message should be in one line to be correctly animated.
Contribute
If you have good idea or suggestion? Please, don’t hesitate to open a pull request or send me an email.
Hope you enjoy building command line tool with Motor!
Motor
Swift cli spinner. Simple and fully customizable.
Table of Contents
Demo
On terminal
Installation
Add Motor to
Package.swift
.Customization
Pattern
Spinner pattern.
frames
for frames of the animation.fps
(frames per second) for frame rate.Delay
Delay before starting animation. Useful when duration of the job could be short and don’t want to flash spinner.
Message
On start, during or termination of the animation. Show message beside spinner. Please, keep in mind that the spinner and message should be in one line to be correctly animated.
Contribute
If you have good idea or suggestion? Please, don’t hesitate to open a pull request or send me an email.
Hope you enjoy building command line tool with Motor!