minidoc

package module
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2020 License: MIT Imports: 34 Imported by: 0

README

minidoc

Manage small pieces of information using minidoc. Currently, you can manage URLs, TODOs, and Notes.

The problem minidoc is trying to solve is storing and retrieving small pieces of information that's everywhere on computers. full text search is enabled so it makes it easy to find the stored information later on.

Another useful feature of minidoc is batch tagging. You can search for information, filter and then apply tags to multiple minidocs. Selected minidocs can be used to generate markdowns or pdfs if pandoc is installed.

Installation using homebrew

$ brew tap 7onetella/minidoc
$ brew install minidoc
$ minidoc

Getting started

This project requires Go to be installed. On OS X with Homebrew you can just run brew install go.

Running it then should be as simple as:

$ cd minidoc
$ go build && ./minidoc
Testing

TODO: boltdb is used so testing seems to block

Demo - Asciicast

asciicast

Design decision

I am mostly writing this app for myself to solve my own problmes. It's not meant to be an online app. It's designed for single user who like text user interface. If you really need to share your miniocs with someone else you can export and have that person import. If someone wanted a full gui app that does what minidoc does, then there are plenty of apps out there that are cloud native.

Documentation

Index

Constants

View Source
const (
	DIRECTION_NONE = iota
	DOWN
	UP
)

Variables

This section is empty.

Functions

func ConfirmDeleteModal

func ConfirmDeleteModal(s *Search, json interface{}, deleteFunc func(doc MiniDoc) error)

func ConfirmationModal

func ConfirmationModal(app *SimpleApp, message string, action func())

func CreateGeneratedDirIfNotFound added in v0.1.11

func CreateGeneratedDirIfNotFound() string

func CreateMinidocHomeIfNotFound added in v0.1.8

func CreateMinidocHomeIfNotFound() string

func DeleteFile

func DeleteFile(filepath string) (success bool)

func DocumentMapping

func DocumentMapping(indexedFields []string, excludedFields []string) *mapping.DocumentMapping

func DoesBinaryExists

func DoesBinaryExists(binary string) bool

func Exec

func Exec(args []string) error

Exec exec.Command

func Execute

func Execute(args []string) (string, error)

Execute execute

func ExtractFieldValues

func ExtractFieldValues(jh *JsonMapWrapper, f *tview.Form)

func GetCheckBoxChecked

func GetCheckBoxChecked(form *tview.Form, label string) bool

func GetInputValue

func GetInputValue(form *tview.Form, label string) *string

func GetMiniDocGenDir added in v0.1.11

func GetMiniDocGenDir() string

func GetParentPath added in v0.1.11

func GetParentPath(childPath string) string

func HTTPGet added in v0.1.11

func HTTPGet(url string) ([]byte, error)

func ImportFile added in v0.1.11

func ImportFile(str string, s *Search) bool

func ImportFromWeb added in v0.1.11

func ImportFromWeb(str string, s *Search) bool

func ImportLineByLine added in v0.1.11

func ImportLineByLine(line string, s *Search) bool

func IndexMapping

func IndexMapping() (*mapping.IndexMappingImpl, error)

func JsonMapFrom

func JsonMapFrom(minidoc MiniDoc) interface{}

func NewCell

func NewCell(reference interface{}, text string, color tcell.Color) *tview.TableCell

func NewCellWithBG

func NewCellWithBG(reference interface{}, text string, color, bg tcell.Color) *tview.TableCell

func NewDocFlow

func NewDocFlow(doctype string, app *SimpleApp) error

func NewEditForm

func NewEditForm(s *Search, doc MiniDoc) *tview.Form

func NewFormWithFields

func NewFormWithFields(doc MiniDoc) *tview.Form

func NewLoggingRows

func NewLoggingRows() *tview.Table

func NextSequence

func NextSequence(bx *buckets.DB, sequenceName string) ([]byte, error)

NextSequence returns next sequence

func OpenFileIfNoneExist

func OpenFileIfNoneExist(filepath, content string) error

