Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add begining of docs for editor #144

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .idea/albinos.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions albinos-editor/docs/technical_doc_editor.md
Original file line number Diff line number Diff line change
@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add instructions on how to get this. Isn't as straightforward as you make it out to be.
This is mostly because as far I know most package managers don't provide nimble.
A simple link to the official download or something like that would suffice.


## 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is "deployment"?


### 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`.
8 changes: 4 additions & 4 deletions albinos-editor/src/albinos_editor.nim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import terminal
import docopt
import albinospkg/gui
#import albinospkg/gui
import albinospkg/cli
import albinospkg/options

Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions albinos-editor/src/albinospkg/cli.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -60,14 +60,14 @@ proc globalHelpMsg() =
sep = " ", xpos = 8)
printHL("<name>", 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("<file>", 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,
Expand All @@ -76,8 +76,8 @@ proc globalHelpMsg() =
true: termwhite else: magenta)
printHL("<value>", 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)"
Expand Down
3 changes: 3 additions & 0 deletions albinos-editor/src/ext/replxx.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions albinos-editor/src/libalbinos/albinos.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
## /
Expand Down