aboutsummaryrefslogtreecommitdiffstats
path: root/README.org
diff options
context:
space:
mode:
Diffstat (limited to 'README.org')
-rw-r--r--README.org89
1 files changed, 71 insertions, 18 deletions
diff --git a/README.org b/README.org
index 2058b59..7d5e4d7 100644
--- a/README.org
+++ b/README.org
@@ -3,20 +3,62 @@
* ck
*The Config Keeper*
+Have you ever wondered:
+#+BEGIN_QUOTE
+ "Jeez Luiz, how can I manage all my configs across my desktop and server?"
+
+ -- You
+#+END_QUOTE
+
+or maybe:
+#+BEGIN_QUOTE
+ "How can I possibly keep all my configs in sync across computers?"
+
+ -- You again
+#+END_QUOTE
+
+*ck* is the solution you've been looking for all your life.
+
+With it you can keep track of all the configs you cherish and love,
+and store them neat and tidy in a folder you can later sync using
+your favorite sync solution (git, nextcloud, rsync). You can even gift
+your precious data to Google and use GDrive (//not recommended!!//).
+
+After you create your local config db you can list them, edit them
+and even search in them, all within the comforting hands of *ck*, your
+faithful companion.
+
+You can also use *ck* to store sensitive configurations (with passwords, etc)
+and instruct it to save them in a different folder, so they won't be in the
+same place with the normal ones (in the event you want to share your configs
+with the rest of us).
+
+** Technicalities
+Upon adding a config to *ck*, it moves it to the specified folder and adds a symbolic link
+back where it came from (=ln -s=).
+
+Make sure that the target program can read it's configuration from a symlink (the vast
+majority should).
+
+** Download
+Go ahead and download *ck* and give it a try. It comes with a help sub-command
+that explains any inquires you might have.
+
+Grab the latest zip/tarball from the tag section in the [[https://ubuntos.dynu.net/git/ck][repo]] and proceed to
+the [[#build-instructions][build]] section.
+
+You can also read the manual [[#manual][down below]].
+
* build it
+ :PROPERTIES:
+ :CUSTOM_ID: build-instructions
+ :END:
** requirements
-- clang (llvm) or gcc (gnu)
- cmake
- sqlite3-dev
+- build tools (gcc/llvm, make...)
-** compiler
-#+BEGIN_SRC sh
- > export CC=clang
- # or
- > export CC=gcc
-#+END_SRC
-
-** make
+** make && install
Use =-DCMAKE_INSTALL_PREFIX= when running cmake to change the install path.
#+BEGIN_SRC sh
# clone the repo
@@ -38,28 +80,36 @@ Please be [[https://www.gnu.org/philosophy/kind-communication.html][kind]] to ea
** CMake options
cmake accepts the following options:
#+BEGIN_SRC cmake
- option(CK_ASAN "Build with asan")
- option(CK_DEBUG "Build with debug symbols")
+ option(CK_DEBUG "Build with debug symbols, asan and warnings")
option(CK_TESTS "Make the tests")
option(CK_SHARED "Build with shared lib")
#+END_SRC
To use any one of them append it after the cmake command like so:
#+BEGIN_SRC sh
- cmake -DCK_ASAN=1 -DCK_DEBUG=1 -DCK_TESTS=1 ~/code/ck
+ cmake -DCK_DEBUG=1 -DCK_TESTS=1 ~/code/ck
+#+END_SRC
+
+** compiler
+Pick your favorite
+#+BEGIN_SRC sh
+ > export CC=clang
+ # or
+ > export CC=gcc
#+END_SRC
-Just build with address sanitizer enabled like so:
-llvm has better asan than gcc, so I use that.
+
#+BEGIN_SRC sh
# clone the repo
> cd ~/code; git clone https://gitlab.com/grm-grm/ck
# make a build directory and enter it
> mkdir ~/ck_build; cd ~/ck_build;
# run cmake
- > cmake -DCK_ASAN=1 -DCK_DEBUG=1 -DCK_TESTS=1 ~/code/ck
+ > cmake -DCK_DEBUG=1 -DCK_TESTS=1 ~/code/ck
# run make
> make
+ # check ck
+ > ./test-ck
# run ck
> ./ck
#+END_SRC
@@ -91,6 +141,9 @@ flags:
-h, --help, * print this
#+END_SRC
* manual
+ :PROPERTIES:
+ :CUSTOM_ID: manual
+ :END:
ck's goal is to assist with the configuration file management.
To that end it tries to provides a cli interface that is pretty straight-forward
and intuitive.
@@ -125,15 +178,15 @@ Example usage:
#+END_SRC
The first command after typing *ck* is the action you wish to perform. Actions are
-a very important concept of ck. With an action you can initialize *ck*, add/move/delete
-configuration files to it, edit them, list them in various ways and search in their content.
+a very important concept of ck. With an action you can initialize *ck*, add/delete
+configuration files to/from it, edit them, list them in various ways and search in their content.
Actions expect their arguments in the order specified below. This is done to reduce the amount
of flags one has to pass to ck.
** ck configuration
ck uses sqlite to index the configuration files. The init
-action creates a *.ck* directory (under $HOME)
+action creates a *.ck* directory (under =$HOME=)
in witch the *ckrc* and the *ckdb* reside. The first one contains
the two directories described above while the other one is the
sqlite db.