Copyright | 2014, Peter Harpending |
---|---|
License | BSD3 |
Maintainer | Peter Harpending <pharpend2@gmail.com> |
Stability | experimental |
Portability | Linux |
Safe Haskell | None |
Language | Haskell2010 |
- programName :: String
- journalExt :: String
- data Journal = Journal {}
- data Entry = Entry {}
- addEntry :: Journal -> Entry -> Journal
- mkEntry :: Text -> IO Entry
- mkJournal :: Slug -> IO Journal
- mkJournal' :: Text -> IO Journal
- generateJournalPath :: Journal -> IO FilePath
- generateSlugPath :: Slug -> IO FilePath
- writeJournal :: Journal -> IO ()
- readJournalName :: Text -> IO Journal
- readJournalDef :: Slug -> IO Journal
- readJournalFromFile :: FilePath -> IO Journal
- readJournalFromHandle :: Handle -> IO Journal
- listJournals :: IO [FilePath]
- listJournalFiles :: IO [FilePath]
- listJournalSlugs :: IO [Text]
- ifJournal :: Text -> IO () -> IO ()
- unlessJournal :: Text -> IO () -> IO ()
Documentation
A Journal is really a wrapper around a list of entries
Entries
mkJournal' :: Text -> IO Journal Source
Makes a journal, given a slug
generateJournalPath :: Journal -> IO FilePath Source
Figures out the file path for a journal
generateSlugPath :: Slug -> IO FilePath Source
writeJournal :: Journal -> IO () Source
Writes a journal to a file path
readJournalName :: Text -> IO Journal Source
Reads a journal from the default file path (~.puffytoolsjournal-title.json)
readJournalDef :: Slug -> IO Journal Source
Reads a journal from the default file path (~.puffytoolsjournal-title.json)
readJournalFromFile :: FilePath -> IO Journal Source
Reads a journal, given a file path
readJournalFromHandle :: Handle -> IO Journal Source
Reads a journal from a handle, close handle
listJournals :: IO [FilePath] Source
Deprecated: use listJournalFiles instead
listJournalFiles :: IO [FilePath] Source
List all of the journal file paths
listJournalSlugs :: IO [Text] Source
List all of the Journal slugs
unlessJournal :: Text -> IO () -> IO () Source
Perform some action if a given journal does not exist