pandoc-3.7.0.2: Conversion between markup formats

Copyright | Copyright (C) 2013-2024 John MacFarlane
License | GNU GPL, version 2 or above
Maintainer | John MacFarlane <jgm@berkeley@edu>
Stability | alpha
Portability | portable
Safe Haskell | None
Language | Haskell2010

Text.Pandoc.Data

Description

Access to pandoc's data files.

Synopsis

- readDefaultDataFile :: PandocMonad m => FilePath -> m ByteString
- readDataFile :: PandocMonad m => FilePath -> m ByteString
- getDataFileNames :: IO [FilePath]
- defaultUserDataDir :: IO FilePath

# Documentation

readDefaultDataFile :: PandocMonad m => FilePath -> m ByteString #

Read file from the default data files.

readDataFile :: PandocMonad m => FilePath -> m ByteString #

getDataFileNames :: IO [FilePath] #

defaultUserDataDir :: IO FilePath #

Return appropriate user data directory for platform. We use XDG_DATA_HOME (or its default value), but for backwards compatibility, we fall back to the legacy user data directory ($HOME/.pandoc on *nix) if the XDG_DATA_HOME is missing and this exists. If neither directory is present, we return the XDG data directory. If the XDG data directory is not defined (e.g. because we are in an environment where $HOME is not defined), we return the empty string.