Add a diary frequency option (#884)

* Add diary_frequency parameter to wikis

* Create diary entries according to the frequency

* Update date validation

* Use timestamps, extract abstract yesterday and today as day-long periods

* Revert old changes

* Remove debug log

* Start the week any day

* Add monthly and yearly options

* Cleanup
This commit is contained in:
Jérémy Caldas
2020-07-21 19:21:43 +02:00
committed by GitHub
parent 45b7515b88
commit a3be479d5a
4 changed files with 86 additions and 7 deletions

View File

@ -363,6 +363,8 @@ function! s:populate_wikilocal_options() abort
\ 'css_name': {'type': type(''), 'default': 'style.css', 'min_length': 1},
\ 'custom_wiki2html': {'type': type(''), 'default': ''},
\ 'custom_wiki2html_args': {'type': type(''), 'default': ''},
\ 'diary_frequency': {'type': type(''), 'default': 'daily', 'possible_values': ['daily', 'weekly', 'monthly', 'yearly']},
\ 'diary_start_week_day': {'type': type(''), 'default': 'monday', 'possible_values': ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']},
\ 'diary_header': {'type': type(''), 'default': 'Diary', 'min_length': 1},
\ 'diary_index': {'type': type(''), 'default': 'diary', 'min_length': 1},
\ 'diary_rel_path': {'type': type(''), 'default': 'diary/', 'min_length': 0},