cli

package
v0.0.0-...-3cb6ec2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const HelpString = `playerbm [OPTION…] PLAYER_COMMAND

Description:
    playerbm is a utility that saves your place when you exit the player or
    change the track and automatically resumes from where you left off when you
    open it again.

    Pass the command to open your media player as PLAYER_COMMAND and playerbm
    will connect to the player over the MPRIS DBus Specification and begin
    managing bookmarks.

Example:
    playerbm player ~/audiobooks/war-and-peace.mp3

    Listen for awhile and close the player. When you open the player again with
    playerbm, it will seek to your last position.

Options:
   -l, --list-bookmarks  List all bookmarks and exit.
   -L, --list-players    List all running players that can be controlled.
   -r, --resume=[URL]    Launch a player and resume playing URL from the last
                         saved bookmark and begin managing bookmarks. (default:
                         file of the last saved bookmark)
   -s, --save=[PLAYER]   Save bookmarks for the running players in a comma
                         separated list. (default: all running players)
   -d, --delete={URL}    Delete the bookmark for the given url.
   -h, --help            Show help.
   -v, --version         Print the version.` + "\n"
View Source
const VersionString = "v0.0.1\n"

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolFlag

type BoolFlag struct {
	Short string
	Long  string
	Value *bool
}

type CliError

type CliError struct {
	// contains filtered or unexported fields
}

func (*CliError) Error

func (e *CliError) Error() string

type PbmCli

type PbmCli struct {
	PlayerCmd         string
	ListBookmarksFlag bool
	ListPlayersFlag   bool
	HelpFlag          bool
	VersionFlag       bool
	ResumeFlag        bool
	ResumeUrl         *model.XesamUrl
	SaveFlag          bool
	SavePlayers       string
	DeleteFlag        bool
	DeleteUrl         *model.XesamUrl
}

func ParseArgs

func ParseArgs(args []string) (*PbmCli, error)

type StringFlag

type StringFlag struct {
	Short           string
	Long            string
	Present         *bool
	ArgValuePresent bool
	ArgValue        *string
}

Jump to

Keyboard shortcuts

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