utempl -t wosrc: génère des pages bootstrap par défaut

This commit is contained in:
Jephté Clain 2016-06-07 15:46:07 +04:00
parent 8fced87f34
commit f0f7a6ff3e
1 changed files with 10 additions and 5 deletions

View File

@ -181,10 +181,13 @@ html>
body> body>
h1> h1>
EOF EOF
fi elif [ -n "$blueprint" ]; then
if [ -n "$blueprint" ]; then
cat >>"$file" <<EOF cat >>"$file" <<EOF
wo:blueprintm> menu="menu" q:title="" wo:blueprintm> menu="menu" q:title=""
EOF
elif [ -n "$bootstrap" ]; then
cat >>"$file" <<EOF
wo:bspagem> menu="menu" q:title=""
EOF EOF
fi fi
[ -n "$2" ] && array_add "$2" "$file" [ -n "$2" ] && array_add "$2" "$file"
@ -249,7 +252,8 @@ implements=()
body= body=
doctype= doctype=
html= html=
blueprint=1 blueprint=
bootstrap=1
parse_opts "${PRETTYOPTS[@]}" \ parse_opts "${PRETTYOPTS[@]}" \
--help '$exit_with display_help' \ --help '$exit_with display_help' \
-t:,--template: template= \ -t:,--template: template= \
@ -263,8 +267,9 @@ parse_opts "${PRETTYOPTS[@]}" \
--implements: implements \ --implements: implements \
--body: body= \ --body: body= \
--doctype: doctype= \ --doctype: doctype= \
--html '$html=1; doctype=html4; blueprint=' \ --html '$html=1; doctype=html4; blueprint=; bootstrap=' \
--blueprint,--bp '$blueprint=1; html=' \ --blueprint,--bp '$blueprint=1; html=; bootstrap=' \
--bootstrap,--bs '$bootstrap=1; html=; blueprint=' \
@ args -- "$@" && set -- "${args[@]}" || die "$args" @ args -- "$@" && set -- "${args[@]}" || die "$args"
[ -n "$encoding" ] || encoding=utf-8 [ -n "$encoding" ] || encoding=utf-8