Module

Data.Text.Format.Org.Construct

Package
purescript-org-doc
Repository
shamansir/purescript-org-doc

#empty Source

empty :: OrgFile

Create empty OrgFile

#f Source

f :: OrgDoc -> OrgFile

Create OrgFile with empty meta and given OrgDoc as its root

#f_ Source

f_ :: Array (OrgKeyword String) -> Array (OrgProperty String) -> OrgDoc -> OrgFile

Create OrgFile with given meta keywords and properties and given OrgDoc as its root

#ds Source

ds :: Array Section -> OrgDoc

create OrgDoc from given Sections without any preceding blocks

#ds1 Source

ds1 :: Section -> OrgDoc

create OrgDoc from one given Section without any preceding blocks

#db Source

db :: Array Block -> OrgDoc

create OrgDoc from given Blocks without any following sections

#db1 Source

db1 :: Block -> OrgDoc

create OrgDoc from one given Block without any following sections

#dbs Source

dbs :: Array Block -> Array Section -> OrgDoc

create OrgDoc from given Blocks and Sections

#docf Source

docf :: OrgFile -> OrgDoc

Root document of the file

#docs Source

docs :: Section -> OrgDoc

Root document of the section

#blocks Source

blocks :: OrgDoc -> Array Block

Get all the zeroth blocks of given document

#sections Source

sections :: OrgDoc -> Array Section

Get all the sections of given document

#sectionsn Source

sectionsn :: OrgDoc -> Int

How many sections does this OrgDoc have

#blocksn Source

blocksn :: OrgDoc -> Int

How many blocks does this OrgDoc have

#meta_kw Source

meta_kw :: OrgKeyword String -> OrgFile -> OrgFile

Add meta keyword to the OrgFile as the last one

#meta_kw_ Source

meta_kw_ :: OrgKeyword String -> OrgFile -> OrgFile

Add meta keyword to the OrgFile as the first one

#meta_prop Source

meta_prop :: OrgProperty String -> OrgFile -> OrgFile

Add property to the OrgFile properties drawer as the last one

#meta_prop_ Source

meta_prop_ :: OrgProperty String -> OrgFile -> OrgFile

Add property to the OrgFile properties drawer as the first one

#ProgressStep Source

data ProgressStep

Constructors

#FinishStep Source

data FinishStep

Constructors

#item1 Source

#check Source

check :: Check -> Item -> Item

#count Source

count :: Int -> Item -> Item

#tagi Source

tagi :: String -> Item -> Item

#idrawer1 Source

#bdrawer1 Source

#joinB Source

joinB :: Block -> Block -> Block

join two blocks in one

#para Source

para :: Array Words -> Block

Block of a paragraph with given Words

#para1 Source

para1 :: Words -> Block

Block of a paragraph with a single instance of Words

#blank Source

blank :: Block

Block with no text inside

#br_blank Source

br_blank :: Block

Block only with a line break

#t Source

t :: Int -> Int -> Time

Create time from hours and minutes (exactly in this order) numbers with fallback to bottom of Enum for every invalid integer not in range

#t' Source

t' :: Int -> Int -> Int -> Time

Create time from hours and minutes and seconds (exactly in this order) numbers with fallback to bottom of Enum for every invalid integer not in range

#d Source

d :: Int -> Int -> Int -> Date

Create a canonical date from year, month and day (exactly in this order) numbers with fallback to bottom of Enum for every invalid integer not in range

#clock Source

#adate Source

adate :: Date -> OrgDateTime

active timestamp with given Date and no specific Time or repeat / delays

#idate Source

idate :: Date -> OrgDateTime

inactive timestamp with given Date and no specific Time or repeat / delays

#adatetime Source

adatetime :: Date -> Time -> OrgDateTime

active timestamp with given Date and given Time and no repeat / delays

#idatetime Source

idatetime :: Date -> Time -> OrgDateTime

inactive timestamp with given Date and given Time and no repeat / delays

#at_ Source

at_ :: Time -> OrgDateTime -> OrgDateTime

change Time of the timestamp

#fromto Source

fromto :: Time -> Time -> OrgDateTime -> OrgDateTime

change Time of the timestamp to given range

#chdate Source

chdate :: Date -> OrgDateTime -> OrgDateTime

change Dtae of the timestamp

#afromto Source

afromto :: Date -> Time -> Time -> OrgDateTime

active timestamp with given Date and given Time range and no repeat / delays

#ifromto Source

ifromto :: Date -> Time -> Time -> OrgDateTime

inactive timestamp with given Date and given Time range and no repeat / delays

#at Source

at :: OrgDateTime -> Words

Words contructed from this timestamp

#range Source

range :: OrgDateTime -> OrgDateTime -> Words

Words contructed from given timestamp

#sec Source

sec :: Int -> Array Words -> OrgDoc -> Section

Create Section of the level l with given array of Words as its heading and attach given OrgDoc to it

#sec1 Source

sec1 :: Int -> Words -> OrgDoc -> Section

Create Section of the level l with given Words as its heading and attach given OrgDoc to it

#sece Source

sece :: Int -> Array Words -> Section

Create empty Section (with empty OrgDoc in it) of the level l with given array of Words as its heading

#sece1 Source

sece1 :: Int -> Words -> Section

Create empty Section (with empty OrgDoc in it) of the level l with given Words as its heading

#ssec Source

ssec :: Int -> Array Words -> OrgDoc -> OrgDoc

Create OrgDoc with single Section only, of the level l with given array of Words as its heading

#ssec1 Source

