gitit-0.15.1.2: Wiki using happstack, git or darcs, and pandoc.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Network.Gitit.Util

Synopsis

Documentation

readFileUTF8 :: FilePath -> IO Text Source #

Read file as UTF-8 string. Encode filename as UTF-8.

inDir :: FilePath -> IO a -> IO a Source #

Perform a function a directory and return to working directory.

withTempDir :: FilePath -> (FilePath -> IO a) -> IO a Source #

Perform a function in a temporary directory and clean up.

orIfNull :: [a] -> [a] -> [a] Source #

Returns a list, if it is not null, or a backup, if it is.

splitCategories :: String -> [String] Source #

Split a string containing a list of categories.

trim :: String -> String Source #

Trim leading and trailing spaces.

yesOrNo :: Bool -> String Source #

Show Bool as "yes" or "no".