backlog¶
Index¶
- func AddSibling(page logseq.Page, newBlock, before *content.Block, after ...*content.Block)
- func FormatCount(count int, singular, plural string) string
- func addTasksToCategories(jsonTasks []internal.TaskJSON, tasks *internal.CategorizedTasks, currentTime func() time.Time)
- func blockRefsFromPages(page logseq.Page) *set.Set[string]
- func defaultQuery(pageTitle string) string
- func nextChildHasPin(node content.Node) bool
- func printQuickCaptureURL(graph *logseq.Graph)
- func queryTasksFromPages(graph *logseq.Graph, api internal.LogseqAPI, pageTitles []string, currentTime func() time.Time) (*internal.CategorizedTasks, error)
- func queryTasksFromPagesConcurrent(api internal.LogseqAPI, pageTitles []string, tasks *internal.CategorizedTasks, finder internal.LogseqFinder, currentTime func() time.Time) (*internal.CategorizedTasks, error)
- func queryTasksFromPagesSequential(api internal.LogseqAPI, pageTitles []string, tasks *internal.CategorizedTasks, finder internal.LogseqFinder, currentTime func() time.Time) (*internal.CategorizedTasks, error)
- func queryTasksFromSinglePage(api internal.LogseqAPI, pageTitle string, finder internal.LogseqFinder) ([]internal.TaskJSON, error)
- func removeEmptyDividers(save bool, dividers ...*content.Block) bool
- type Backlog
- func NewBacklog(graph *logseq.Graph, api internal.LogseqAPI, reader ConfigReader, currentTime func() time.Time) Backlog
- type Config
- type ConfigReader
- func NewPageConfigReader(graph *logseq.Graph, configPage string) ConfigReader
- type Result
- func insertAndRemoveRefs(graph *logseq.Graph, pageTitle string, newBlockRefs, obsoleteBlockRefs, overdueBlockRefs, futureScheduledBlockRefs *set.Set[string]) (*Result, error)
- type SingleBacklogConfig
- type backlogImpl
- func (b *backlogImpl) Graph() *logseq.Graph
- func (b *backlogImpl) ProcessAll(partialNames []string) error
- func (b *backlogImpl) ProcessOne(pageTitle string, funcQueryRefs func() (*internal.CategorizedTasks, error)) (*Result, error)
- type pageConfigReader
- func (p *pageConfigReader) ReadConfig() (*Config, error)
func AddSibling¶
func FormatCount¶
FormatCount returns a string with the count and the singular or plural form of a word.
func addTasksToCategories¶
func addTasksToCategories(jsonTasks []internal.TaskJSON, tasks *internal.CategorizedTasks, currentTime func() time.Time)
addTasksToCategories adds tasks to the appropriate categories in CategorizedTasks.
func blockRefsFromPages¶
func defaultQuery¶
func nextChildHasPin¶
func printQuickCaptureURL¶
func queryTasksFromPages¶
func queryTasksFromPages(graph *logseq.Graph, api internal.LogseqAPI, pageTitles []string, currentTime func() time.Time) (*internal.CategorizedTasks, error)
queryTasksFromPages queries Logseq API for tasks from specified pages. It uses concurrent processing for multiple pages and sequential processing for a single page.
func queryTasksFromPagesConcurrent¶
func queryTasksFromPagesConcurrent(api internal.LogseqAPI, pageTitles []string, tasks *internal.CategorizedTasks, finder internal.LogseqFinder, currentTime func() time.Time) (*internal.CategorizedTasks, error)
queryTasksFromPagesConcurrent processes pages concurrently using goroutines.
func queryTasksFromPagesSequential¶
func queryTasksFromPagesSequential(api internal.LogseqAPI, pageTitles []string, tasks *internal.CategorizedTasks, finder internal.LogseqFinder, currentTime func() time.Time) (*internal.CategorizedTasks, error)
queryTasksFromPagesSequential processes pages sequentially (original implementation).
func queryTasksFromSinglePage¶
func queryTasksFromSinglePage(api internal.LogseqAPI, pageTitle string, finder internal.LogseqFinder) ([]internal.TaskJSON, error)
queryTasksFromSinglePage queries tasks from a single page and returns the JSON tasks.
func removeEmptyDividers¶
removeEmptyDividers removes empty dividers (no blocks under it) and returns true if any were removed.
type Backlog¶
type Backlog interface {
Graph() *logseq.Graph
ProcessAll(partialNames []string) error
ProcessOne(pageTitle string, funcQueryRefs func() (*internal.CategorizedTasks, error)) (*Result, error)
}
func NewBacklog¶
func NewBacklog(graph *logseq.Graph, api internal.LogseqAPI, reader ConfigReader, currentTime func() time.Time) Backlog
type Config¶
type ConfigReader¶
func NewPageConfigReader¶
NewPageConfigReader creates a new ConfigReader that reads the backlog configuration from a Logseq page.
type Result¶
func insertAndRemoveRefs¶
func insertAndRemoveRefs(graph *logseq.Graph, pageTitle string, newBlockRefs, obsoleteBlockRefs, overdueBlockRefs, futureScheduledBlockRefs *set.Set[string]) (*Result, error)
type SingleBacklogConfig¶
type backlogImpl¶
type backlogImpl struct {
graph *logseq.Graph
api internal.LogseqAPI
configReader ConfigReader
currentTime func() time.Time
}
func (*backlogImpl) Graph¶
func (*backlogImpl) ProcessAll¶
func (*backlogImpl) ProcessOne¶
func (b *backlogImpl) ProcessOne(pageTitle string, funcQueryRefs func() (*internal.CategorizedTasks, error)) (*Result, error)
type pageConfigReader¶
func (*pageConfigReader) ReadConfig¶
ReadConfig reads the backlog configuration from a Logseq page.
Generated by gomarkdoc