people

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package people deals with people, person names, aliases and their roles.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cronjob added in v1.6.0

func Cronjob(force bool) error

Cronjob is used for system automation to generate dynamic HTML pages.

func DataList

func DataList(filename string, r Request) error

DataList prints an auto-complete list for HTML input elements.

func Filters

func Filters() []string

Filters is a Role slice for use with the Cobra filterFlag.

func Fix

func Fix(simulate bool) error

Fix any malformed group names found in the database.

Example
package main

import (
	"log"

	"github.com/Defacto2/df2/pkg/people"
)

func main() {
	const simulate = true
	if err := people.Fix(simulate); err != nil {
		log.Print(err)
	}
}
Output:

no people fixes needed

func HTML

func HTML(filename string, r Request) error

HTML prints a snippet listing links to each person.

func Print

func Print(r Request) error

Print lists people filtered by a role and summaries the results.

func Roles

func Roles() string

Roles or jobs of people.

func Wheres added in v1.6.0

func Wheres() []string

Wheres are group categories.

Types

type Request

type Request struct {
	Filter   string // Filter people by category.
	Counts   bool   // Counts the person's total files.
	Progress bool   // Progress counter when requesting database data.
}

Request flags for people functions.

func (Request) HTML added in v1.6.0

func (r Request) HTML(name string) error

HTML prints a snippet listing links to each group, with an optional file count.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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