boltbrowser

package module
v0.0.0-...-7ce7176 Latest Latest
Warning

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

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

README

boltbrowser

A CLI Browser for BoltDB Files

Image of About Screen

Image of Main Browser

Installing

Install in the standard way:

go get github.com/br0xen/boltbrowser

Then you'll have boltbrowser in your path.

Pre-built Binaries

Here are pre-built binaries:

Usage

Just provide a BoltDB filename to be opened as the first argument on the command line:

boltbrowser <filename>

To see all options that are available, run:

boltbrowser --help

Troubleshooting

If you're having trouble with garbled characters being displayed on your screen, you may try a different value for TERM.
People tend to have the best luck with xterm-256color or something like that. Play around with it and see if it fixes your problems.

Documentation

Index

Constants

View Source
const (
	// BrowserScreenIndex is the index
	BrowserScreenIndex = iota
	// AboutScreenIndex The idx number for the 'About' Screen
	AboutScreenIndex
	// ExitScreenIndex The idx number for Exiting
	ExitScreenIndex
)

Variables

View Source
var AppArgs struct {
	DBOpenTimeout time.Duration
	ReadOnly      bool
	NoValue       bool
}
View Source
var CurrentFilename string
View Source
var DB *bolt.DB
View Source
var DatabaseFiles []string
View Source
var ProgramName = "boltbrowser"
View Source
var VersionNum = 2.0

Functions

func MainLoop

func MainLoop(memBolt *BoltDB, style Style)

Types

type AboutScreen

type AboutScreen int

AboutScreen is just a basic 'int' type that we can extend to make this screen

type BoltBucket

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

BoltBucket is just a struct representation of a Bucket in the Bolt DB

func (*BoltBucket) GetPath

func (b *BoltBucket) GetPath() []string

GetPath returns the database path leading to this BoltBucket

type BoltDB

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

BoltDB A Database, basically a collection of buckets

var MemBolt *BoltDB

func (*BoltDB) RefreshDatabase

func (bd *BoltDB) RefreshDatabase() *BoltDB

type BoltPair

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

BoltPair is just a struct representation of a Pair in the Bolt DB

func (*BoltPair) GetPath

func (p *BoltPair) GetPath() []string

GetPath Returns the path of the BoltPair

type BoltType

type BoltType int

BoltType is just for tracking what type of db item we're looking at

type BrowserMode

type BrowserMode int

BrowserMode is just for designating the mode that we're in

type BrowserScreen

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

BrowserScreen holds all that's going on :D

type Command

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

Command is a struct for associating descriptions to keys

type Cursor

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

type Line

type Line struct {
	Text string
	Fg   termbox.Attribute
	Bg   termbox.Attribute
}

type Screen

type Screen interface {
	// contains filtered or unexported methods
}

Screen is a basic structure for all of the applications screens

type Style

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

Style Defines the colors for the terminal display, basically

func DefaultStyle

func DefaultStyle() Style

type ViewPort

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

ViewPort helps keep track of what's being displayed on the screen

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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