File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -214,11 +214,20 @@ func getConfiguration() (conf Configuration) {
214
214
if err != nil {
215
215
log .Fatal ().Msgf ("cannot create empty config file at %s for config file: %v" , configFilePath , err )
216
216
}
217
- _ , err = f .WriteString ("DailyNotesPath: \n FilenameFormat: 2006_01_02\n " )
217
+ // initialize content with defaults
218
+ defaultValues := Configuration {
219
+ DailyNotesPath : "YOU MUST SET THIS to your journal folder" ,
220
+ FilenameFormat : "2006_01_02" ,
221
+ AddTimestamp : true ,
222
+ AddHashtag : true ,
223
+ HashtagToAdd : "from-cli" ,
224
+ }
225
+ defaultValuesB , _ := yaml .Marshal (defaultValues )
226
+ _ , err = f .Write (defaultValuesB )
218
227
if err != nil {
219
228
log .Fatal ().Msgf ("cannot add line to config file at %s for config file: %v" , configFilePath , err )
220
229
}
221
- log .Info ().Msgf ("minimal config file created at %s, you need to edit it to at least add the path to daily notes" , configFilePath )
230
+ log .Info ().Msgf ("minimal config file created at %s, you MUST now edit it to at least set the path to daily notes" , configFilePath )
222
231
os .Exit (2 )
223
232
} else {
224
233
log .Fatal ().Msgf ("cannot check for presence of the config file: %v" , err )
You can’t perform that action at this time.
0 commit comments