Commit graph

11 commits

Author SHA1 Message Date
Martin Michlmayr
5b40134e83 CODE: Fix typo 2020-11-10 10:25:39 -05:00
Brett Smith
ba871ffe34 CODE: Update for db59d2fc8c. 2018-01-26 15:35:07 -05:00
Brett Smith
db59d2fc8c hooks.ledger_entry: Look up templates dynamically.
If there's a 'ledger entry' key in the entry data, use that value as the
name of the template to load.  Thanks to this, nbpy2017 could collapse
multiple importers into one.

Otherwise, build a default template name based on the importer source, and
try to use that.

All the configuration names now end with "ledger entry" instead of starting
with "template".  This makes it clearer what they're for, in case we
support other kinds of output templates in the future.

I ended up changing the names of some of the importers so the default
template name was nice, rather than specifying template names for all of
them, to reduce the amount of name discrepancies across the codebase.
2017-12-31 18:52:30 -05:00
Brett Smith
85b665200c hooks: Hooks declare what order they run in. 2017-12-30 18:11:41 -05:00
Brett Smith
18eebbc0ed hooks: run() return value controls processing of entry data.
Instead of using in-band signaling with the entry_data dict.
I don't know why I didn't think of this in the first place.
2017-12-19 10:19:56 -05:00
Brett Smith
fa35a70f9f CODE: Update main loop to reflect the template change in 34b71ba. 2017-12-19 10:17:15 -05:00
Brett Smith
b41a7a99af hooks: Filter entries by setting entry_data['_hook_cancel'] to True.
The current method only works for plain dicts and other simple mappings.
Mapping that may still contain items after .clear(), like ChainMap, can't
rely on the old method.
2017-12-19 09:13:44 -05:00
Brett Smith
34b71baaf7 template: render() takes a single mapping argument.
This lets it receive other mapping types like ChainMap.
2017-12-19 09:13:00 -05:00
Brett Smith
e249049fc1 util: Move module loader functions to a new dynload module. 2017-12-18 09:26:22 -05:00
Brett Smith
dd155749c3 CODE: Document how to run tests. 2017-10-26 12:19:16 -04:00
Brett Smith
c49371c87e CODE: Add a high-level overview of the program structure. 2017-10-25 17:17:41 -04:00