From 8a0a7b8ebdc70cd4763cf2dcc8f8726b5d9395d9 Mon Sep 17 00:00:00 2001 From: Alexey Stepanov Date: Thu, 26 Sep 2024 17:27:31 +0000 Subject: rewrite builder.sh edit tmpBodyJson variable --- builder.sh | 32 +++++++++++++-------------- colors/base16-default-dark.css | 15 +++++++++++++ colors/base16-gruvbox-material-light-hard.css | 15 +++++++++++++ colors/base16-heetch.css | 15 +++++++++++++ colors/base16-solarized-light.css | 15 +++++++++++++ colors/base16-spaceduck.css | 15 +++++++++++++ templates/body.mustache | 6 ++--- 7 files changed, 93 insertions(+), 20 deletions(-) create mode 100644 colors/base16-default-dark.css create mode 100644 colors/base16-gruvbox-material-light-hard.css create mode 100644 colors/base16-heetch.css create mode 100644 colors/base16-solarized-light.css create mode 100644 colors/base16-spaceduck.css diff --git a/builder.sh b/builder.sh index 27aacfc..dcaa271 100755 --- a/builder.sh +++ b/builder.sh @@ -32,7 +32,7 @@ declare -g tokenDecG declare -g tokenDecB readarray -t schemesFiles < <(find "$schemesPath" -type f -iname '*.yaml') -readarray -t necessaryTokensPaletteList < <(grep -oP '\{\{\K[^}]+(?=\}\})' "$bodyFileTemplate" | awk -F'.' '{print $1}' | sort -u) +readarray -t necessaryTokensPaletteList < <(grep -oP '\{\{\K[^}]+(?=\}\})' "$bodyFileTemplate" | awk -F'-' '{print $1}' | sort -u) function getProperty() { yq -oy "$schemeFile" | yq -o=json -r ".$1" @@ -114,22 +114,20 @@ for schemeFile in "${schemesFiles[@]}"; do --arg tokenDecG "$tokenDecG" \ --arg tokenDecB "$tokenDecB" \ '{ - ($tokenName): { - "hex": $tokenHex, - "bgr": $tokenBgr, - "hex-r": $tokenHexR, - "hex-g": $tokenHexG, - "hex-b": $tokenHexB, - "rgb-r": $tokenRgbR, - "rgb-g": $tokenRgbG, - "rgb-b": $tokenRgbB, - "rgb16-r": $tokenRgb16R, - "rgb16-g": $tokenRgb16G, - "rgb16-b": $tokenRgb16B, - "dec-r": $tokenDecR, - "dec-g": $tokenDecG, - "dec-b": $tokenDecB - }, + ($tokenName + "-hex"): $tokenHex, + ($tokenName + "-bgr"): $tokenBgr, + ($tokenName + "-hex-r"): $tokenHexR, + ($tokenName + "-hex-g"): $tokenHexG, + ($tokenName + "-hex-b"): $tokenHexB, + ($tokenName + "-rgb-r"): $tokenRgbR, + ($tokenName + "-rgb-g"): $tokenRgbG, + ($tokenName + "-rgb-b"): $tokenRgbB, + ($tokenName + "-rgb16-r"): $tokenRgb16R, + ($tokenName + "-rgb16-g"): $tokenRgb16G, + ($tokenName + "-rgb16-b"): $tokenRgb16B, + ($tokenName + "-dec-r"): $tokenDecR, + ($tokenName + "-dec-g"): $tokenDecG, + ($tokenName + "-dec-b"): $tokenDecB }' ) diff --git a/colors/base16-default-dark.css b/colors/base16-default-dark.css new file mode 100644 index 0000000..9f3aeb5 --- /dev/null +++ b/colors/base16-default-dark.css @@ -0,0 +1,15 @@ +# +# +# name: Default Dark +# author: Chris Kempson (http://chriskempson.com) +# slug: default-dark +# slug-underscored: default_dark +# system: base16 +# variant: dark +# is-dark-variant: true +# +# + +background: "#181818" +color: "#e8e8e8" +border: "#7cafc2" diff --git a/colors/base16-gruvbox-material-light-hard.css b/colors/base16-gruvbox-material-light-hard.css new file mode 100644 index 0000000..714d047 --- /dev/null +++ b/colors/base16-gruvbox-material-light-hard.css @@ -0,0 +1,15 @@ +# +# +# name: Gruvbox Material Light, Hard +# author: Mayush Kumar (https://github.com/MayushKumar), sainnhe (https://github.com/sainnhe/gruvbox-material-vscode) +# slug: gruvbox-material-light-hard +# slug-underscored: gruvbox_material_light_hard +# system: base16 +# variant: light +# is-light-variant: true +# +# + +background: "#f9f5d7" +color: "#3c3836" +border: "#45707a" diff --git a/colors/base16-heetch.css b/colors/base16-heetch.css new file mode 100644 index 0000000..6e1e713 --- /dev/null +++ b/colors/base16-heetch.css @@ -0,0 +1,15 @@ +# +# +# name: Heetch Dark +# author: Geoffrey Teale (tealeg@gmail.com) +# slug: heetch +# slug-underscored: heetch +# system: base16 +# variant: dark +# is-dark-variant: true +# +# + +background: "#190134" +color: "#DEDAE2" +border: "#BD0152" diff --git a/colors/base16-solarized-light.css b/colors/base16-solarized-light.css new file mode 100644 index 0000000..065a2da --- /dev/null +++ b/colors/base16-solarized-light.css @@ -0,0 +1,15 @@ +# +# +# name: Solarized Light +# author: Ethan Schoonover (modified by aramisgithub) +# slug: solarized-light +# slug-underscored: solarized_light +# system: base16 +# variant: light +# is-light-variant: true +# +# + +background: "#fdf6e3" +color: "#073642" +border: "#268bd2" diff --git a/colors/base16-spaceduck.css b/colors/base16-spaceduck.css new file mode 100644 index 0000000..f70dc00 --- /dev/null +++ b/colors/base16-spaceduck.css @@ -0,0 +1,15 @@ +# +# +# name: Spaceduck +# author: Guillermo Rodriguez (https://github.com/pineapplegiant), packaged by Gabriel Fontes (https://github.com/Misterio77) +# slug: spaceduck +# slug-underscored: spaceduck +# system: base16 +# variant: dark +# is-dark-variant: true +# +# + +background: "#16172d" +color: "#c1c3cc" +border: "#7a5ccc" diff --git a/templates/body.mustache b/templates/body.mustache index 7f9b977..98a4de3 100644 --- a/templates/body.mustache +++ b/templates/body.mustache @@ -1,3 +1,3 @@ -background: "#{{base00.hex}}" -color: "#{{base06.hex}}" -border: "#{{base0D.hex}}" +background: "#{{base00-hex}}" +color: "#{{base06-hex}}" +border: "#{{base0D-hex}}" -- cgit