PhiTux / DailyTxT

Encrypted Diary Web-App
https://hub.docker.com/r/phitux/dailytxt/
MIT License
217 stars 14 forks source link

Add an environment variable to indent the data files. #1

Closed bogosj closed 3 years ago

bogosj commented 3 years ago

I use git as a mechanism to do a nightly backup of my data/ directory. When viewing diffs (because who doesn't love looking at diffs of encrypted data) having the entire file exist on a single line makes it impossible to see what's going on.

I experimented with the output of my September notes (all plain text). The file went from about 100kb to 120kb when using an indent of 2.

Assuming you're OK with this change, I'm not sure if and how you'd want to document it.

PhiTux commented 3 years ago

Hi, that sounds like a really good idea :) Thanks for the pull request! I will look into it and probably merge it. It may take a few days though until I have time...

bogosj commented 3 years ago

Great, thanks. This should be backwards compatible, if the environment variable isn't set, None gets passed into the indent kwarg which results in the same output as before.

bogosj commented 3 years ago

Excellent, thanks for the quick review and publish .

PhiTux commented 3 years ago

You're welcome ;-)