Safe Haskell | None |
---|---|
Language | Haskell2010 |
- readcsv :: Char -> Text -> [[Text]]
- readcsvrow :: Char -> Text -> [Text]
- p_csvrow :: Char -> Parser [Text]
- p_csvfield :: Char -> Parser Text
- p_csvstring :: Parser String
- escapedDoubleQuotes :: IsString p => p
- parens :: Parsec Text () Int
- testdbacl :: IO ()
- dbacl_parse :: [AccountName] -> String -> Either ParseError [(AccountName, String)]
- dbacl_parser :: [AccountName] -> Parsec String () [(AccountName, [String])]
- idx :: (Eq a, Show a) => [a] -> a -> Int
- saveChanges :: (MonadReader (Options User config env) m, MonadIO m) => Maybe Journal -> (Journal -> (Journal, Integer)) -> m Journal
- mixed' :: Amount -> MixedAmount
- showTransactions :: Journal -> [Char]
- jTrans :: Lens' Journal [Transaction]
- tPosts :: Lens' Transaction [Posting]
- pAcc :: Lens' Posting AccountName
- changeTransaction :: [(Transaction, Transaction)] -> Journal -> (Journal, Integer)
- countUpdates :: Traversal' s a -> (a -> Maybe a) -> s -> (s, Integer)
- data WithSource a = WithSource {}
- extractSource :: ImportTag -> Transaction -> Either String (WithSource ())
- injectSource :: ImportTag -> Source -> Transaction -> Transaction
- commentPrefix :: ImportTag -> Text
- trimnl :: Text -> Text
- type MyRecord = HashMap Text Text
- stripCsv :: ([Text], [MyRecord]) -> ([Text], [MyRecord])
- parseCsv :: Char -> Text -> ([Text], [MyRecord])
- getCsvCreditDebit :: Text -> Text -> MyRecord -> Text
- getCsvConcat :: [Text] -> MyRecord -> Text
- getCsvConcatDescription :: env -> [Description env] -> MyRecord -> Text
- getCsv :: Text -> MyRecord -> Text
- data ImportedEntry' a s = ImportedEntry {
- ieT :: Transaction
- iePostings :: a
- ieSource :: s
- type ImportedEntry = ImportedEntry' [(AccountId, Text, Maybe Text, Bool)] Source
- type FilledEntry = ImportedEntry' () Source
- fromFilled :: FilledEntry -> Entry
- type Entry = ImportedEntry' () (Either String Source)
- genTrans :: Day -> Maybe Day -> Text -> Transaction
- normalizeMixedAmountWith :: (Amount -> Decimal) -> MixedAmount -> MixedAmount
- data Importer env = Importer {
- iModifyHandle :: Maybe (Handle -> IO ())
- iImport :: Text -> CommonM (env, Maybe Version) [ImportedEntry]
- windoof :: Maybe (Handle -> IO ())
- parseDate :: String -> Text -> Day
- parseDateM :: Monad m => String -> Text -> m Day
- parseDateDE :: Text -> Day
- parseDateUS :: Text -> Day
- type Getter a = MyRecord -> a
- data CsvPostingImport = CsvPosting {}
- data CsvImport env = CSV {}
- data Description env
- toField :: Description env -> Maybe Text
- data CheckedCsvImport a = UnsafeCSV {}
- toVersionedCSV :: SFormat DefaultVersion -> [CsvImport a] -> VersionedCSV a
- type VersionedCSV env = forall m. MonadError Msg m => m (SFormat DefaultVersion, Map Version (CheckedCsvImport env))
- data DefaultVersion = DefaultVersion {}
- checkRawCSV :: SFormat b -> CsvImport a -> CheckedCsvImport a
- table :: [Int] -> [Text] -> [[Text]] -> Box
- table1 :: NonEmpty [Box] -> Box
- table2 :: [Int] -> [Text] -> [[Text]] -> NonEmpty [Box]
- mlen :: ListLike l e => [l] -> Int
- text' :: Text -> Box
- loadJournal :: (MonadError Msg m, MonadIO m) => [Ledgers -> Maybe FilePath] -> Options User config env -> m Journal
- module Buchhaltung.Utils
- module Buchhaltung.Types
- textstrip :: Text -> Text
CONFIGURATION
CSV PARSER
escapedDoubleQuotes :: IsString p => p Source #
dbacl output parser
dbacl_parse :: [AccountName] -> String -> Either ParseError [(AccountName, String)] Source #
parse dbacl output (see testdbacl for the format of dbacl's output)
dbacl_parser :: [AccountName] -> Parsec String () [(AccountName, [String])] Source #
Utilities
Dates
:: (MonadReader (Options User config env) m, MonadIO m) | |
=> Maybe Journal | |
-> (Journal -> (Journal, Integer)) | modifier, returning number of changed |
-> m Journal |
Read the journal file again, before applying Changes (to not overwrite possible changes, that were made in the mean time) saveChanges :: String -- ^ journal path -> (Journal-> (Journal, Integer)) -> IO Journal
mixed' :: Amount -> MixedAmount Source #
showTransactions :: Journal -> [Char] Source #
Lenses
changeTransaction :: [(Transaction, Transaction)] -> Journal -> (Journal, Integer) Source #
replaces every matching transaction in the given journal counts the number of changed transactions
countUpdates :: Traversal' s a -> (a -> Maybe a) -> s -> (s, Integer) Source #
Update a traversal and count the number of updates
data WithSource a Source #
extractSource :: ImportTag -> Transaction -> Either String (WithSource ()) Source #
extracts the source line from a Transaction
injectSource :: ImportTag -> Source -> Transaction -> Transaction Source #
commentPrefix :: ImportTag -> Text Source #
make CSV data easier to handle
getCsvConcatDescription :: env -> [Description env] -> MyRecord -> Text Source #
Import Types
data ImportedEntry' a s Source #
ImportedEntry | |
|
type ImportedEntry Source #
type FilledEntry = ImportedEntry' () Source Source #
fromFilled :: FilledEntry -> Entry Source #
genTrans :: Day -> Maybe Day -> Text -> Transaction Source #
helper function to create transaction for ImportedEntry
normalizeMixedAmountWith :: (Amount -> Decimal) -> MixedAmount -> MixedAmount Source #
parseDateDE :: Text -> Day Source #
parseDateUS :: Text -> Day Source #
data CsvPostingImport Source #
toVersionedCSV :: SFormat DefaultVersion -> [CsvImport a] -> VersionedCSV a Source #
type VersionedCSV env Source #
= MonadError Msg m | |
=> m (SFormat DefaultVersion, Map Version (CheckedCsvImport env)) | (format with default version, _) |
checkRawCSV :: SFormat b -> CsvImport a -> CheckedCsvImport a Source #
Pretty Printing
loadJournal :: (MonadError Msg m, MonadIO m) => [Ledgers -> Maybe FilePath] -> Options User config env -> m Journal Source #
module Buchhaltung.Utils
module Buchhaltung.Types