reports

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateReportNote

func CreateReportNote() string

CreateReportNote creates a standard report note with generation time

func GenerateTimestamp

func GenerateTimestamp() string

GenerateTimestamp returns a formatted timestamp for report titles

func UploadReport

func UploadReport(ctx context.Context, client workflowy.Client, report ReportOutput, opts UploadOptions) (string, error)

Types

type ChildrenCountReportOutput

type ChildrenCountReportOutput struct {
	Ranked []workflowy.ChildrenCountRankable
	TopN   int
}

ChildrenCountReportOutput wraps children count ranking results

func (*ChildrenCountReportOutput) Title

func (r *ChildrenCountReportOutput) Title() string

Title returns the report title

func (*ChildrenCountReportOutput) ToNodes

func (r *ChildrenCountReportOutput) ToNodes() (*workflowy.Item, error)

ToNodes converts the ranking to Workflowy items

type CountReportOutput

type CountReportOutput struct {
	RootItem    *workflowy.Item
	Descendants workflowy.Descendants
	Threshold   float64
}

CountReportOutput wraps descendant count results for conversion to nodes

func (*CountReportOutput) Title

func (c *CountReportOutput) Title() string

Title returns the report title

func (*CountReportOutput) ToNodes

func (c *CountReportOutput) ToNodes() (*workflowy.Item, error)

ToNodes converts the count report to a tree of Workflowy items

type CreatedReportOutput

type CreatedReportOutput struct {
	Ranked []workflowy.TimestampRankable
	TopN   int
}

CreatedReportOutput wraps created date ranking results

func (*CreatedReportOutput) Title

func (r *CreatedReportOutput) Title() string

Title returns the report title

func (*CreatedReportOutput) ToNodes

func (r *CreatedReportOutput) ToNodes() (*workflowy.Item, error)

ToNodes converts the ranking to Workflowy items

type MirrorCountReportOutput added in v0.7.2

type MirrorCountReportOutput struct {
	Ranked []*mirror.MirrorInfo
	TopN   int
}

MirrorCountReportOutput wraps mirror count ranking results

func (*MirrorCountReportOutput) Title added in v0.7.2

func (r *MirrorCountReportOutput) Title() string

Title returns the report title

func (*MirrorCountReportOutput) ToNodes added in v0.7.2

func (r *MirrorCountReportOutput) ToNodes() (*workflowy.Item, error)

ToNodes converts the ranking to Workflowy items

type ModifiedReportOutput

type ModifiedReportOutput struct {
	Ranked []workflowy.TimestampRankable
	TopN   int
}

ModifiedReportOutput wraps modified date ranking results

func (*ModifiedReportOutput) Title

func (r *ModifiedReportOutput) Title() string

Title returns the report title

func (*ModifiedReportOutput) ToNodes

func (r *ModifiedReportOutput) ToNodes() (*workflowy.Item, error)

ToNodes converts the ranking to Workflowy items

type ReportOutput

type ReportOutput interface {
	// ToNodes converts the report to a tree of Workflowy items
	ToNodes() (*workflowy.Item, error)

	// Title returns the report title
	Title() string
}

ReportOutput represents a report that can be converted to Workflowy nodes

type UploadOptions

type UploadOptions struct {
	ParentID string // Where to create the report (default: "None" = root)
	Position string // "top" or "bottom" (optional)
}

Jump to

Keyboard shortcuts

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