puffytools-0.0.0.1: A CLI assistant

Copyright2014, Peter Harpending
LicenseBSD3
MaintainerPeter Harpending <pharpend2@gmail.com>
Stabilityexperimental
PortabilityLinux
Safe HaskellNone
LanguageHaskell2010

PuffyTools.Slug

Description

These generate slugs (file names).

The slug must be alphanumeric, with the exception of "-_". It also must be between 4 and 32 chars long.

Synopsis

Documentation

data Slug Source

Newtype wrapper for String

mkSlugMaybe :: Text -> Maybe Slug Source

Maybe make a Slug

mkSlugEither :: Text -> Either String Slug Source

Try to make a Slug, return an error if I can't

mkRandomSlug :: IO Slug Source

Generates a random slug 32 chars long

slugAcceptChars :: String Source

Acceptable characters for a slug