mirror of
https://github.com/Mayccoll/Gogh.git
synced 2023-08-10 21:12:46 +03:00
theme json generator
This commit is contained in:
parent
100e6e59da
commit
db74cdd14e
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ gh-pages/node_modules
|
|||||||
*lock*
|
*lock*
|
||||||
.stfolder
|
.stfolder
|
||||||
apply-colors-original.sh
|
apply-colors-original.sh
|
||||||
|
.tmp
|
||||||
|
10
README.md
10
README.md
@ -160,4 +160,12 @@ There is no blue without yellow and without orange.
|
|||||||
|
|
||||||
## Themes in `json` format
|
## Themes in `json` format
|
||||||
|
|
||||||
https://gist.github.com/rapgru/09b449285231d18f4e4536c5f48fc927
|
In your terminal type:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bash tools/generate.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
this generates a json file located at `gh-pages/data/themes.json`
|
||||||
|
|
||||||
|
orginal script source: https://gist.github.com/rapgru/09b449285231d18f4e4536c5f48fc927
|
||||||
|
4360
gh-pages/data/themes.json
Normal file
4360
gh-pages/data/themes.json
Normal file
File diff suppressed because it is too large
Load Diff
65
tools/generate.sh
Normal file
65
tools/generate.sh
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# |░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░|
|
||||||
|
# | ······· Colors
|
||||||
|
# |░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░|
|
||||||
|
|
||||||
|
RS="\e[0m"
|
||||||
|
# Basic Colors
|
||||||
|
BLACK="\e[0;30m"
|
||||||
|
RED="\e[0;31m"
|
||||||
|
GREEN="\e[0;32m"
|
||||||
|
YELLOW="\e[0;33m"
|
||||||
|
BLUE="\e[0;34m"
|
||||||
|
PURPLE="\e[0;35m"
|
||||||
|
CYAN="\e[0;36m"
|
||||||
|
WHITE="\e[0;37m"
|
||||||
|
|
||||||
|
# |
|
||||||
|
# | ::::::: Script Path
|
||||||
|
# |
|
||||||
|
SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
createColors() {
|
||||||
|
source $1
|
||||||
|
echo ' {'
|
||||||
|
echo ' "name": "'"$PROFILE_NAME"'",'
|
||||||
|
echo ' "black": "'"$COLOR_01"'",'
|
||||||
|
echo ' "red": "'"$COLOR_02"'",'
|
||||||
|
echo ' "green": "'"$COLOR_03"'",'
|
||||||
|
echo ' "yellow": "'"$COLOR_04"'",'
|
||||||
|
echo ' "blue": "'"$COLOR_05"'",'
|
||||||
|
echo ' "purple": "'"$COLOR_06"'",'
|
||||||
|
echo ' "cyan": "'"$COLOR_07"'",'
|
||||||
|
echo ' "white": "'"$COLOR_08"'",'
|
||||||
|
echo ' "brightBlack": "'"$COLOR_09"'",'
|
||||||
|
echo ' "brightRed": "'"$COLOR_10"'",'
|
||||||
|
echo ' "brightGreen": "'"$COLOR_11"'",'
|
||||||
|
echo ' "brightYellow": "'"$COLOR_12"'",'
|
||||||
|
echo ' "brightBlue": "'"$COLOR_13"'",'
|
||||||
|
echo ' "brightPurple": "'"$COLOR_14"'",'
|
||||||
|
echo ' "brightCyan": "'"$COLOR_15"'",'
|
||||||
|
echo ' "brightWhite": "'"$COLOR_16"'",'
|
||||||
|
echo ' "foreground": "'"$FOREGROUND_COLOR"'",'
|
||||||
|
echo ' "background": "'"$BACKGROUND_COLOR"'",'
|
||||||
|
echo ' "cursorColor": "'"$CURSOR_COLOR"'"'
|
||||||
|
echo ' },'
|
||||||
|
}
|
||||||
|
|
||||||
|
mkdir -p $SCRIPT_PATH/../.tmp
|
||||||
|
|
||||||
|
echo '{' > $SCRIPT_PATH/../gh-pages/data/themes.json
|
||||||
|
echo ' "themes": [' >> $SCRIPT_PATH/../gh-pages/data/themes.json
|
||||||
|
|
||||||
|
ls -1 $SCRIPT_PATH/../themes/*.sh | while read a; do grep "export" $a > "${a/themes/.tmp}"; done
|
||||||
|
|
||||||
|
ls -1 $SCRIPT_PATH/../.tmp/*.sh | while read a; do sed -i /IMPORTANT/d "${a}"; done
|
||||||
|
|
||||||
|
ls -1 $SCRIPT_PATH/../.tmp/*.sh | while read a; do createColors "$a" >> $SCRIPT_PATH/../gh-pages/data/themes.json; done
|
||||||
|
|
||||||
|
echo ' ]' >> $SCRIPT_PATH/../gh-pages/data/themes.json
|
||||||
|
echo '}' >> $SCRIPT_PATH/../gh-pages/data/themes.json
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "File location:"
|
||||||
|
echo -e "${GREEN} gh-pages/data/themes.json"
|
Loading…
Reference in New Issue
Block a user