lqdsync

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateRanks

func CalculateRanks(backlogs map[string][]string, backlogOrder []string) map[string][]RankInfo

CalculateRanks assigns ranks for all (uuid, backlog) pairs. A task that appears in multiple backlogs gets one RankInfo per backlog.

func DiffRecords

func DiffRecords(
	existing, desired []map[string]any,
) ([]map[string]any, []map[string]any, []string)

DiffRecords compares existing PB records with desired records. Returns slices of records to create, update, and IDs to delete.

func TaskToRecord

func TaskToRecord(
	task logseqapi.TaskJSON, rank *RankInfo, enrichedTags string, currentTime func() time.Time,
) map[string]any

TaskToRecord converts a TaskJSON + optional RankInfo to a PocketBase record map.

Types

type RankInfo

type RankInfo struct {
	BacklogName  string
	BacklogIndex int
	Section      int // backlog.SectionRanked, SectionUnranked, or SectionOrphan
	Rank         int
}

RankInfo holds backlog rank data for a task.

Jump to

Keyboard shortcuts

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