func OpenVim

func OpenVim(app *SimpleApp, filepath string)

this works perfectly

func ReadFromFile

func ReadFromFile(filepath string) (string, error)

func Reindex

func Reindex(ih *IndexHandler, db *BucketHandler)

func ScreenScrape added in v0.1.12

func ScreenScrape(url string) (*xmlpath.Node, error)

ScreenScrape hits the given URL and screen scrape then return dom like object for searching

func SearchByXPath added in v0.1.12

func SearchByXPath(context *xmlpath.Node, xpath string) []*xmlpath.Node

SearchByXPath will walk down the node and children using xpath expression

func SingleEntryModalForm added in v0.1.12

func SingleEntryModalForm(title, label, value string, width, height int) (*tview.Form, *tview.InputField, *tview.Pages)

func Transpose added in v0.1.12

func Transpose(line string, s *Search) string

func WriteToFile

func WriteToFile(filepath, content string) (done bool)

func XPathGet added in v0.1.12

func XPathGet(context *xmlpath.Node, xpath string, index int) string

XPathGet xpath get by index

Types

type BaseDoc

type BaseDoc struct {
	CreatedDate string `json:"created_date"`
	ID          uint32 `json:"id"`
	Type        string `json:"type"`
	Title       string `json:"title"`
	Description string `json:"description"`
	Tags        string `json:"tags"`
	Fragments   string `json:"-"`
	Selected    bool   `json:"-"`
	Toggled     bool   `json:"-"`
}

func (*BaseDoc) GetAvailableActions

func (M *BaseDoc) GetAvailableActions() string

func (*BaseDoc) GetDescription

func (m *BaseDoc) GetDescription() string

func (*BaseDoc) GetDisplayFields

func (m *BaseDoc) GetDisplayFields() []string

func (*BaseDoc) GetEditFields

func (m *BaseDoc) GetEditFields() []string

func (*BaseDoc) GetID

func (m *BaseDoc) GetID() uint32

func (*BaseDoc) GetIDString

func (m *BaseDoc) GetIDString() string

func (*BaseDoc) GetJSON

func (m *BaseDoc) GetJSON() interface{}

func (*BaseDoc) GetMarkdown

func (m *BaseDoc) GetMarkdown() string

func (*BaseDoc) GetSearchFragments

func (m *BaseDoc) GetSearchFragments() string

func (*BaseDoc) GetTags

func (m *BaseDoc) GetTags() string

func (*BaseDoc) GetTitle

func (m *BaseDoc) GetTitle() string

func (*BaseDoc) GetToggle

func (m *BaseDoc) GetToggle() bool

func (*BaseDoc) GetToggleValueAsString

func (m *BaseDoc) GetToggleValueAsString() string

func (*BaseDoc) GetType

func (m *BaseDoc) GetType() string

func (*BaseDoc) GetViEditFields

func (m *BaseDoc) GetViEditFields() []string

func (*BaseDoc) HandleEvent

func (m *BaseDoc) HandleEvent(event *tcell.EventKey)

func (*BaseDoc) IsSelected

func (m *BaseDoc) IsSelected() bool

func (*BaseDoc) IsSelectedString

func (m *BaseDoc) IsSelectedString() string

func (*BaseDoc) IsTogglable

func (m *BaseDoc) IsTogglable() bool

func (*BaseDoc) SetCreatedDate

func (m *BaseDoc) SetCreatedDate(createdDate string)

func (*BaseDoc) SetID

func (m *BaseDoc) SetID(ID uint32)

func (*BaseDoc) SetIsSelected

func (m *BaseDoc) SetIsSelected(selected bool)

func (*BaseDoc) SetSearchFragments

func (m *BaseDoc) SetSearchFragments(fragments string)

func (*BaseDoc) SetTags

func (m *BaseDoc) SetTags(tags string)

func (*BaseDoc) SetToggle

func (m *BaseDoc) SetToggle(toggle bool)

func (*BaseDoc) SetType

func (m *BaseDoc) SetType(doctype string)

