orgstat-0.1.5: Statistics visualizer for org-mode

Safe HaskellNone
LanguageHaskell2010

OrgStat.Ast

Description

Abstract syntax tree for org.

Synopsis

Documentation

data Clock Source #

Org clock representation -- a pair of time in UTC. Should be local time in fact, but we'll assume that UTC timestamps support in org will be added at some point. For now all tags are to be read in local time.

Constructors

Clock 

Fields

Instances
Eq Clock Source # 
Instance details

Defined in OrgStat.Ast

Methods

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

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

Ord Clock Source # 
Instance details

Defined in OrgStat.Ast

Methods

compare :: Clock -> Clock -> Ordering #

(<) :: Clock -> Clock -> Bool #

(<=) :: Clock -> Clock -> Bool #

(>) :: Clock -> Clock -> Bool #

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

max :: Clock -> Clock -> Clock #

min :: Clock -> Clock -> Clock #

Show Clock Source # 
Instance details

Defined in OrgStat.Ast

Methods

showsPrec :: Int -> Clock -> ShowS #

show :: Clock -> String #

showList :: [Clock] -> ShowS #

data Org Source #

Main datatype of org AST. It may contain some metadata if needed (e.g. current node depth, children number etc). Content of headers is ignored.

Constructors

Org 
Instances
Eq Org Source # 
Instance details

Defined in OrgStat.Ast

Methods

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

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

Show Org Source # 
Instance details

Defined in OrgStat.Ast

Methods

showsPrec :: Int -> Org -> ShowS #

show :: Org -> String #

showList :: [Org] -> ShowS #

orgTotalDuration :: Org -> NominalDiffTime Source #

Calculate total clocks duration in org tree.

filterHasClock :: Org -> Org Source #

Remove subtrees that have zero total duration.

fmapOrgLens :: ASetter' Org a -> (a -> a) -> Org -> Org Source #

Functor-like fmap on field chosen by lens.

traverseTree :: Traversal' Org Org Source #

Traverses node and subnodes, all recursively. Bottom-top.

mergeClocks :: Org -> Org Source #

Merges task clocks that have less then 2m delta between them into one.