From ac0233a1620ac3fc4b65d44b7459e7b6a01f061e Mon Sep 17 00:00:00 2001 From: Suhas Date: Sat, 6 Feb 2021 20:24:55 -0500 Subject: [PATCH] behave test and dummy short exporter --- features/format.feature | 6 ++++++ jrnl/plugins/__init__.py | 1 + 2 files changed, 7 insertions(+) diff --git a/features/format.feature b/features/format.feature index b6dcede2..8d805184 100644 --- a/features/format.feature +++ b/features/format.feature @@ -1,5 +1,11 @@ Feature: Custom formats + Scenario: Short printing via --format flag + Given We use the config "pretty.yaml" + When we run "jrnl --format short -3" + Then we should get no error + And the output should be pretty printed + Scenario: Pretty Printing aka the Default Given We use the config "pretty.yaml" When we run "jrnl --format pretty -3" diff --git a/jrnl/plugins/__init__.py b/jrnl/plugins/__init__.py index dd4a9c5c..3eb4d5a2 100644 --- a/jrnl/plugins/__init__.py +++ b/jrnl/plugins/__init__.py @@ -28,6 +28,7 @@ __importers = [JRNLImporter] __exporter_types = {name: plugin for plugin in __exporters for name in plugin.names} __exporter_types["pretty"] = None +__exporter_types["short"] = None __importer_types = {name: plugin for plugin in __importers for name in plugin.names} EXPORT_FORMATS = sorted(__exporter_types.keys())