aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallery.nim30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/gallery.nim b/src/gallery.nim
index 7b4822f..d6857cc 100644
--- a/src/gallery.nim
+++ b/src/gallery.nim
@@ -242,13 +242,13 @@ proc main =
config.setSectionKey("Site", "Tags", "a list of tags for seo stuff")
config.setSectionKey("Site", "ShowOriginalsButton", "true")
config.setSectionKey("Site", "SymlinkOriginals", "false")
+ config.setSectionKey("Site", "EnableJS", "true")
config.setSectionKey("Thumbnails", "MediumMaxWidth", "1920")
config.setSectionKey("Thumbnails", "MediumMaxHeight", "1080")
config.setSectionKey("Thumbnails", "ThumbMaxWidth", "200")
config.setSectionKey("Thumbnails", "ThumbMaxHeight", "200")
config.setSectionKey("Thumbnails", "ThumbQuality", "90")
- config.setSectionKey("Thumbnails", "EnableJS", "true")
config.writeConfig(paramStr(1))
echo "Have written a default config to this file: " & paramStr(1)
@@ -260,20 +260,20 @@ proc main =
try:
var configFile = loadConfig(paramStr(1))
config = %* {
- "SourceDir": configFile.getSectionValue("", "SourceDir"),
- "TargetDir": configFile.getSectionValue("", "TargetDir"),
- "SiteName": configFile.getSectionValue("Site", "Name"),
- "SiteAuthor": configFile.getSectionValue("Site", "Author"),
- "SiteDescription": configFile.getSectionValue("Site", "Description"),
- "SiteTags": configFile.getSectionValue("Site", "Tags"),
- "SiteShowOrigBtn": configFile.getSectionValue("Site", "ShowOriginalsButton").parseBool, #not implemented yet
- "SiteSymlinkOrig": configFile.getSectionValue("Site", "SymlinkOriginals").parseBool, #not implemented yet
- "SiteEnableJS": configFile.getSectionValue("Site", "EnableJS").parseBool,
- "ThumbMediumMaxWidth": configFile.getSectionValue("Thumbnail", "MediumMaxWidth").parseInt, #not implemented yet
- "ThumbMediumMaxHeight": configFile.getSectionValue("Thumbnail", "MediumMaxHeight").parseInt, #not implemented yet
- "ThumbThumbMaxWidth": configFile.getSectionValue("Thumbnail", "ThumbMaxWidth").parseInt, #not implemented yet
- "ThumbThumbMaxHeight": configFile.getSectionValue("Thumbnail", "ThumbMaxHeight").parseInt, #not implemented yet
- "ThumbThumbQuality": configFile.getSectionValue("Thumbnail", "ThumbQuality").parseInt #not implemented yet
+ "SourceDir": configFile.getSectionValue("", "SourceDir"),
+ "TargetDir": configFile.getSectionValue("", "TargetDir"),
+ "SiteName": configFile.getSectionValue("Site", "Name"),
+ "SiteAuthor": configFile.getSectionValue("Site", "Author"),
+ "SiteDescription": configFile.getSectionValue("Site", "Description"),
+ "SiteTags": configFile.getSectionValue("Site", "Tags"),
+ "SiteShowOrigBtn": configFile.getSectionValue("Site", "ShowOriginalsButton").parseBool,
+ "SiteSymlinkOrig": configFile.getSectionValue("Site", "SymlinkOriginals").parseBool,
+ "SiteEnableJS": configFile.getSectionValue("Site", "EnableJS").parseBool,
+ "ThumbMediumMaxWidth": configFile.getSectionValue("Thumbnails", "MediumMaxWidth").parseInt,
+ "ThumbMediumMaxHeight": configFile.getSectionValue("Thumbnails", "MediumMaxHeight").parseInt,
+ "ThumbThumbMaxWidth": configFile.getSectionValue("Thumbnails", "ThumbMaxWidth").parseInt,
+ "ThumbThumbMaxHeight": configFile.getSectionValue("Thumbnails", "ThumbMaxHeight").parseInt,
+ "ThumbThumbQuality": configFile.getSectionValue("Thumbnails", "ThumbQuality").parseInt
}
except ValueError: