-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
README: update, reformat, add "about" & tokei section
- Loading branch information
Showing
2 changed files
with
52 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
===== | ||
mst | ||
===== | ||
|
||
A rather small CLI file templating tool written in C++. Specifically designed to handle dotfiles | ||
(see: `kgadek/yadm-bin <https://github.com/kgadek/yadm-bin>`_ - a yadm with ``mst`` templating). | ||
|
||
Standing on a shoulders of a wonderful `no1msd/mstch <https://github.com/no1msd/mstch>`_ library. | ||
|
||
**Warning ⚠️**: ``mst`` assumes input is trusted. By design, it **will run arbitrary commands** | ||
specified in templates with ``{{#cmd}}ls -alh *{{/cmd}}`` syntax. This feature can be disabled | ||
by a compile-time flag: ``cmake -DWITH_CMD=OFF ...``. | ||
|
||
.. highlight:: bash | ||
.. code-block:: console | ||
konrad@pc mst$ tokei . | ||
=============================================================================== | ||
Language Files Lines Code Comments Blanks | ||
=============================================================================== | ||
CMake 1 25 16 3 6 | ||
C++ 1 65 56 6 3 | ||
ReStructuredText 2 274 164 0 110 | ||
Plain Text 1 23 0 20 3 | ||
=============================================================================== | ||
Total 5 387 236 29 122 | ||
=============================================================================== | ||
Notes | ||
===== | ||
|
||
The ``no1msd/mstch`` was added to this repo via:: | ||
|
||
git subtree add --prefix mstch git@github.com:no1msd/mstch.git master --squash | ||
|
||
Build on macOS using:: | ||
|
||
brew install cmake boost # dependencies | ||
|
||
mkdir build/ | ||
cd build/ | ||
cmake -DCMAKE_BUILD_TYPE=Release .. | ||
make | ||
|
||
On Linux, you can build static binary by using different cmake invocation:: | ||
|
||
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_EXE_LINKER_FLAGS="-static" -DCMAKE_FIND_LIBRARY_SUFFIXES=".a" .. | ||
|
||
When uploading to GitHub: | ||
|
||
- remember to strip | ||
- rename to ``mst-"$(uname -sm | tr ' ' -)`` |