diff options
Diffstat (limited to 'README.html')
-rw-r--r-- | README.html | 242 |
1 files changed, 123 insertions, 119 deletions
diff --git a/README.html b/README.html index dc571b9..622fe6f 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-09-23 Sun 00:15 --> +<!-- 2018-09-26 Wed 12:17 --> <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,35 @@ for the JavaScript code in this tag. <h2>Table of Contents</h2> <div id="text-table-of-contents"> <ul> -<li><a href="#orgabc7ed9">1. ck</a></li> -<li><a href="#org6be3d50">2. build it</a> +<li><a href="#orgd67b965">ck</a></li> +<li><a href="#org3c99267">build it</a> <ul> -<li><a href="#org4bd678f">2.1. requirements</a></li> -<li><a href="#orgf5f91da">2.2. compiler</a></li> -<li><a href="#org11d220b">2.3. make</a></li> +<li><a href="#org43293eb">requirements</a></li> +<li><a href="#orgdc47889">compiler</a></li> +<li><a href="#orgfa2726d">make</a></li> </ul> </li> -<li><a href="#org8fd7fd2">3. for devs</a> +<li><a href="#org6d8a878">for devs</a> <ul> -<li><a href="#orgce0d9f2">3.1. make</a></li> -<li><a href="#orge93a04c">3.2. tests</a> +<li><a href="#org7c536be">make</a></li> +<li><a href="#org795f8ab">tests</a> <ul> -<li><a href="#orgdbd1581">3.2.1. run tests</a></li> -<li><a href="#org44510f6">3.2.2. test suite</a></li> +<li><a href="#org5d71273">run tests</a></li> +<li><a href="#orgc90fd7b">test suite</a></li> </ul> </li> </ul> </li> -<li><a href="#org4b83d30">4. manual</a> +<li><a href="#orgd7c063c">manual</a> <ul> -<li><a href="#orgae3d0fc">4.1. ck configuration</a></li> -<li><a href="#orgea8c5fd">4.2. Actions</a> +<li><a href="#orge585d76">ck configuration</a></li> +<li><a href="#org2ae92a5">Actions</a> <ul> -<li><a href="#org5a6e5ef">4.2.1. init</a></li> -<li><a href="#org55f3471">4.2.2. add</a></li> -<li><a href="#orgd480808">4.2.3. list</a></li> -<li><a href="#org99d8d45">4.2.4. search</a></li> -<li><a href="#orgb8ec7b9">4.2.5. edit</a></li> +<li><a href="#orgd17e778">init</a></li> +<li><a href="#org331f5d4">add</a></li> +<li><a href="#org2e62903">list</a></li> +<li><a href="#org2237d57">search</a></li> +<li><a href="#orgbced512">edit</a></li> </ul> </li> </ul> @@ -269,22 +269,22 @@ for the JavaScript code in this tag. </div> </div> <p align="center"><img src="res/logo.png" width="30%" height="30%" /></p> -<div id="outline-container-orgabc7ed9" class="outline-2"> -<h2 id="orgabc7ed9"><span class="section-number-2">1</span> ck</h2> -<div class="outline-text-2" id="text-1"> +<div id="outline-container-orgd67b965" class="outline-2"> +<h2 id="orgd67b965">ck</h2> +<div class="outline-text-2" id="text-orgd67b965"> <p> <b>The Config Keeper</b> </p> </div> </div> -<div id="outline-container-org6be3d50" class="outline-2"> -<h2 id="org6be3d50"><span class="section-number-2">2</span> build it</h2> -<div class="outline-text-2" id="text-2"> +<div id="outline-container-org3c99267" class="outline-2"> +<h2 id="org3c99267">build it</h2> +<div class="outline-text-2" id="text-org3c99267"> </div> -<div id="outline-container-org4bd678f" class="outline-3"> -<h3 id="org4bd678f"><span class="section-number-3">2.1</span> requirements</h3> -<div class="outline-text-3" id="text-2-1"> +<div id="outline-container-org43293eb" class="outline-3"> +<h3 id="org43293eb">requirements</h3> +<div class="outline-text-3" id="text-org43293eb"> <ul class="org-ul"> <li>clang (llvm) or gcc (gnu)</li> <li>cmake</li> @@ -293,9 +293,9 @@ for the JavaScript code in this tag. </div> </div> -<div id="outline-container-orgf5f91da" class="outline-3"> -<h3 id="orgf5f91da"><span class="section-number-3">2.2</span> compiler</h3> -<div class="outline-text-3" id="text-2-2"> +<div id="outline-container-orgdc47889" class="outline-3"> +<h3 id="orgdc47889">compiler</h3> +<div class="outline-text-3" id="text-orgdc47889"> <p> By default I use clang, if you want to use gcc just edit the <code>CMakeLists.txt</code> file and change <code>clang</code> to <code>gcc</code> @@ -303,19 +303,19 @@ edit the <code>CMakeLists.txt</code> file and change <code>clang</code> to <code </div> </div> -<div id="outline-container-org11d220b" class="outline-3"> -<h3 id="org11d220b"><span class="section-number-3">2.3</span> make</h3> -<div class="outline-text-3" id="text-2-3"> +<div id="outline-container-orgfa2726d" class="outline-3"> +<h3 id="orgfa2726d">make</h3> +<div class="outline-text-3" id="text-orgfa2726d"> <div class="org-src-container"> -<pre class="src src-sh"><span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">clone the repo</span> +<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: #6A6D70;"># </span><span style="color: #6A6D70;">make a build directory and enter it</span> -> mkdir ~/ck_build; <span style="color: #ff0066;">cd</span> ~/ck_build; -<span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">run cmake</span> +<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 ~/code/ck -<span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">run make</span> +<span style="color: #656565;"># </span><span style="color: #757575;">run make</span> > make -<span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">run ck</span> +<span style="color: #656565;"># </span><span style="color: #757575;">run ck</span> > ./ck </pre> </div> @@ -323,36 +323,36 @@ edit the <code>CMakeLists.txt</code> file and change <code>clang</code> to <code </div> </div> -<div id="outline-container-org8fd7fd2" class="outline-2"> -<h2 id="org8fd7fd2"><span class="section-number-2">3</span> for devs</h2> -<div class="outline-text-2" id="text-3"> +<div id="outline-container-org6d8a878" class="outline-2"> +<h2 id="org6d8a878">for devs</h2> +<div class="outline-text-2" id="text-org6d8a878"> </div> -<div id="outline-container-orgce0d9f2" class="outline-3"> -<h3 id="orgce0d9f2"><span class="section-number-3">3.1</span> make</h3> -<div class="outline-text-3" id="text-3-1"> +<div id="outline-container-org7c536be" class="outline-3"> +<h3 id="org7c536be">make</h3> +<div class="outline-text-3" id="text-org7c536be"> <p> Just build with address sanitizer enabled like so: llvm has better asan than gcc, so I use that. </p> <div class="org-src-container"> -<pre class="src src-sh"><span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">clone the repo</span> +<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: #6A6D70;"># </span><span style="color: #6A6D70;">make a build directory and enter it</span> -> mkdir ~/ck_build; <span style="color: #ff0066;">cd</span> ~/ck_build; -<span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">run cmake</span> +<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 ~/code/ck -DCK_ASAN=ON -<span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">run make</span> +<span style="color: #656565;"># </span><span style="color: #757575;">run make</span> > make -<span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">run ck</span> +<span style="color: #656565;"># </span><span style="color: #757575;">run ck</span> > ./ck </pre> </div> </div> </div> -<div id="outline-container-orge93a04c" class="outline-3"> -<h3 id="orge93a04c"><span class="section-number-3">3.2</span> tests</h3> -<div class="outline-text-3" id="text-3-2"> +<div id="outline-container-org795f8ab" class="outline-3"> +<h3 id="org795f8ab">tests</h3> +<div class="outline-text-3" id="text-org795f8ab"> <p> The testing "suite" is a bash script that runs regression and unit tests. Regression tests are under the <code>tests/</code> directory @@ -361,9 +361,9 @@ under <code>unit/</code> directory and test the code. </p> </div> -<div id="outline-container-orgdbd1581" class="outline-4"> -<h4 id="orgdbd1581"><span class="section-number-4">3.2.1</span> run tests</h4> -<div class="outline-text-4" id="text-3-2-1"> +<div id="outline-container-org5d71273" class="outline-4"> +<h4 id="org5d71273">run tests</h4> +<div class="outline-text-4" id="text-org5d71273"> <p> Simply go to the build dir and type. </p> @@ -374,9 +374,9 @@ Simply go to the build dir and type. </div> </div> -<div id="outline-container-org44510f6" class="outline-4"> -<h4 id="org44510f6"><span class="section-number-4">3.2.2</span> test suite</h4> -<div class="outline-text-4" id="text-3-2-2"> +<div id="outline-container-orgc90fd7b" class="outline-4"> +<h4 id="orgc90fd7b">test suite</h4> +<div class="outline-text-4" id="text-orgc90fd7b"> <div class="org-src-container"> <pre class="src src-sh">$ ./check_ck -h ck test suite @@ -394,9 +394,9 @@ flags: </div> </div> </div> -<div id="outline-container-org4b83d30" class="outline-2"> -<h2 id="org4b83d30"><span class="section-number-2">4</span> manual</h2> -<div class="outline-text-2" id="text-4"> +<div id="outline-container-orgd7c063c" class="outline-2"> +<h2 id="orgd7c063c">manual</h2> +<div class="outline-text-2" id="text-orgd7c063c"> <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 @@ -407,30 +407,30 @@ and intuitive. Example usage: </p> <div class="org-src-container"> -<pre class="src src-sh"><span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">initialize new ck</span> -$ ck init /path_to/where_you_want/your_configs/to_be <span style="color: #E6DB74; font-weight: bold;">\</span> +<pre class="src src-sh"><span style="color: #656565;"># </span><span style="color: #757575;">initialize new ck</span> +$ ck init /path_to/where_you_want/your_configs/to_be <span style="color: #bdbc61;">\</span> /path_to/the_secret/directory -<span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">add emacs configs</span> -<span style="color: #6A6D70;">## </span><span style="color: #6A6D70;">primary config</span> +<span style="color: #656565;"># </span><span style="color: #757575;">add emacs configs</span> +<span style="color: #656565;">## </span><span style="color: #757575;">primary config</span> $ ck add emacs ~/.emacs.d/orgconf.org -p -<span style="color: #6A6D70;">## </span><span style="color: #6A6D70;">secret config, with passwords and naughty words</span> +<span style="color: #656565;">## </span><span style="color: #757575;">secret config, with passwords and naughty words</span> $ ck add emacs ~/.emacs.d/accounts.org -s -<span style="color: #6A6D70;">## </span><span style="color: #6A6D70;">and another one for emacs</span> +<span style="color: #656565;">## </span><span style="color: #757575;">and another one for emacs</span> $ ck add emacs ~/.emacs.d/init.el -<span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">add tmux config</span> +<span style="color: #656565;"># </span><span style="color: #757575;">add tmux config</span> $ ck add tmux ~/.tmux.conf -p -<span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">list the configs</span> +<span style="color: #656565;"># </span><span style="color: #757575;">list the configs</span> $ ck list tree $ ck list paths -t lisp $ ck list programs -t python -<span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">search the configs</span> +<span style="color: #656565;"># </span><span style="color: #757575;">search the configs</span> $ ck search search-term -$ ck search <span style="color: #E6DB74;">"\"search term with spaces\""</span> -$ ck search <span style="color: #E6DB74;">"\("</span> <span style="color: #6A6D70;">#</span><span style="color: #6A6D70;">escape symbols</span> +$ ck search <span style="color: #bdbc61;">"\"search term with spaces\""</span> +$ ck search <span style="color: #bdbc61;">"\("</span> <span style="color: #656565;">#</span><span style="color: #757575;">escape symbols</span> </pre> </div> @@ -446,9 +446,9 @@ of flags one has to pass to ck. </p> </div> -<div id="outline-container-orgae3d0fc" class="outline-3"> -<h3 id="orgae3d0fc"><span class="section-number-3">4.1</span> ck configuration</h3> -<div class="outline-text-3" id="text-4-1"> +<div id="outline-container-orge585d76" class="outline-3"> +<h3 id="orge585d76">ck configuration</h3> +<div class="outline-text-3" id="text-orge585d76"> <p> ck uses sqlite to index the configuration files. The init action creates a <b>.ck</b> directory (under $HOME) @@ -476,13 +476,13 @@ directory of your choice. Usage: </p> <div class="org-src-container"> -<pre class="src src-sh">$ ck config ~/ ... <span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">the default behaviour</span> +<pre class="src src-sh">$ ck config ~/ ... <span style="color: #656565;"># </span><span style="color: #757575;">the default behaviour</span> -<span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">/someplace/else must exist or</span> -<span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">the action following it must be init</span> +<span style="color: #656565;"># </span><span style="color: #757575;">/someplace/else must exist or</span> +<span style="color: #656565;"># </span><span style="color: #757575;">the action following it must be init</span> $ ck conf /someplace/else ... -<span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">same thing</span> +<span style="color: #656565;"># </span><span style="color: #757575;">same thing</span> $ ck c /someplace/else ... $ ck -c /someplace/else ... </pre> @@ -490,13 +490,13 @@ $ ck -c /someplace/else ... </div> </div> -<div id="outline-container-orgea8c5fd" class="outline-3"> -<h3 id="orgea8c5fd"><span class="section-number-3">4.2</span> Actions</h3> -<div class="outline-text-3" id="text-4-2"> +<div id="outline-container-org2ae92a5" class="outline-3"> +<h3 id="org2ae92a5">Actions</h3> +<div class="outline-text-3" id="text-org2ae92a5"> </div> -<div id="outline-container-org5a6e5ef" class="outline-4"> -<h4 id="org5a6e5ef"><span class="section-number-4">4.2.1</span> init</h4> -<div class="outline-text-4" id="text-4-2-1"> +<div id="outline-container-orgd17e778" class="outline-4"> +<h4 id="orgd17e778">init</h4> +<div class="outline-text-4" id="text-orgd17e778"> <p> or i or -i </p> @@ -518,17 +518,17 @@ Use init to initialize a new ck database. Usage: </p> <div class="org-src-container"> -<pre class="src src-sh"><span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">initialize new ck</span> -$ ck init /path_to/where_you_want/your_configs/to_be <span style="color: #E6DB74; font-weight: bold;">\</span> +<pre class="src src-sh"><span style="color: #656565;"># </span><span style="color: #757575;">initialize new ck</span> +$ ck init /path_to/where_you_want/your_configs/to_be <span style="color: #bdbc61;">\</span> /path_to/the_secret/directory </pre> </div> </div> </div> -<div id="outline-container-org55f3471" class="outline-4"> -<h4 id="org55f3471"><span class="section-number-4">4.2.2</span> add</h4> -<div class="outline-text-4" id="text-4-2-2"> +<div id="outline-container-org331f5d4" class="outline-4"> +<h4 id="org331f5d4">add</h4> +<div class="outline-text-4" id="text-org331f5d4"> <p> or a or -a </p> @@ -562,22 +562,25 @@ sure to use the same name.</li> Usage: </p> <div class="org-src-container"> -<pre class="src src-sh"><span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">add config to ck</span> +<pre class="src src-sh"><span style="color: #656565;"># </span><span style="color: #757575;">add config to ck</span> $ ck add program_name config_path [-s] [-p] </pre> </div> </div> </div> -<div id="outline-container-orgd480808" class="outline-4"> -<h4 id="orgd480808"><span class="section-number-4">4.2.3</span> list</h4> -<div class="outline-text-4" id="text-4-2-3"> +<div id="outline-container-org2e62903" class="outline-4"> +<h4 id="org2e62903">list</h4> +<div class="outline-text-4" id="text-org2e62903"> <p> or ls or l or -l </p> <p> List can show the <b>paths</b> or the <b>programs</b> that ck keeps track of. +</p> + +<p> With the flag <b>-t</b> and then one of the follwing types one can change the way the list is printed: </p> @@ -592,28 +595,29 @@ Using the keyword <b>tree</b> ck can list the configurations under their corresponding program. </p> -<div class="org-src-container"> -<pre class="src src-C"><span style="color: #6A6D70;">/* </span><span style="color: #6A6D70;">TODO: show primary and secret atributes </span><span style="color: #6A6D70;">*/</span> -</pre> -</div> +<p> +Passing the <b>-a</b> flag will enable the listing of config attributes (secret or primary). +It is best used with tree or plain paths. +</p> + <p> Usage: </p> <div class="org-src-container"> -<pre class="src src-sh"><span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">list tree structure</span> -$ ck list tree -<span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">list paths in python</span> +<pre class="src src-sh"><span style="color: #656565;"># </span><span style="color: #757575;">list tree structure, with attributes</span> +$ ck list tree -a +<span style="color: #656565;"># </span><span style="color: #757575;">list paths in python</span> $ ck l paths -t python -<span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">list programs in lisp</span> +<span style="color: #656565;"># </span><span style="color: #757575;">list programs in lisp</span> $ ck ls programs -t lisp </pre> </div> </div> </div> -<div id="outline-container-org99d8d45" class="outline-4"> -<h4 id="org99d8d45"><span class="section-number-4">4.2.4</span> search</h4> -<div class="outline-text-4" id="text-4-2-4"> +<div id="outline-container-org2237d57" class="outline-4"> +<h4 id="org2237d57">search</h4> +<div class="outline-text-4" id="text-org2237d57"> <p> or s or -s </p> @@ -635,22 +639,22 @@ To search for special symbols you have to enclose them in quotes and escape them Usage: </p> <div class="org-src-container"> -<pre class="src src-sh"><span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">search for parenthesis</span> -$ ck search <span style="color: #E6DB74;">"\("</span> -<span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">search term with spaces</span> -$ ck search <span style="color: #E6DB74;">"\"This is a space\""</span> -<span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">both</span> -$ ck search <span style="color: #E6DB74;">"\"(add 2 4)\""</span> -<span style="color: #6A6D70;"># </span><span style="color: #6A6D70;">and a normal one</span> +<pre class="src src-sh"><span style="color: #656565;"># </span><span style="color: #757575;">search for parenthesis</span> +$ ck search <span style="color: #bdbc61;">"\("</span> +<span style="color: #656565;"># </span><span style="color: #757575;">search term with spaces</span> +$ ck search <span style="color: #bdbc61;">"\"This is a space\""</span> +<span style="color: #656565;"># </span><span style="color: #757575;">both</span> +$ ck search <span style="color: #bdbc61;">"\"(add 2 4)\""</span> +<span style="color: #656565;"># </span><span style="color: #757575;">and a normal one</span> $ ck search alias </pre> </div> </div> </div> -<div id="outline-container-orgb8ec7b9" class="outline-4"> -<h4 id="orgb8ec7b9"><span class="section-number-4">4.2.5</span> edit</h4> -<div class="outline-text-4" id="text-4-2-5"> +<div id="outline-container-orgbced512" class="outline-4"> +<h4 id="orgbced512">edit</h4> +<div class="outline-text-4" id="text-orgbced512"> <p> or e or -e </p> @@ -676,7 +680,7 @@ To do it use: </div> </div> <div id="postamble" class="status"> -<p class="date">Created: 2018-09-23 Sun 00:15</p> +<p class="date">Created: 2018-09-26 Wed 12:17</p> <p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p> </div> </body> |