diff options
Diffstat (limited to 'README.html')
-rw-r--r-- | README.html | 276 |
1 files changed, 183 insertions, 93 deletions
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"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> -<!-- 2018-10-23 Tue 10:35 --> +<!-- 2018-10-26 Fri 16:01 --> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>‎</title> @@ -232,35 +232,40 @@ for the JavaScript code in this tag. <h2>Table of Contents</h2> <div id="text-table-of-contents"> <ul> -<li><a href="#org188eec0">ck</a></li> -<li><a href="#org5cf05fb">build it</a> +<li><a href="#org521fe12">ck</a> <ul> -<li><a href="#orgddaa24b">requirements</a></li> -<li><a href="#org4b2326a">compiler</a></li> -<li><a href="#orgcc546ab">make</a></li> +<li><a href="#orga2a199d">Technicalities</a></li> +<li><a href="#orge675bb7">Download</a></li> </ul> </li> -<li><a href="#org8c57e12">for devs</a> +<li><a href="#build-instructions">build it</a> <ul> -<li><a href="#org6c910a6">CMake options</a></li> -<li><a href="#org9be5ed3">tests</a> +<li><a href="#orgc421406">requirements</a></li> +<li><a href="#orga4dab6e">make && install</a></li> +</ul> +</li> +<li><a href="#orge2205a2">for devs</a> +<ul> +<li><a href="#org5f75c37">CMake options</a></li> +<li><a href="#orgac3cc9e">compiler</a></li> +<li><a href="#org32fde8e">tests</a> <ul> -<li><a href="#orgbe86272">run tests</a></li> -<li><a href="#org136123c">test suite</a></li> +<li><a href="#orgf37899e">run tests</a></li> +<li><a href="#orgff9613a">test suite</a></li> </ul> </li> </ul> </li> -<li><a href="#org1b4ae92">manual</a> +<li><a href="#manual">manual</a> <ul> -<li><a href="#org028f12c">ck configuration</a></li> -<li><a href="#org675d6b6">Actions</a> +<li><a href="#org8bc297f">ck configuration</a></li> +<li><a href="#orgfb252e7">Actions</a> <ul> -<li><a href="#orgd421244">init</a></li> -<li><a href="#org400c289">add</a></li> -<li><a href="#orgab0ce16">list</a></li> -<li><a href="#orgb29e969">search</a></li> -<li><a href="#orgd0ea024">edit</a></li> +<li><a href="#org0bde617">init</a></li> +<li><a href="#orge38e9d6">add</a></li> +<li><a href="#org224e52f">list</a></li> +<li><a href="#org21ebeec">search</a></li> +<li><a href="#orgb56bde4">edit</a></li> </ul> </li> </ul> @@ -269,45 +274,117 @@ for the JavaScript code in this tag. </div> </div> <p align="center"><img src="res/logo.png"></p> -<div id="outline-container-org188eec0" class="outline-2"> -<h2 id="org188eec0">ck</h2> -<div class="outline-text-2" id="text-org188eec0"> +<div id="outline-container-org521fe12" class="outline-2"> +<h2 id="org521fe12">ck</h2> +<div class="outline-text-2" id="text-org521fe12"> <p> <b>The Config Keeper</b> </p> + +<p> +Have you ever wondered: +</p> +<blockquote> +<p> +"Jeez Luiz, how can I manage all my configs across my desktop and server?" +</p> + +<p> +– You +</p> +</blockquote> + +<p> +or maybe: +</p> +<blockquote> +<p> +"How can I possibly keep all my configs in sync across computers?" +</p> + +<p> +– You again +</p> +</blockquote> + +<p> +<b>ck</b> is the solution you've been looking for all your life. +</p> + +<p> +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 (<i><i>not recommended!!</i></i>). +</p> + +<p> +After you create your local config db you can list them, edit them +and even search in them, all within the comforting hands of <b>ck</b>, your +faithful companion. +</p> + +<p> +You can also use <b>ck</b> 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). +</p> +</div> + +<div id="outline-container-orga2a199d" class="outline-3"> +<h3 id="orga2a199d">Technicalities</h3> +<div class="outline-text-3" id="text-orga2a199d"> +<p> +Upon adding a config to <b>ck</b>, it moves it to the specified folder and adds a symbolic link +back where it came from (<code>ln -s</code>). +</p> + +<p> +Make sure that the target program can read it's configuration from a symlink (the vast +majority should). +</p> </div> </div> -<div id="outline-container-org5cf05fb" class="outline-2"> -<h2 id="org5cf05fb">build it</h2> -<div class="outline-text-2" id="text-org5cf05fb"> +<div id="outline-container-orge675bb7" class="outline-3"> +<h3 id="orge675bb7">Download</h3> +<div class="outline-text-3" id="text-orge675bb7"> +<p> +Go ahead and download <b>ck</b> and give it a try. It comes with a help sub-command +that explains any inquires you might have. +</p> + +<p> +Grab the latest zip/tarball from the tag section in the <a href="https://ubuntos.dynu.net/git/ck">repo</a> and proceed to +the <a href="#build-instructions">build</a> section. +</p> + +<p> +You can also read the manual <a href="#manual">down below</a>. +</p> </div> -<div id="outline-container-orgddaa24b" class="outline-3"> -<h3 id="orgddaa24b">requirements</h3> -<div class="outline-text-3" id="text-orgddaa24b"> -<ul class="org-ul"> -<li>clang (llvm) or gcc (gnu)</li> -<li>cmake</li> -<li>sqlite3-dev</li> -</ul> </div> </div> -<div id="outline-container-org4b2326a" class="outline-3"> -<h3 id="org4b2326a">compiler</h3> -<div class="outline-text-3" id="text-org4b2326a"> -<div class="org-src-container"> -<pre class="src src-sh">> export <span style="color: #baba36;">CC</span>=clang -<span style="color: #656565;"># </span><span style="color: #757575;">or</span> -> export <span style="color: #baba36;">CC</span>=gcc -</pre> +<div id="outline-container-orga8e0de1" class="outline-2"> +<h2 id="build-instructions"><a id="orga8e0de1"></a>build it</h2> +<div class="outline-text-2" id="text-build-instructions"> </div> +<div id="outline-container-orgc421406" class="outline-3"> +<h3 id="orgc421406">requirements</h3> +<div class="outline-text-3" id="text-orgc421406"> +<ul class="org-ul"> +<li>cmake</li> +<li>sqlite3-dev</li> +<li>build tools (gcc/llvm, make…)</li> +</ul> </div> </div> -<div id="outline-container-orgcc546ab" class="outline-3"> -<h3 id="orgcc546ab">make</h3> -<div class="outline-text-3" id="text-orgcc546ab"> +<div id="outline-container-orga4dab6e" class="outline-3"> +<h3 id="orga4dab6e">make && install</h3> +<div class="outline-text-3" id="text-orga4dab6e"> <p> Use <code>-DCMAKE_INSTALL_PREFIX</code> when running cmake to change the install path. </p> @@ -330,22 +407,21 @@ Use <code>-DCMAKE_INSTALL_PREFIX</code> when running cmake to change the install </div> </div> -<div id="outline-container-org8c57e12" class="outline-2"> -<h2 id="org8c57e12">for devs</h2> -<div class="outline-text-2" id="text-org8c57e12"> +<div id="outline-container-orge2205a2" class="outline-2"> +<h2 id="orge2205a2">for devs</h2> +<div class="outline-text-2" id="text-orge2205a2"> <p> Please be <a href="https://www.gnu.org/philosophy/kind-communication.html">kind</a> to each other. </p> </div> -<div id="outline-container-org6c910a6" class="outline-3"> -<h3 id="org6c910a6">CMake options</h3> -<div class="outline-text-3" id="text-org6c910a6"> +<div id="outline-container-org5f75c37" class="outline-3"> +<h3 id="org5f75c37">CMake options</h3> +<div class="outline-text-3" id="text-org5f75c37"> <p> cmake accepts the following options: </p> <div class="org-src-container"> -<pre class="src src-cmake"><span style="color: #6aaf50;">option</span>(CK_ASAN <span style="color: #bdbc61;">"Build with asan"</span>) -<span style="color: #6aaf50;">option</span>(CK_DEBUG <span style="color: #bdbc61;">"Build with debug symbols"</span>) +<pre class="src src-cmake"><span style="color: #6aaf50;">option</span>(CK_DEBUG <span style="color: #bdbc61;">"Build with debug symbols, asan and warnings"</span>) <span style="color: #6aaf50;">option</span>(CK_TESTS <span style="color: #bdbc61;">"Make the tests"</span>) <span style="color: #6aaf50;">option</span>(CK_SHARED <span style="color: #bdbc61;">"Build with shared lib"</span>) </pre> @@ -355,23 +431,37 @@ cmake accepts the following options: To use any one of them append it after the cmake command like so: </p> <div class="org-src-container"> -<pre class="src src-sh">cmake -DCK_ASAN=1 -DCK_DEBUG=1 -DCK_TESTS=1 ~/code/ck +<pre class="src src-sh">cmake -DCK_DEBUG=1 -DCK_TESTS=1 ~/code/ck </pre> </div> +</div> +</div> +<div id="outline-container-orgac3cc9e" class="outline-3"> +<h3 id="orgac3cc9e">compiler</h3> +<div class="outline-text-3" id="text-orgac3cc9e"> <p> -Just build with address sanitizer enabled like so: -llvm has better asan than gcc, so I use that. +Pick your favorite </p> <div class="org-src-container"> +<pre class="src src-sh">> export <span style="color: #baba36;">CC</span>=clang +<span style="color: #656565;"># </span><span style="color: #757575;">or</span> +> export <span style="color: #baba36;">CC</span>=gcc +</pre> +</div> + + +<div class="org-src-container"> <pre class="src src-sh"><span style="color: #656565;"># </span><span style="color: #757575;">clone the repo</span> > cd ~/code; git clone https://gitlab.com/grm-grm/ck <span style="color: #656565;"># </span><span style="color: #757575;">make a build directory and enter it</span> > mkdir ~/ck_build; <span style="color: #528fd1;">cd</span> ~/ck_build; <span style="color: #656565;"># </span><span style="color: #757575;">run cmake</span> -> cmake -DCK_ASAN=1 -DCK_DEBUG=1 -DCK_TESTS=1 ~/code/ck +> cmake -DCK_DEBUG=1 -DCK_TESTS=1 ~/code/ck <span style="color: #656565;"># </span><span style="color: #757575;">run make</span> > make +<span style="color: #656565;"># </span><span style="color: #757575;">check ck</span> +> ./test-ck <span style="color: #656565;"># </span><span style="color: #757575;">run ck</span> > ./ck </pre> @@ -379,9 +469,9 @@ llvm has better asan than gcc, so I use that. </div> </div> -<div id="outline-container-org9be5ed3" class="outline-3"> -<h3 id="org9be5ed3">tests</h3> -<div class="outline-text-3" id="text-org9be5ed3"> +<div id="outline-container-org32fde8e" class="outline-3"> +<h3 id="org32fde8e">tests</h3> +<div class="outline-text-3" id="text-org32fde8e"> <p> The testing "suite" is a bash script that runs regression and unit tests. Regression tests are under the <code>tests/</code> directory @@ -390,9 +480,9 @@ under <code>unit/</code> directory and test the code. </p> </div> -<div id="outline-container-orgbe86272" class="outline-4"> -<h4 id="orgbe86272">run tests</h4> -<div class="outline-text-4" id="text-orgbe86272"> +<div id="outline-container-orgf37899e" class="outline-4"> +<h4 id="orgf37899e">run tests</h4> +<div class="outline-text-4" id="text-orgf37899e"> <p> First make sure you build ck with the <code>-DCK_TESTS=1</code> option. Then go to the build directory and type: @@ -404,9 +494,9 @@ go to the build directory and type: </div> </div> -<div id="outline-container-org136123c" class="outline-4"> -<h4 id="org136123c">test suite</h4> -<div class="outline-text-4" id="text-org136123c"> +<div id="outline-container-orgff9613a" class="outline-4"> +<h4 id="orgff9613a">test suite</h4> +<div class="outline-text-4" id="text-orgff9613a"> <div class="org-src-container"> <pre class="src src-sh">$ ./test-ck -h ck test suite @@ -424,9 +514,9 @@ flags: </div> </div> </div> -<div id="outline-container-org1b4ae92" class="outline-2"> -<h2 id="org1b4ae92">manual</h2> -<div class="outline-text-2" id="text-org1b4ae92"> +<div id="outline-container-org68d2b05" class="outline-2"> +<h2 id="manual"><a id="org68d2b05"></a>manual</h2> +<div class="outline-text-2" id="text-manual"> <p> 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 <span style="color: #bdbc61;">"\("</span> <span style="color: #65656 <p> The first command after typing <b>ck</b> is the action you wish to perform. Actions are -a very important concept of ck. With an action you can initialize <b>ck</b>, 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 <b>ck</b>, add/delete +configuration files to/from it, edit them, list them in various ways and search in their content. </p> <p> @@ -477,12 +567,12 @@ of flags one has to pass to ck. </p> </div> -<div id="outline-container-org028f12c" class="outline-3"> -<h3 id="org028f12c">ck configuration</h3> -<div class="outline-text-3" id="text-org028f12c"> +<div id="outline-container-org8bc297f" class="outline-3"> +<h3 id="org8bc297f">ck configuration</h3> +<div class="outline-text-3" id="text-org8bc297f"> <p> ck uses sqlite to index the configuration files. The init -action creates a <b>.ck</b> directory (under $HOME) +action creates a <b>.ck</b> directory (under <code>$HOME</code>) in witch the <b>ckrc</b> and the <b>ckdb</b> 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 ... </div> </div> -<div id="outline-container-org675d6b6" class="outline-3"> -<h3 id="org675d6b6">Actions</h3> -<div class="outline-text-3" id="text-org675d6b6"> +<div id="outline-container-orgfb252e7" class="outline-3"> +<h3 id="orgfb252e7">Actions</h3> +<div class="outline-text-3" id="text-orgfb252e7"> </div> -<div id="outline-container-orgd421244" class="outline-4"> -<h4 id="orgd421244">init</h4> -<div class="outline-text-4" id="text-orgd421244"> +<div id="outline-container-org0bde617" class="outline-4"> +<h4 id="org0bde617">init</h4> +<div class="outline-text-4" id="text-org0bde617"> <p> or i or -i </p> @@ -553,9 +643,9 @@ $ ck init /path_to/where_you_want/your_configs/to_be <span style="color: #bdbc61 </div> </div> -<div id="outline-container-org400c289" class="outline-4"> -<h4 id="org400c289">add</h4> -<div class="outline-text-4" id="text-org400c289"> +<div id="outline-container-orge38e9d6" class="outline-4"> +<h4 id="orge38e9d6">add</h4> +<div class="outline-text-4" id="text-orge38e9d6"> <p> or a or -a </p> @@ -596,9 +686,9 @@ $ ck add program_name config_path [-s] [-p] </div> </div> -<div id="outline-container-orgab0ce16" class="outline-4"> -<h4 id="orgab0ce16">list</h4> -<div class="outline-text-4" id="text-orgab0ce16"> +<div id="outline-container-org224e52f" class="outline-4"> +<h4 id="org224e52f">list</h4> +<div class="outline-text-4" id="text-org224e52f"> <p> or ls or l or -l </p> @@ -661,9 +751,9 @@ $ ck -l ckconf </div> </div> -<div id="outline-container-orgb29e969" class="outline-4"> -<h4 id="orgb29e969">search</h4> -<div class="outline-text-4" id="text-orgb29e969"> +<div id="outline-container-org21ebeec" class="outline-4"> +<h4 id="org21ebeec">search</h4> +<div class="outline-text-4" id="text-org21ebeec"> <p> or grep or s or -s </p> @@ -712,9 +802,9 @@ $ for i ($(ck ls paths)) grep -E <span style="color: #bdbc61;">'A|B'</span> $<sp </div> </div> -<div id="outline-container-orgd0ea024" class="outline-4"> -<h4 id="orgd0ea024">edit</h4> -<div class="outline-text-4" id="text-orgd0ea024"> +<div id="outline-container-orgb56bde4" class="outline-4"> +<h4 id="orgb56bde4">edit</h4> +<div class="outline-text-4" id="text-orgb56bde4"> <p> or e or -e </p> @@ -763,7 +853,7 @@ $ ck edit emacs accounts.el </div> </div> <div id="postamble" class="status"> -<p class="date">Created: 2018-10-23 Tue 10:35</p> +<p class="date">Created: 2018-10-26 Fri 16:01</p> <p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p> </div> </body> |