From 41ae1a0f0d86d2fc19f333ee23889c11beb0a4dd Mon Sep 17 00:00:00 2001 From: gramanas Date: Fri, 26 Oct 2018 16:00:29 +0300 Subject: Confort to pedantic std-c99 and update readme --- README.html | 276 ++++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 183 insertions(+), 93 deletions(-) (limited to 'README.html') diff --git a/README.html b/README.html index 7d71922..dc25609 100644 --- a/README.html +++ b/README.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + @@ -232,35 +232,40 @@ for the JavaScript code in this tag.

Table of Contents

-
-

ck

-
+
+

ck

+

The Config Keeper

+ +

+Have you ever wondered: +

+
+

+"Jeez Luiz, how can I manage all my configs across my desktop and server?" +

+ +

+– You +

+
+ +

+or maybe: +

+
+

+"How can I possibly keep all my configs in sync across computers?" +

+ +

+– You again +

+
+ +

+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). +

-
-

build it

-
+
+

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 repo and proceed to +the build section. +

+ +

+You can also read the manual down below. +

-
-

requirements

-
-
    -
  • clang (llvm) or gcc (gnu)
  • -
  • cmake
  • -
  • sqlite3-dev
  • -
-
-

compiler

-
-
-
> export CC=clang
-# or
-> export CC=gcc
-
+
+

build it

+
+
+

requirements

+
+
    +
  • cmake
  • +
  • sqlite3-dev
  • +
  • build tools (gcc/llvm, make…)
  • +
-
-

make

-
+
+

make && install

+

Use -DCMAKE_INSTALL_PREFIX when running cmake to change the install path.

@@ -330,22 +407,21 @@ Use -DCMAKE_INSTALL_PREFIX when running cmake to change the install
-
-

for devs

-
+
+

for devs

+

Please be kind to each other.

-
-

CMake options

-
+
+

CMake options

+

cmake accepts the following options:

-
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")
 
@@ -355,23 +431,37 @@ cmake accepts the following options: To use any one of them append it after the cmake command like so:

-
cmake -DCK_ASAN=1 -DCK_DEBUG=1 -DCK_TESTS=1 ~/code/ck
+
cmake -DCK_DEBUG=1 -DCK_TESTS=1 ~/code/ck
 
+
+
+
+

compiler

+

-Just build with address sanitizer enabled like so: -llvm has better asan than gcc, so I use that. +Pick your favorite

+
+
> export CC=clang
+# or
+> export CC=gcc
+
+
+ +
# 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
 
@@ -379,9 +469,9 @@ llvm has better asan than gcc, so I use that.
-
-

tests

-
+
+

tests

+

The testing "suite" is a bash script that runs regression and unit tests. Regression tests are under the tests/ directory @@ -390,9 +480,9 @@ under unit/ directory and test the code.

-
-

run tests

-
+
+

run tests

+

First make sure you build ck with the -DCK_TESTS=1 option. Then go to the build directory and type: @@ -404,9 +494,9 @@ go to the build directory and type:

-
-

test suite

-
+
+

test suite

+
$ ./test-ck -h
 ck test suite
@@ -424,9 +514,9 @@ flags:
 
-
-

manual

-
+
+

manual

+

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 @@ -467,8 +557,8 @@ $ ck search "\(" -

ck configuration

-
+
+

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. @@ -517,13 +607,13 @@ $ ck -c /someplace/else ...

-
-

Actions

-
+
+

Actions

+
-
-

init

-
+
+

init

+

or i or -i

@@ -553,9 +643,9 @@ $ ck init /path_to/where_you_want/your_configs/to_be -

add

-
+
+

add

+

or a or -a

@@ -596,9 +686,9 @@ $ ck add program_name config_path [-s] [-p]
-
-

list

-
+
+

list

+

or ls or l or -l

@@ -661,9 +751,9 @@ $ ck -l ckconf
-
-

search

-
+
+

search

+

or grep or s or -s

@@ -712,9 +802,9 @@ $ for i ($(ck ls paths)) grep -E 'A|B' $
-
-

edit

-
+
+

edit

+

or e or -e

@@ -763,7 +853,7 @@ $ ck edit emacs accounts.el
-

Created: 2018-10-23 Tue 10:35

+

Created: 2018-10-26 Fri 16:01

Validate

-- cgit v1.2.3