+local Notes = {}
+
+local Util = require('util')
+local Configuration = require('configuration')
+local api = vim.api
+-------------------------------------------------------------------------------
+-- Internal Functions
+-------------------------------------------------------------------------------
+local function open_or_create_from_template(type, file_path)
+
+ local journal_file = io.open(file_path, 'r')
+ if not journal_file then
+ local template_contents = Configuration.load_template(type)
+
+ journal_file = io.open(file_path, 'w')
+ journal_file:write(template_contents)
+ journal_file:close()
+ end
+ vim.cmd('edit ' .. file_path)
+end
+
+local function open_periodic_note(type, filename)
+ local file_directory_path = Configuration.path_for(Configuration.configuration.periodic_locations[type])
+
+ Util.ensure_directory_exists(file_directory_path)
+ local file_path = Util.join(file_directory_path, filename)
+
+ open_or_create_from_template(type, file_path)
+end
+