Add support for folder base journal.

Adds feature for issue #170 (and #398) where you configure your journal to
be a directory and entries are added as sub-directories and files:
yyyy/mm/dd.txt. Multiple entries in a day will go in the same file, but a
new entry for a specific day will create a new file (and directory
structure).

Fix failed test scenarios for folder journal.
This commit is contained in:
Craig Moyer 2017-01-13 19:55:41 -05:00
parent a3afa112ab
commit a3c81d46fe
5 changed files with 138 additions and 5 deletions

View file

@ -378,12 +378,9 @@ def open_journal(name, config, legacy=False):
return DayOneJournal.DayOne(**config).open()
else:
print(
f"[Error: {config['journal']} is a directory, but doesn't seem to be a DayOne journal either.",
file=sys.stderr,
)
from . import FolderJournal
sys.exit(1)
return FolderJournal.Folder(**config).open()
if not config["encrypt"]:
if legacy: