/* Config.js This script handle the save and restore of the 1) Blog post source 2) Blog post release (Merged with template) */ //Create the blog table if not exists requirelib("filelib"); newDBTableIfNotExists("blog"); function getBlogPostStore(){ var blogPostStorage = readDBItem("blog", "post-store"); if (blogPostStorage == ""){ //The blog post storage is not set. Use default blogPostStorage = "user:/Document/Blog/"; } //Create folder if not exists if (!filelib.fileExists(blogPostStorage)){ filelib.mkdir(blogPostStorage) } return blogPostStorage; } function setBlogPostStore(newpath){ return writeDBItem("blog", "post-store", newpath); } function getBlogReleasePath(){ return readDBItem("blog", "post-release"); } function setBlogReleasePath(newpath){ return writeDBItem("blog", "post-release", newpath); }