Documentation
¶
Index ¶
- type Container
- func (c *Container) CurrentNotebook() (*core.Notebook, error)
- func (c *Container) NewNoteEditor(notebook *core.Notebook) (*editor.Editor, error)
- func (c *Container) NewNoteFilter(opts fzf.NoteFilterOpts) *fzf.NoteFilter
- func (c *Container) Paginate(noPager bool, run func(out io.Writer) error) error
- func (c *Container) SetCurrentNotebook(searchDirs []Dirs) error
- type Dirs
- type Filtering
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { Version string Config core.Config Logger *util.ProxyLogger Terminal *term.Terminal FS *fs.FileStorage TemplateLoader core.TemplateLoader WorkingDir string Notebooks *core.NotebookStore // contains filtered or unexported fields }
func NewContainer ¶
func (*Container) CurrentNotebook ¶
CurrentNotebook returns the current default notebook.
func (*Container) NewNoteEditor ¶
func (*Container) NewNoteFilter ¶
func (c *Container) NewNoteFilter(opts fzf.NoteFilterOpts) *fzf.NoteFilter
func (*Container) Paginate ¶
Paginate creates an auto-closing io.Writer which will be automatically paginated if noPager is false, using the user's pager.
You can write to the pager only in the run callback.
func (*Container) SetCurrentNotebook ¶
SetCurrentNotebook sets the first notebook found in the given search paths as the current default one.
type Filtering ¶
type Filtering struct { Path []string `` /* 136-byte string literal not displayed */ Interactive bool `kong:"group='filter',short='i',help='Select notes interactively with fzf.'" json:"-"` Limit int `kong:"group='filter',short='n',placeholder='COUNT',help='Limit the number of notes found.'" json:"limit"` Match string `kong:"group='filter',short='m',placeholder='QUERY',help='Terms to search for in the notes.'" json:"match"` ExactMatch bool `` /* 129-byte string literal not displayed */ Exclude []string `` /* 142-byte string literal not displayed */ Tag []string `kong:"group='filter',short='t',help='Find notes tagged with the given tags.'" json:"tags"` Mention []string `kong:"group='filter',placeholder='PATH',help='Find notes mentioning the title of the given ones.'" json:"mention"` MentionedBy []string `kong:"group='filter',placeholder='PATH',help='Find notes whose title is mentioned in the given ones.'" json:"mentionedBy"` LinkTo []string `kong:"group='filter',short='l',placeholder='PATH',help='Find notes which are linking to the given ones.'" json:"linkTo"` NoLinkTo []string `kong:"group='filter',placeholder='PATH',help='Find notes which are not linking to the given notes.'" json:"-"` LinkedBy []string `kong:"group='filter',short='L',placeholder='PATH',help='Find notes which are linked by the given ones.'" json:"linkedBy"` NoLinkedBy []string `kong:"group='filter',placeholder='PATH',help='Find notes which are not linked by the given ones.'" json:"-"` Orphan bool `kong:"group='filter',help='Find notes which are not linked by any other note.'" json:"orphan"` Related []string `kong:"group='filter',placeholder='PATH',help='Find notes which might be related to the given ones.'" json:"related"` MaxDistance int `kong:"group='filter',placeholder='COUNT',help='Maximum distance between two linked notes.'" json:"maxDistance"` Recursive bool `kong:"group='filter',short='r',help='Follow links recursively.'" json:"recursive"` Created string `kong:"group='filter',placeholder='DATE',help:'Find notes created on the given date.'" json:"created"` CreatedBefore string `kong:"group='filter',placeholder='DATE',help='Find notes created before the given date.'" json:"createdBefore"` CreatedAfter string `kong:"group='filter',placeholder='DATE',help='Find notes created after the given date.'" json:"createdAfter"` Modified string `kong:"group='filter',placeholder='DATE',help='Find notes modified on the given date.'" json:"modified"` ModifiedBefore string `kong:"group='filter',placeholder='DATE',help='Find notes modified before the given date.'" json:"modifiedBefore"` ModifiedAfter string `kong:"group='filter',placeholder='DATE',help='Find notes modified after the given date.'" json:"modifiedAfter"` Sort []string `kong:"group='sort',short='s',placeholder='TERM',help='Order the notes by the given criterion.'" json:"sort"` }
Filtering holds filtering options to select notes.
func (Filtering) ExpandNamedFilters ¶
func (f Filtering) ExpandNamedFilters(filters map[string]string, expandedFilters []string) (Filtering, error)
ExpandNamedFilters expands recursively any named filter found in the Path field.
func (Filtering) NewNoteFindOpts ¶
NewNoteFindOpts creates an instance of core.NoteFindOpts from a set of user flags.
Click to show internal directories.
Click to hide internal directories.