ssec1 :: Int -> Words -> OrgDoc -> OrgDoc

Create OrgDoc with single Section only, of the level l with given Words as its heading

#sec_head Source

sec_head :: Array Words -> Section -> Section

Set heading of the Section

#sec_head' Source

sec_head' :: (NonEmptyArray Words -> NonEmptyArray Words) -> Section -> Section

Update heading of the Section

#sec_head1 Source

sec_head1 :: Words -> Section -> Section

Change heading of the Section

#sec_wdoc Source

sec_wdoc :: (OrgDoc -> OrgDoc) -> Section -> Section

Perform function over the OrgDoc inside the section

#drawer_add Source

drawer_add :: Array Words -> Drawer -> Drawer

Add words to the drawer

#sec_append_drawer Source

sec_append_drawer :: Drawer -> Section -> Section

Append drawer as the last one into the section

#at_r Source

at_r :: Time -> OrgTimeRange

create `Time`` range that starts at given time and never ends (it is the same as just stating a time)

#fromto_r Source

fromto_r :: Time -> Time -> OrgTimeRange

create `Time`` range that starts at given time and ends and given time

#with_kw Source

#At Source

data At :: (Type -> Type) -> Type -> Typedata At f a

AtBlock Block AtWords Words AtSection Section AtHeading Words AtProperty String String AtTag String String AtDrawer Drawer AtPriority Priority AtPlanning -- TODO

Constructors

#traverse Source

traverse :: forall b a (f :: Type -> Type). Unfoldable f => (f b -> f b -> f a) -> (At f a -> b) -> OrgDoc -> f a

#wdoc Source

wdoc :: (OrgDoc -> OrgDoc) -> OrgFile -> OrgFile

update OrgDoc inside the OrgFile with given function (there's only one root OrgDoc inside the file)

#cons_sec Source

cons_sec :: Section -> OrgDoc -> OrgDoc

add Section in front of other child sections in this OrgDoc

#snoc_sec Source

snoc_sec :: Section -> OrgDoc -> OrgDoc

add Section as the last of other child sections in this OrgDoc

#cons_bl Source

cons_bl :: Block -> OrgDoc -> OrgDoc

add Block in front of other child blocks in this OrgDoc in its zeroth section

#snoc_bl Source

snoc_bl :: Block -> OrgDoc -> OrgDoc

add Block as the last of other child blocks in this OrgDoc in its zeroth section

#wlast_bl Source

wlast_bl :: (Block -> Block) -> OrgDoc -> OrgDoc

Perform function over the last Block of OrgDoc when it exists, or leave the document as it is

#wlast_bl' Source

wlast_bl' :: (Block -> Block) -> Block -> OrgDoc -> OrgDoc

Perform function over the last Block of OrgDoc when it exists, or else put given block as the first one

#wlast_sec Source

wlast_sec :: (Section -> Section) -> OrgDoc -> OrgDoc

Perform function over the last Section of OrgDoc when it exists, or leave the document as it is

#wlast_sec' Source

wlast_sec' :: (Section -> Section) -> Section -> OrgDoc -> OrgDoc

Perform function over the last Section of OrgDoc when it exists, or else put given section as the first one

#wlast_bl_rec Source

wlast_bl_rec :: (Block -> Block) -> OrgDoc -> OrgDoc

Recursively (going into sections, unlike wlast_bl and wlast_bl') find the last block and call given function with it; if OrgDoc is empty, do nothing

#append_bl Source

append_bl :: Block -> OrgFile -> OrgFile

Ensure to append given block to the current end of the root document of the file

#append_bl' Source

append_bl' :: Block -> OrgDoc -> OrgDoc

Ensure to append given block to the end of the given document

#append_bl_sec Source

#inject_words Source

inject_words :: Array Words -> Block -> Block

If Block can directly contain words (Of, Drawer, Footnote, DetachedItem, Paragraph, WithKeyword, FixedWidth, but neither List or LogBook or Table or HR or LComment or ClockB) add given words to the end of the block

#parseDate Source

parseDate :: String -> Date

Parse date from yyyy-MM-dd string or init or fill it with zeroes on failure

#parseTime Source

parseTime :: String -> Time

Parse time from hh:mm or hh:mm:ss string or fill it with zeroes on failure

#__qset Source

__qset :: ({ check :: Maybe Check, comment :: Boolean, cookie :: Maybe Cookie, doc :: OrgDoc, drawers :: Array Drawer, heading :: NonEmptyArray Words, level :: Int, logbook :: Maybe LogBook, planning :: Planning, priority :: Maybe Priority, props :: OrgProperties String, tags :: Array String, todo :: Maybe Todo } -> { check :: Maybe Check, comment :: Boolean, cookie :: Maybe Cookie, doc :: OrgDoc, drawers :: Array Drawer, heading :: NonEmptyArray Words, level :: Int, logbook :: Maybe LogBook, planning :: Planning, priority :: Maybe Priority, props :: OrgProperties String, tags :: Array String, todo :: Maybe Todo }) -> Section -> Section

#__qplan Source

__qplan :: ({ closed :: Maybe OrgDateTime, deadline :: Maybe OrgDateTime, scheduled :: Maybe OrgDateTime, timestamp :: Maybe OrgDateTime } -> { closed :: Maybe OrgDateTime, deadline :: Maybe OrgDateTime, scheduled :: Maybe OrgDateTime, timestamp :: Maybe OrgDateTime }) -> Section -> Section

#__neaf Source

__neaf :: forall (a875 :: Type). a875 -> Array a875 -> NonEmptyArray a875