gomb

package module
v0.0.0-...-59956df Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2021 License: MIT Imports: 10 Imported by: 0

README

gemb browser

A browser to browse the gemini space

It is still very much early alpha state.

Feature goals

  • Browse and render text/gemini pages
  • Support for opening external file formats
  • Download contents of all urls
  • Use vim bindings
  • Render rss/atom feeds in a textual manner
  • Generate TOC for text/gemini based on headers
  • Show link collections for text/gemini in a sidebar
  • Bookmark gemini sites
  • Bookmark sync between instances. (Using self hosted service)

Documentation

Index

Constants

View Source
const (
	ColorBackground = tcell.ColorWheat
	ColorText       = tcell.ColorBlack
	ColorLink       = tcell.ColorBlue
	ColorBlock      = tcell.ColorDarkGray
	ColorH1         = tcell.ColorRed
)
View Source
const (
	TypeNone = iota
	TypeText
	TypeLink
	TypeH1
	TypeH2
	TypeH3
	TypeBlock // block of text that should be rendered with monospace font
)

Variables

This section is empty.

Functions

func ColorString

func ColorString(col tcell.Color) string

func Hints

func Hints(num int) []string

Types

type Document

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

func ParseGeminiDocument

func ParseGeminiDocument(uri *url.URL, r io.Reader) (*Document, error)

func ParseTextDocument

func ParseTextDocument(uri *url.URL, r io.Reader) (*Document, error)

func (*Document) Hint

func (d *Document) Hint(id string) bool
func (d *Document) Link(id string) string

func (*Document) Render

func (d *Document) Render(highlightLinks bool, hs string) []byte

func (*Document) URL

func (d *Document) URL() string

type History

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

func NewHistory

func NewHistory() *History

func (*History) Back

func (h *History) Back() *Document

func (*History) CanBack

func (h *History) CanBack() bool

func (*History) CanForward

func (h *History) CanForward() bool

func (*History) Current

func (h *History) Current() *Document

func (*History) Forward

func (h *History) Forward() *Document

func (*History) Push

func (h *History) Push(doc *Document)

type Line

type Line struct {
	Type  Type
	Value string
}

type Type

type Type int

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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