organize_text

package
v0.0.0-...-1c9a7a8 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeInteractive = Mode(iota)
	ModeCommitDirectly
	ModeOutputOnly
	ModeUnknown = -1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignmentTreeConstructor

type AssignmentTreeConstructor struct {
	Options
}

func (*AssignmentTreeConstructor) Assignments

func (atc *AssignmentTreeConstructor) Assignments() (roots []*assignment, err error)

type CompareMap

type CompareMap struct {
	// etikett to hinweis
	Named SetKeyToMetadatei
	// etikett to bezeichnung
	Unnamed SetKeyToMetadatei
}

type ErrorRead

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

type Factory

type Factory struct {
	Options
}

func (*Factory) Make

func (f *Factory) Make() (ot *Text, err error)

type Flags

type Flags struct {
	Options

	ExtraEtiketten collections_ptr.Flag[kennung.Etikett, *kennung.Etikett]
	// contains filtered or unexported fields
}

func MakeFlags

func MakeFlags() Flags

func MakeFlagsWithMetadatei

func MakeFlagsWithMetadatei(m metadatei.Metadatei) Flags

func (*Flags) AddToFlagSet

func (o *Flags) AddToFlagSet(f *flag.FlagSet)

func (*Flags) GetOptions

func (o *Flags) GetOptions(
	printOptions erworben_cli_print_options.PrintOptions,
	q matcher.Query,
	stringFormatWriter schnittstellen.StringFormatWriter[*sku.Transacted],
) Options

type Metadatei

type Metadatei struct {
	kennung.EtikettSet
	Matchers schnittstellen.SetLike[matcher.Matcher]
	Typ      kennung.Typ
}

func (Metadatei) HasMetadateiContent

func (m Metadatei) HasMetadateiContent() bool

func (*Metadatei) ReadFrom

func (m *Metadatei) ReadFrom(r1 io.Reader) (n int64, err error)

func (Metadatei) WriteTo

func (m Metadatei) WriteTo(w1 io.Writer) (n int64, err error)

type Mode

type Mode int

func (*Mode) Set

func (m *Mode) Set(v string) (err error)

func (Mode) String

func (m Mode) String() string

type Options

type Options struct {
	Konfig konfig.Compiled

	Typ               kennung.Typ
	GroupingEtiketten kennung.Slice
	ExtraEtiketten    kennung.EtikettSet
	Transacted        schnittstellen.SetLike[*sku.Transacted]

	Expanders kennung.Abbr

	UsePrefixJoints        bool
	UseRightAlignedIndents bool
	UseRefiner             bool
	UseMetadateiHeader     bool

	PrintOptions       erworben_cli_print_options.PrintOptions
	StringFormatWriter schnittstellen.StringFormatWriter[*sku.Transacted]
	// contains filtered or unexported fields
}

func (Options) Factory

func (o Options) Factory() *Factory

type Refiner

type Refiner struct {
	Enabled         bool
	UsePrefixJoints bool
}

func (*Refiner) Refine

func (atc *Refiner) Refine(a *assignment) (err error)

passed-in assignment may be nil?

type SetKeyToMetadatei

type SetKeyToMetadatei map[string]metadatei.Metadatei

TODO-P4 make generic

func (SetKeyToMetadatei) Add

func (s SetKeyToMetadatei) Add(h string)

func (SetKeyToMetadatei) AddEtikett

func (s SetKeyToMetadatei) AddEtikett(h string, e kennung.Etikett)

func (SetKeyToMetadatei) ContainsEtikett

func (s SetKeyToMetadatei) ContainsEtikett(
	h string,
	e kennung.Etikett,
) (ok bool)

func (SetKeyToMetadatei) String

func (m SetKeyToMetadatei) String() string

type Text

type Text struct {
	Options
	Metadatei
	// contains filtered or unexported fields
}

func New

func New(options Options) (ot *Text, err error)

func (Text) AlignmentSpacing

func (a Text) AlignmentSpacing() int

func (Text) Depth

func (a Text) Depth() int

func (Text) MaxDepth

func (a Text) MaxDepth() (d int)

func (Text) MaxKopfUndSchwanz

func (a Text) MaxKopfUndSchwanz() (kopf, schwanz int)

func (Text) MaxLen

func (a Text) MaxLen() (m int)

func (*Text) ReadFrom

func (t *Text) ReadFrom(r io.Reader) (n int64, err error)

func (*Text) Refine

func (t *Text) Refine() (err error)

func (Text) String

func (a Text) String() (s string)

func (*Text) ToCompareMap

func (in *Text) ToCompareMap() (out CompareMap, err error)

func (Text) WriteTo

func (ot Text) WriteTo(out io.Writer) (n int64, err error)

Jump to

Keyboard shortcuts

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