orgstat-0.1.5: 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

Instances
Eq AstPath Source # 
Instance details

Defined in OrgStat.Scope

Methods

(==) :: AstPath -> AstPath -> Bool #

(/=) :: AstPath -> AstPath -> Bool #

Ord AstPath Source # 
Instance details

Defined in OrgStat.Scope

Show AstPath Source # 
Instance details

Defined in OrgStat.Scope

FromJSON AstPath # 
Instance details

Defined in OrgStat.Config

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 are inherited).

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.