type BucketHandler

type BucketHandler struct {
	DBPath string
	// contains filtered or unexported fields
}

func NewBucketHandler

func NewBucketHandler(opts ...BucketHandlerOption) *BucketHandler

func (*BucketHandler) Delete

func (bh *BucketHandler) Delete(doc MiniDoc) error

func (*BucketHandler) Read

func (bh *BucketHandler) Read(key uint32, doctype string) (MiniDoc, error)

func (*BucketHandler) ReadAll

func (bh *BucketHandler) ReadAll(doctype string) ([]MiniDoc, error)

func (*BucketHandler) Write

func (bh *BucketHandler) Write(doc MiniDoc) (uint32, error)

type BucketHandlerOption

type BucketHandlerOption func(*BucketHandler)

func WithBucketHandlerDBPath

func WithBucketHandlerDBPath(path string) BucketHandlerOption

func WithBucketHandlerDebug

func WithBucketHandlerDebug(debug func(string)) BucketHandlerOption

type CellData

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

type DataHandler

type DataHandler struct {
	BucketHandler *BucketHandler
	IndexHandler  *IndexHandler
}

func (*DataHandler) Delete

func (dh *DataHandler) Delete(doc MiniDoc) error

func (*DataHandler) Write

func (dh *DataHandler) Write(doc MiniDoc) (uint32, error)

type DebugView

type DebugView struct {
	App       *SimpleApp
	Layout    *tview.Flex
	Rows      *tview.Table
	IsDebugOn bool
}

func NewDebugView

func NewDebugView(app *SimpleApp) *DebugView

func (*DebugView) Debug

func (d *DebugView) Debug(message string)

type Edit

type Edit struct {
	Form   *tview.Form
	Search *Search
	// contains filtered or unexported fields
}

func (*Edit) CancelAction

func (e *Edit) CancelAction()

func (*Edit) DeleteAction

func (e *Edit) DeleteAction()

func (*Edit) UpdateAction

func (e *Edit) UpdateAction()

type Error

type Error int
const (
	ErrorGeneric Error = iota
	ErrorCSVDoesNotExist
)

func (Error) Error

func (e Error) Error() string

type Help

type Help struct {
	App *SimpleApp

	Content *tview.TextView
	// contains filtered or unexported fields
}

func NewHelp

func NewHelp() *Help

func (*Help) GetInstance added in v0.1.12

func (h *Help) GetInstance() interface{}

func (*Help) Page

func (h *Help) Page() (title string, content tview.Primitive)

func (*Help) SetApp

func (h *Help) SetApp(app *SimpleApp)

type IndexHandler

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

func NewIndexHandler

func NewIndexHandler(opts ...IndexHandlerOption) *IndexHandler

func (*IndexHandler) Delete

func (ih *IndexHandler) Delete(doc MiniDoc) error

func (*IndexHandler) Index

func (ih *IndexHandler) Index(doc MiniDoc) error

func (*IndexHandler) Search

func (ih *IndexHandler) Search(queryString string) ([]MiniDoc, string)

indexCmd will index given csv file

type IndexHandlerOption

type IndexHandlerOption func(*IndexHandler)

func WithIndexHandlerDebug

func WithIndexHandlerDebug(debug func(string)) IndexHandlerOption

func WithIndexHandlerIndexPath

func WithIndexHandlerIndexPath(indexPath string) IndexHandlerOption

type JsonMapWrapper

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

func NewJsonMapWrapper

func NewJsonMapWrapper(jsonMap interface{}) *JsonMapWrapper

type MiniDoc

type MiniDoc interface {
	GetID() uint32
	SetID(uint32)
	GetIDString() string
	GetType() string
	SetType(string)
	GetTitle() string
	GetDescription() string
	GetTags() string
	SetTags(string)
	GetSearchFragments() string
	SetSearchFragments(string)
	GetJSON() interface{}
	SetCreatedDate(string)
	GetDisplayFields() []string
	GetEditFields() []string
	IsSelected() bool
	SetIsSelected(bool)
	IsSelectedString() string
	HandleEvent(event *tcell.EventKey)
	GetMarkdown() string
	GetAvailableActions() string
	GetViEditFields() []string
	GetToggleValueAsString() string
	SetToggle(toggle bool)
	GetToggle() bool
	IsTogglable() bool
}

