slug

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

README

🌳 Go Slug Generator

GoDoc License

Install

This command can be installed as a standalone program or composed into a Bonzai command tree.

Standalone

go install github.com/rwxrob/slug/cmd/slug@latest

Composed

package z

import (
	Z "github.com/rwxrob/bonzai/z"
	"github.com/rwxrob/slug"
)

var Cmd = &Z.Cmd{
	Name:     `z`,
	Commands: []*Z.Cmd{help.Cmd, slug.Cmd},
}

Tab Completion

To activate bash completion just use the complete -C option from your .bashrc or command line. There is no messy sourcing required. All the completion is done by the program itself.

complete -C slug slug

If you don't have bash or tab completion check use the shortcut commands instead.

Embedded Documentation

All documentation (like manual pages) has been embedded into the source code of the application. See the source or run the program with help to access it.

Documentation

Overview

Package example provides the Bonzai command branch of the same name.

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &Z.Cmd{

	Name:      `slug`,
	Summary:   `gosimple/slug generator`,
	Version:   `v0.1.0`,
	Copyright: `Copyright 2021 Robert S Muhlestein`,
	License:   `Apache-2.0`,
	Site:      `rwxrob.tv`,
	Source:    `git@github.com:rwxrob/slug.git`,
	Issues:    `github.com/rwxrob/slug/issues`,

	Commands: []*Z.Cmd{help.Cmd},

	Description: `
		The {{cmd .Name}} command converts the first line of standard input
		to a gosimple/slug. But if an argument is provided will use that
		instead. If multiple arguments are passed, assume they should be
		combined (as with UNIX $*).

	`,

	Other: []Z.Section{
		{`Dependencies`, `
				This {{cmd .Name}} command lightly wraps the github.com/gosimple/slug
				module and therefore carries a technical and legal dependency on
				it. See it for its own licensing considerations and usage before
				deciding to use this command.
			`,
		},
	},

	Call: func(_ *Z.Cmd, args ...string) error {
		str := Z.ArgsOrIn(args)
		term.Print(slug.Make(str))
		return nil
	},
}

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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