orgstat-0.0.4: Statistics visualizer for org-mode

Safe HaskellNone
LanguageHaskell2010

OrgStat.Scope

Description

This module defines how report input is formed.

Synopsis

Documentation

newtype AstPath Source #

Path in org AST is just a list of paths, head ~ closer to tree root.

Constructors

AstPath 

Fields

existsPath :: AstPath -> Org -> Bool Source #

Checks if something is on that path in given Org.

data ScopeModifier Source #

Modificicators of org tree. They remove some subtrees

Constructors

ModPruneSubtree AstPath Int

Turns all subtrees starting with path and then on depth d into leaves.

ModFilterTag Text

Given text tag name, it leaves only those subtrees that have this tag (tags inherit).

ModSquash AstPath

Starting at node on path A and depth n, turn A into set of nodes Aa1a2...an. Doesn't work/make sense for empty path.

ModSelectSubtree AstPath

Leaves only node at path, deletes all other subtrees.

applyModifiers :: Org -> [ScopeModifier] -> Either ModifierError Org Source #

Generates an org to be processed by report generators from Scope.