zettelkast-0.1.0.0: Command-line utility for working with zettelkast files

Safe HaskellSafe
LanguageHaskell2010

Data.ZettelID

Synopsis

Documentation

data ZettelID Source #

Uniquely identifying zettel

Constructors

ZettelID 

Fields

Instances
Eq ZettelID Source # 
Instance details

Defined in Data.ZettelID

Ord ZettelID Source # 
Instance details

Defined in Data.ZettelID

Show ZettelID Source # 
Instance details

Defined in Data.ZettelID

render :: ZettelID -> Text Source #

Render a zettel id as a text

The rendered id is "%y%m%d0000" where the latter number is the counter. For example the second zettel for 11.6.2020 would be "2006110002"

parse :: Text -> Maybe ZettelID Source #

Parse the rendered zetteled id back into a ZettelID

See render for the format

toPath :: ZettelID -> Path Dir File Source #

Convert a zettel id into a filename

fromPath :: Path a File -> Maybe ZettelID Source #

Parse a filename into a zettel id

createZettelID :: Set ZettelID -> Day -> Maybe ZettelID Source #

Create a new unique zettel id