From 412c42b662fdb92a16e6f7735c8981319fe43234 Mon Sep 17 00:00:00 2001 From: kevin Date: Mon, 20 Nov 2023 15:04:08 -0800 Subject: [PATCH] Documentation --- README.md | 6 +++--- .../kotlin/com/vandenbreemen/ktt/main/WikiApplication.kt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 62fa8e5..23a3d88 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ WikiApplication.macroRegistry.register(myMacro) At the moment this is done in the WikiApplication.kt file. #### Data Storage in Macros -You'll note that the ```Macro``` interface's ```execute()``` method includes a ```SystemAccessInteractor``` argument. You can use this to store or retrieve data when your macro executes. +You'll note that the ```Macro``` interface's ```execute()``` method includes a ```SystemAccess``` argument. You can use this to store or retrieve data when your macro executes. ## Custom CSS You can customize the css for the wiki by updating the styling for the appropriate section of each page on the main screen (by going to ```/``` on the wiki). Note that for now css classes are used to control most of the styling. So, for example, the body of a wiki entry being displayed falls under css class ```.wiki_entry```. You can extend this system by adding more classes (see the ```Classes``` class). If you wish to make a given css class customizable simply add an entry for it to the StylesheetType enum, and provide the css class you wish to make customizable as constructor argument, as in: @@ -59,9 +59,9 @@ enum class StylesheetType(val cssClass: String) { ``` # Storage and Configuration -You can use the ```WikiApplication.systemAccessInteractor``` field to get a ```SystemAccessInteractor``` that lets you store data should you need to store or retrieve configurations etc. +You can use the ```WikiApplication.systemAccess``` field to get a ```SystemAccess``` that lets you store data should you need to store or retrieve configurations etc. -Generally, if you are modifying or maintaining this project, the SystemAccessInteractor should provide only a minimal set of features. This allows for the rest of the application to function smoothly without say someone's third party code messing around with wiki pages in the database. +Generally, if you are modifying or maintaining this project, the SystemAccess should provide only a minimal set of features. This allows for the rest of the application to function smoothly without say someone's third party code messing around with wiki pages in the database. # Libraries Used ## ktt diff --git a/src/main/kotlin/com/vandenbreemen/ktt/main/WikiApplication.kt b/src/main/kotlin/com/vandenbreemen/ktt/main/WikiApplication.kt index 98f074e..d1bad96 100644 --- a/src/main/kotlin/com/vandenbreemen/ktt/main/WikiApplication.kt +++ b/src/main/kotlin/com/vandenbreemen/ktt/main/WikiApplication.kt @@ -20,7 +20,7 @@ import com.vandenbreemen.ktt.web.startServer object WikiApplication { private val repository = SQLiteWikiRepository(("main.db")) - val systemAccessInteractor: SystemAccess = SystemAccessInteractor(repository) + val systemAccess: SystemAccess = SystemAccessInteractor(repository) private val pageRenderingPluginRegistry: PageRenderingPluginRegistry by lazy { PageRenderingPluginRegistry() @@ -29,7 +29,7 @@ object WikiApplication { @JvmStatic val macroRegistry: MacroRegistry by lazy { MacroRegistry().also { - pageRenderingPluginRegistry.register(MacrosPlugin(it, systemAccessInteractor)) + pageRenderingPluginRegistry.register(MacrosPlugin(it, systemAccess)) it.register(MacroRegistryMacro(it)) } }