func EditWithVim

func EditWithVim(app *SimpleApp, doc MiniDoc) (MiniDoc, bool)

func MiniDocFrom

func MiniDocFrom(jsonMap interface{}) (MiniDoc, error)

func NewDoc

func NewDoc(doctype string) (MiniDoc, error)

type New

type New struct {
	App    *SimpleApp
	Layout *tview.Flex
	Form   *tview.Form

	IndexHandler  *IndexHandler
	BucketHandler *BucketHandler
	// contains filtered or unexported fields
}

func NewNewPage

func NewNewPage(doc MiniDoc) *New

func (*New) CancelAction

func (n *New) CancelAction()

func (*New) CreateAction

func (n *New) CreateAction()

func (*New) GetInstance added in v0.1.12

func (n *New) GetInstance() interface{}

func (*New) Page

func (n *New) Page() (title string, content tview.Primitive)

func (*New) SetApp

func (n *New) SetApp(app *SimpleApp)

type Node added in v0.1.11

type Node struct {
	Text     string
	Path     string
	Expand   bool
	Selected func()
	Children []*Node
}

func NewDirNode added in v0.1.11

func NewDirNode(info os.FileInfo, path string) *Node

func NewFileNode added in v0.1.11

func NewFileNode(info os.FileInfo, path string) *Node

type NoteDoc

type NoteDoc struct {
	BaseDoc
	Note string `json:"note"`
}

-------------------------------------------------------------------------------- Note Doc --------------------------------------------------------------------------------

func (*NoteDoc) GetAvailableActions

func (d *NoteDoc) GetAvailableActions() string

func (*NoteDoc) GetDisplayFields

func (d *NoteDoc) GetDisplayFields() []string

func (*NoteDoc) GetEditFields

func (d *NoteDoc) GetEditFields() []string

func (*NoteDoc) GetJSON

func (d *NoteDoc) GetJSON() interface{}

func (*NoteDoc) GetMarkdown

func (d *NoteDoc) GetMarkdown() string

func (*NoteDoc) GetViEditFields

func (d *NoteDoc) GetViEditFields() []string

type PageFunc

type PageFunc func() (title string, content tview.Primitive)

Page object represent a page for Pages

type PageItem

type PageItem interface {
	Page() (title string, content tview.Primitive)
	SetApp(*SimpleApp)
	GetInstance() interface{}
}

type PagesHandler

type PagesHandler struct {
	Pages         *tview.Pages
	PageIndex     map[string]string
	MenuBar       *tview.TextView
	CurrPageIndex int
	PageItems     []PageItem
	PrevMenuText  string
}

PagesHandler handles Pages

func (*PagesHandler) AddPage

func (p *PagesHandler) AddPage(s *SimpleApp, pi PageItem)

func (*PagesHandler) GetPageItem added in v0.1.12

func (p *PagesHandler) GetPageItem(title string) PageItem

func (*PagesHandler) GoToNextPage

func (p *PagesHandler) GoToNextPage()

GoToNextPage goes to next page

func (*PagesHandler) GoToPrevPage

func (p *PagesHandler) GoToPrevPage()

GoToPrevPage goes to previous page

func (*PagesHandler) GotoPageByTitle

func (p *PagesHandler) GotoPageByTitle(title string)

GotoPageByTitle goes to page with specified title

func (*PagesHandler) HasPage

func (p *PagesHandler) HasPage(title string) bool

func (*PagesHandler) LoadPages

func (p *PagesHandler) LoadPages(s *SimpleApp)

LoadPages loads pages

func (*PagesHandler) RemoveLastPage

func (p *PagesHandler) RemoveLastPage(s *SimpleApp)

func (*PagesHandler) UnloadPages

func (p *PagesHandler) UnloadPages()

UnloadPages unload pages

type ResultList

type ResultList struct {
	*tview.Table
	Search *Search
}

func NewResultList

func NewResultList(s *Search) *ResultList

func (*ResultList) GetCellRefBool

func (rl *ResultList) GetCellRefBool(rowIndex, colIndex int) (bool, error)

func (*ResultList) GetCellRefString

func (rl *ResultList) GetCellRefString(rowIndex, colIndex int) (string, error)

func (*ResultList) GetCellRefUint32

func (rl *ResultList) GetCellRefUint32(rowIndex, colIndex int) (uint32, error)

func (*ResultList) InputCapture

func (rl *ResultList) InputCapture() func(event *tcell.EventKey) *tcell.EventKey

func (*ResultList) InsertColumns

func (rl *ResultList) InsertColumns(size int)

func (*ResultList) LoadMiniDocFromDB

func (rl *ResultList) LoadMiniDocFromDB(rowIndex int) (MiniDoc, error)

func (*ResultList) MoveRow

func (rl *ResultList) MoveRow(direction int)

func (*ResultList) SetColumnCells

func (rl *ResultList) SetColumnCells(rowIndex int, cd []CellData)

func (*ResultList) UpdateRow

func (rl *ResultList) UpdateRow(row int, doc MiniDoc)
type Search struct {
	App             *SimpleApp
	SearchBar       *tview.Form
	Rows            *tview.Flex
	ResultList      *ResultList
	Detail          *tview.TextView
	Columns         *tview.Flex
	Layout          *tview.Flex
	IsEditMode      bool
	EditForm        *tview.Form
	CurrentRowIndex int

	RegionID     int
	RegionCount  int
	RegionDocIDs map[int]string
	Referenced   *tview.TextView
	// contains filtered or unexported fields
}

func NewSearch

func NewSearch() *Search

func (*Search) BatchDeleteActionFunc

func (s *Search) BatchDeleteActionFunc()

func (*Search) BatchDeleteConfirmation

func (s *Search) BatchDeleteConfirmation()

func (*Search) ClipboardCopy added in v0.1.12

func (s *Search) ClipboardCopy()

func (*Search) DelegateEventHandlingMiniDoc

func (s *Search) DelegateEventHandlingMiniDoc(event *tcell.EventKey) *tcell.EventKey

func (*Search) Edit

func (s *Search) Edit()

func (*Search) GetInstance added in v0.1.12

func (s *Search) GetInstance() interface{}

func (*Search) GoToPreview added in v0.1.12

func (s *Search) GoToPreview()

func (*Search) GoToSearchBar

func (s *Search) GoToSearchBar(clear bool, placeholder string)

func (*Search) GoToSearchResult

func (s *Search) GoToSearchResult()

func (*Search) HandleCommand

func (s *Search) HandleCommand(command string)

func (*Search) HideReferenced added in v0.1.12

func (s *Search) HideReferenced()

func (*Search) InitSearchBar

func (s *Search) InitSearchBar(placeholder string)

func (*Search) InputCapture

func (s *Search) InputCapture(input *tview.InputField) func(event *tcell.EventKey) *tcell.EventKey

func (*Search) LoadMiniDocFromDB

func (s *Search) LoadMiniDocFromDB(row int) (MiniDoc, error)

func (*Search) Notify added in v0.1.12

func (s *Search) Notify(title, text string)

func (*Search) Page

func (s *Search) Page() (title string, content tview.Primitive)

SearchPage returns search page

func (*Search) Preview

func (s *Search) Preview(direction int)

func (*Search) PreviewInputCapture added in v0.1.12

func (s *Search) PreviewInputCapture() func(event *tcell.EventKey) *tcell.EventKey

func (*Search) Search

func (s *Search) Search(searchby string) bool

func (*Search) SelectAllRows

func (s *Search) SelectAllRows()

func (*Search) SelectRow

func (s *Search) SelectRow(row int)

