Skip to content

coliflor/knauel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Knauel

A Linux tool to cluster config files in a single file knauel.png

The purpose of this script is to write all your config files in a single centralized file and the program will create the separated files making it simpler to share your setups or configure several small files.

It utilizes the emacs org-mode tags \n#%+begin_src\n and \n#%+end_src\n . Unlike org-mode this tags don’t support parameters and being with a line break.

You can run your own custom functions to alter the file before its parsed by creating a code block \n#%+begin_code\n and \n#%+end_code\n and putting your lua function inside those tags, the code can alter the global variable “file” to the desired output. See the example code_execution.org

Install

Atrix Linux

First install the dependencies:

pacman -S luarocks git
luarocks install luastatic

Clone this repo and cd into the directory:

git clone <this repo>
cd <this repo>

Then run:

make
make install

The make file provides a clean and uninstall command.

Configure

Knauel works by putting your config files inside an org-mode file that contains code blocks, those code blocks will represent each configuration file. Knauel will parse those code blocks to create individual files that then will be linked to the destination file. Code Blocks have to start with a /newline and end with /newline or else they will be ignored.

opening code block: \n#+begin_src\n

closing code block: \n#+end_src\n

For the program to know where to link the specific config file you have to put the destination path inside the code block by using double brackets as opening token and double brackets as closing token.

For a better understanding of how it works check the sample file sample.org

Usage

For how to use knauel simple run:

knauel

About

A tool to cluster config files in a single file

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published