debsearch

package module
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

README

debsearch

Tools and a library for finding Debian packages.

There is a debsearch Go package, plus debsearch a command line tool, and DebFind a GUI application.

Both debsearch and DebFind are run as an ordinary user and are very fast. They should prove useful to anyone who uses Debian or a Debian-derived Linux distribution such as Ubuntu.

DebFind Screenshot

Searching can be by Section, Tags, and words (found in the name and short and long descriptions), in any combination.

License

GPL-3


Documentation

Index

Constants

View Source
const (
	DefaultArc = "amd64"

	Arcs = "alpha amd64 arm arm64 armel armhf avr32 hppa hurd-amd64 " +
		"hurd-i386 i386 ia64 kfreebsd-amd64 kfreebsd-i386 m32 m68k mips " +
		"mips64el mipsel netbsd-alpha netbsd-i386 or1k powerpc " +
		"powerpcspe ppc64el riscv64 s390 s390x sh4 sparc sparc64 x32"
)

Variables

View Source
var (
	Err101 = errors.New("E101: failed to open packages file")
	Err102 = errors.New("E102: no package files given")
)
View Source
var Version string

Functions

func HumanSize added in v0.3.12

func HumanSize(size int) string

func NewDeb added in v0.9.0

func NewDeb() *deb

Types

type FilePair

type FilePair struct {
	Packages string
	I18n     string
}

func NewFilePair

func NewFilePair(packages, i18n string) FilePair

func StdFilePairs

func StdFilePairs(arc string) []FilePair

func StdFilePairsWithDescriptions

func StdFilePairsWithDescriptions(arc string) []FilePair

type Model added in v0.9.0

type Model struct {
	Debs              map[string]*deb
	SectionsAndCounts map[string]int
	TagsAndCounts     map[string]int
}

func NewModel added in v0.9.0

func NewModel(filepairs ...FilePair) (Model, error)

type Query added in v0.2.1

type Query struct {
	Sections gset.Set[string] // sections are always or-ed
	Tags     gset.Set[string]
	TagsAnd  bool // if true all tags must match; else any
	Words    gset.Set[string]
	WordsAnd bool // if true all tags must match; else any
}

func NewQuery added in v0.2.1

func NewQuery() *Query

func (*Query) Clear added in v0.2.1

func (me *Query) Clear()

func (*Query) Match added in v0.3.0

func (me *Query) Match(deb *deb) bool

func (*Query) SelectFrom added in v0.2.1

func (me *Query) SelectFrom(model *Model) []*deb

func (*Query) String added in v0.2.1

func (me *Query) String() string

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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