func (*Search) SetApp

func (s *Search) SetApp(app *SimpleApp)

func (*Search) ShowNextReferenced added in v0.1.12

func (s *Search) ShowNextReferenced()

func (*Search) ToggleAllRows

func (s *Search) ToggleAllRows()

func (*Search) ToggleSelected

func (s *Search) ToggleSelected()

func (*Search) ToggleTogglable

func (s *Search) ToggleTogglable()

func (*Search) UnLoadEdit

func (s *Search) UnLoadEdit()

func (*Search) UpdateCurrRowIndexFromSelectedRow

func (s *Search) UpdateCurrRowIndexFromSelectedRow(direction int)

func (*Search) UpdateResult

func (s *Search) UpdateResult(result []MiniDoc)

type SetAppAdapter

type SetAppAdapter struct{}

func (SetAppAdapter) GetInstance added in v0.1.12

func (a SetAppAdapter) GetInstance() interface{}

func (SetAppAdapter) SetApp

func (a SetAppAdapter) SetApp(app *SimpleApp)

type ShortcutKeyDoc

type ShortcutKeyDoc struct {
	BaseDoc
	ShortCutKey string `json:"shortcut"`
}

-------------------------------------------------------------------------------- ShortcutKey Doc --------------------------------------------------------------------------------

func (*ShortcutKeyDoc) GetDisplayFields

func (d *ShortcutKeyDoc) GetDisplayFields() []string

func (*ShortcutKeyDoc) GetEditFields

func (d *ShortcutKeyDoc) GetEditFields() []string

func (*ShortcutKeyDoc) GetJSON

func (d *ShortcutKeyDoc) GetJSON() interface{}

type SimpleApp

type SimpleApp struct {
	*tview.Application
	MenuBar      *tview.TextView
	StatusBar    *tview.TextView
	Layout       *tview.Flex
	Rows         *tview.Flex
	PagesHandler *PagesHandler
	DebugView    *DebugView
	PrevFocused  tview.Primitive

	IndexHandler  *IndexHandler
	BucketHandler *BucketHandler

	DataHandler *DataHandler
	// contains filtered or unexported fields
}

SimpleApp comes with the menu and debug pane

func NewSimpleApp

func NewSimpleApp(opts ...SimpleAppOption) *SimpleApp

func (*SimpleApp) ClearDebug

func (app *SimpleApp) ClearDebug()

func (*SimpleApp) ClearMenu

func (app *SimpleApp) ClearMenu()

func (*SimpleApp) Exit

func (app *SimpleApp) Exit()

func (*SimpleApp) GetInputCaptureFunc

func (app *SimpleApp) GetInputCaptureFunc() func(event *tcell.EventKey) *tcell.EventKey

func (*SimpleApp) GoToDebugView

func (app *SimpleApp) GoToDebugView()

func (*SimpleApp) SetStatus added in v0.1.11

func (app *SimpleApp) SetStatus(text string, rightsides ...string)

func (*SimpleApp) ToggleDebug

func (app *SimpleApp) ToggleDebug()

type SimpleAppOption

type SimpleAppOption func(*SimpleApp)

func WithSimpleAppConfirmExit

func WithSimpleAppConfirmExit(confirm bool) SimpleAppOption

func WithSimpleAppDataFolderPath

func WithSimpleAppDataFolderPath(path string) SimpleAppOption

func WithSimpleAppDebugOn

func WithSimpleAppDebugOn() SimpleAppOption

func WithSimpleAppDelegateKeyEvent

func WithSimpleAppDelegateKeyEvent(keyEvent func(event *tcell.EventKey) *tcell.EventKey) SimpleAppOption

func WithSimpleAppDocsReindexed

func WithSimpleAppDocsReindexed(reindex bool) SimpleAppOption

func WithSimpleAppPages

func WithSimpleAppPages(pages []PageItem) SimpleAppOption

type ToDoDoc

type ToDoDoc struct {
	BaseDoc
	Task   string `json:"task"`
	Detail string `json:"detail"`
	Done   bool   `json:"done"`
}

