rustyphoenixlecture 1.7.0

This project aims to provide a simple a powerfull lecture compilation to generate html web sites

[highlighting]
# Do we want line numbers
is_line_number = true
# Plain text identifier
token_charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"
# Vector of accepted extensions
vec_extention = ["bash", "sh"]
# Vector of accepted filenames for highlithing this particular language
vec_filename = []
# Definition of a single line comment
single_line_comment = "#"
# Beginning of a multi-line comment
multi_line_comment_begin = ": '"
# Ending of a multi-line comment
multi_line_comment_end = "'"
# If the language has an escape char
is_escape_char = true
# Some example of the language to be parsed
example = """
#!/bin/bash

if [[ "$OSTYPE" == "darwin"* ]]; then
	export nbproc=`sysctl -n hw.physicalcpu`
else
	export nbproc=`nproc`	
fi

INSTALL_PREFIX="$1"

if [ -z "$1" ]
then
	if [ -z $CONDA_ENV_PATH ]
	then
		if [ -z $CONDA_PREFIX ]
		then
			INSTALL_PREFIX="$HOME/usr"
		else
			INSTALL_PREFIX=$CONDA_PREFIX
		fi
	else
		INSTALL_PREFIX=$CONDA_ENV_PATH
	fi
fi

export PATH=$INSTALL_PREFIX/bin:$PATH
export LD_LIBRARY_PATH=$INSTALL_PREFIX/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$INSTALL_PREFIX/lib:$DYLD_LIBRARY_PATH

command -v phoenixcmake-config >/dev/null 2>&1
result=$?
if [ ${result} -eq 0 ]
then
	echo "phoenixcmake-config found. Let's install the current project"
else
	echo "phoenixcmake-config could not be found. Let's install it"
	git clone https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/PhoenixCMake.git && cd PhoenixCMake && ./install.sh ${INSTALL_PREFIX} && cd .. && rm -fr PhoenixCMake
fi

if [ -d build ]
then
	echo "Remove existing directory build"
	rm -fr build
fi

mkdir -p build
cd build

cmake .. $(phoenixcmake-config --cmake) -DSELF_TESTS_MODE=no
if [ $? != 0 ]
then
	echo "Error on cmake : exit -1"
	exit -1
fi

make -j $nbproc
if [ $? != 0 ]
then
	echo "Error on make : exit -1"
	exit -1
fi

make install -j $nbproc
if [ $? != 0 ]
then
	echo "Error on install : exit -1"
	exit -1
fi

if [ -f $HOME/.bashrc ]; then
	source $HOME/.bashrc
fi
"""

[[keyword]]
style = "dsKeyword"
vec_token = [
	"case",
	"done",
	"do",
	"elif",
	"else",
	"esac",
	"export",
	"fi",
	"for",
	"function",
	"if",
	"in",
	"select",
	"time",
	"then",
	"until",
	"undef",
	"while",
	"set",
	"source",
	"alias",
]
vec_match = []

[[keyword]]
style = "makeFunction"
vec_token = [
	"rm",
	"cd",
	"mv",
	"g++",
	"gcc",
	"ls",
	"tar",
	"make",
	"cmake3",
	"cmake",
	"cpack",
	"echo",
	"uname",
	"time",
	"cat",
	"mkdir",
	"sed",
	"head",
	"cut",
	"grep",
	"bc",
	"seq",
	"column",
	"gnuplot-nox",
	"gnuplot",
	"condor_submit",
	"sysctl",
	"nproc",
	"git",
	"apptainer",
	"singularity",
	"scp",
	"basename",
	"command",
]
vec_match = []

[[getuntil]]
style = "dsString"
start_token = "\""
end_token = "\""


[[getuntil]]
style = "dsString"
start_token = "'"
end_token = "'"


[[getuntil]]
style = "dsCommentMono"
start_token = "#"
end_token = "\n"


[[getuntil]]
style = "dsCommentMulti"
start_token = ": '"
end_token = "'"


[[getuntil]]
style = "dsNumber"
start_token = "${"
end_token = "}"

[[keyword]]
style = "dsNumber"
vec_token = []
vec_match = [
	"$?",
]

[[sequence]]
style = "dsNumber"
vec_step = [
	{token = "$"},
	{oneof = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"},
]

[[sequence]]
style = "dsNumber"
vec_step = [
	{oneof = "1234567890"},
	{oneof = "lu"}
]

[[sequence]]
style = "dsNumber"
vec_step = [
	{token = "."},
	{oneof = "1234567890"},
	{oneof = "f"}
]

[[sequence]]
style = "dsNumber"
vec_step = [
	{token = "0x"},
	{oneof = "1234567890abcdef"},
]

[[sequence]]
style = "dsNumber"
vec_step = [
	{token = "0b"},
	{oneof = "10"},
]

# We have to fight token with token, because oneof has less priority
[[sequence]]
style = "dsNumber"
vec_step = [
	{token = "0"},
]