diff --git a/albinos-editor/docs/technical_doc_editor.md b/albinos-editor/docs/technical_doc_editor.md new file mode 100644 index 0000000..012ab70 --- /dev/null +++ b/albinos-editor/docs/technical_doc_editor.md @@ -0,0 +1,43 @@ +# albinos_editor + +## Prerequisites + +Below is the list of prerequisites to compile albinos-editor on your machine: + +* Nim version 0.18 minimum +* Nimble + +## Getting Started + +These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. + +### Build + +To build the project please follow the instructions below: + +``` +nimble build +``` + +### Install + +To install the project please follow the instructions below: + +``` +nimble install +``` + +### Running the tests + +To run the tests for the project please follow the instructions below: + +``` +nimble test +``` + +## Architecture + +The albinos configuration editor works in a complementary way with `albinos daemon service`. + +The albinos editor binary comes with a dynamic library containing albinos API functionality, +This way when a client enters a command the function is directly called from the `dynamic library`. \ No newline at end of file diff --git a/albinos-editor/src/albinos_editor.nim b/albinos-editor/src/albinos_editor.nim index e947d04..79df585 100644 --- a/albinos-editor/src/albinos_editor.nim +++ b/albinos-editor/src/albinos_editor.nim @@ -1,6 +1,6 @@ import terminal import docopt -import albinospkg/gui +#import albinospkg/gui import albinospkg/cli import albinospkg/options @@ -13,9 +13,9 @@ when isMainModule: launchCLI($args["--load-config"]) else: launchCLI() - elif args["--gui"]: - styledEcho(fgCyan, "Launching GUI") - launchGUI() + #elif args["--gui"]: + # styledEcho(fgCyan, "Launching GUI") + # launchGUI() #var cfg : Config #var cfgp = addr cfg diff --git a/albinos-editor/src/albinospkg/cli.nim b/albinos-editor/src/albinospkg/cli.nim index e8e14f8..06d7378 100644 --- a/albinos-editor/src/albinospkg/cli.nim +++ b/albinos-editor/src/albinospkg/cli.nim @@ -44,7 +44,7 @@ var msgTable = englishTable proc globalHelpMsg() = var nocolor: bool = false - println(msgTable["usage"], bgr = bgDefault) + #println(msgTable["usage"], bgr = bgDefault) printLnBiCol(msgTable["help_cmd_msg"], colLeft = if nocolor == true: termwhite else: yellow, colRight = termwhite, sep = " ", xpos = 8) @@ -60,14 +60,14 @@ proc globalHelpMsg() = sep = " ", xpos = 8) printHL("", substr = "name", col = if nocolor == true: termwhite else: magenta) - printLn(" (create a config with the given name)", bgr = bgDefault) + # printLn(" (create a config with the given name)", bgr = bgDefault) printBiCol("config load", colLeft = if nocolor == true: termwhite else: yellow, colRight = if nocolor == true: termwhite else: dodgerblue, sep = " ", xpos = 8) printHL("", substr = "file", col = if nocolor == true: termwhite else: magenta) - printLn(" (load config from the key in the given file)", bgr = bgDefault) + #printLn(" (load config from the key in the given file)", bgr = bgDefault) printBiCol("setting update", colLeft = if nocolor == true: termwhite else: yellow, colRight = if nocolor == true: termwhite else: dodgerblue, @@ -76,8 +76,8 @@ proc globalHelpMsg() = true: termwhite else: magenta) printHL("", substr = "value", col = if nocolor == true: termwhite else: magenta) - printLn(" (update setting with the given name to the given value)", - bgr = bgDefault) + #printLn(" (update setting with the given name to the given value)", + # bgr = bgDefault) proc yes(question: string): bool = echo question, " (\e[93my\e[39m/\e[93mN\e[39m)" diff --git a/albinos-editor/src/ext/replxx.nim b/albinos-editor/src/ext/replxx.nim index f01a74b..71743f0 100644 --- a/albinos-editor/src/ext/replxx.nim +++ b/albinos-editor/src/ext/replxx.nim @@ -37,6 +37,9 @@ when defined(linux): const replxxdll* = "libreplxx.so" +when defined(MacOSX): + const + replxxdll* = "libreplxx.dylib" const REPLXX_VERSION* = "0.0.2" REPLXX_VERSION_MAJOR* = 0 diff --git a/albinos-editor/src/libalbinos/albinos.nim b/albinos-editor/src/libalbinos/albinos.nim index 73be2fa..69d87e8 100644 --- a/albinos-editor/src/libalbinos/albinos.nim +++ b/albinos-editor/src/libalbinos/albinos.nim @@ -7,6 +7,9 @@ when defined(linux): const albinosdll* = "libalbinos.so" +when defined(MacOSX): + const + albinosdll* = "libalbinos.dylib" ## / ## / \brief contain all possible returned values for the API ## /