-------------------------------------------------------------------------------- TODO Doc --------------------------------------------------------------------------------

func (*ToDoDoc) GetAvailableActions

func (d *ToDoDoc) GetAvailableActions() string

func (*ToDoDoc) GetDisplayFields

func (d *ToDoDoc) GetDisplayFields() []string

func (*ToDoDoc) GetEditFields

func (d *ToDoDoc) GetEditFields() []string

func (*ToDoDoc) GetJSON

func (d *ToDoDoc) GetJSON() interface{}

func (*ToDoDoc) GetMarkdown

func (d *ToDoDoc) GetMarkdown() string

func (*ToDoDoc) GetTitle

func (d *ToDoDoc) GetTitle() string

func (*ToDoDoc) GetToggle

func (d *ToDoDoc) GetToggle() bool

func (*ToDoDoc) GetToggleValueAsString

func (d *ToDoDoc) GetToggleValueAsString() string

func (*ToDoDoc) GetViEditFields added in v0.1.12

func (d *ToDoDoc) GetViEditFields() []string

func (*ToDoDoc) HandleEvent

func (d *ToDoDoc) HandleEvent(event *tcell.EventKey)

func (*ToDoDoc) SetToggle

func (d *ToDoDoc) SetToggle(toggle bool)

type TreePage added in v0.1.11

type TreePage struct {
	Title        string
	Tree         *tview.TreeView
	RootNode     *Node
	SelectedNode *Node
	App          *SimpleApp
	Nodes        map[string]*Node
	Detail       *tview.TextView
	Columns      *tview.Flex
}

func NewTree added in v0.1.11

func NewTree() *TreePage

func (*TreePage) ConvertToTreeNode added in v0.1.11

func (t *TreePage) ConvertToTreeNode(target *Node, expanded bool) *tview.TreeNode

func (*TreePage) GetInstance added in v0.1.12

func (t *TreePage) GetInstance() interface{}

func (*TreePage) InputCapture added in v0.1.11

func (t *TreePage) InputCapture() func(event *tcell.EventKey) *tcell.EventKey

func (*TreePage) Page added in v0.1.11

func (t *TreePage) Page() (title string, content tview.Primitive)

TreeView demonstrates the tree view.

func (*TreePage) RefreshRootNode added in v0.1.11

func (t *TreePage) RefreshRootNode()

func (*TreePage) RenameFile added in v0.1.12

func (t *TreePage) RenameFile(app *SimpleApp, path string)

func (*TreePage) SetApp added in v0.1.11

func (t *TreePage) SetApp(app *SimpleApp)

func (*TreePage) Visit added in v0.1.11

func (t *TreePage) Visit() filepath.WalkFunc

func (*TreePage) WalkGenDirAsNode added in v0.1.11

func (t *TreePage) WalkGenDirAsNode(minidocGenDir string) *Node

type URLDoc

type URLDoc struct {
	BaseDoc
	URL        string `json:"url"`
	WatchLater bool   `json:"watch_later"`
}

-------------------------------------------------------------------------------- URL Doc --------------------------------------------------------------------------------

func (*URLDoc) GetAvailableActions

func (d *URLDoc) GetAvailableActions() string

func (*URLDoc) GetDisplayFields

func (d *URLDoc) GetDisplayFields() []string

func (*URLDoc) GetEditFields

func (d *URLDoc) GetEditFields() []string

func (*URLDoc) GetJSON

func (d *URLDoc) GetJSON() interface{}

func (*URLDoc) GetMarkdown

func (d *URLDoc) GetMarkdown() string

func (*URLDoc) GetToggle

func (d *URLDoc) GetToggle() bool

func (*URLDoc) GetToggleValueAsString

func (d *URLDoc) GetToggleValueAsString() string

func (*URLDoc) HandleEvent

func (d *URLDoc) HandleEvent(event *tcell.EventKey)

func (*URLDoc) SetToggle

func (d *URLDoc) SetToggle(toggle bool)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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