From 5f7a391fd1efff6fad4bc507acc38e82c90276b6 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Sun, 17 Sep 2023 15:34:31 -0400 Subject: Added in auto-generation and ran for the first time. --- .github/workflows/workflow.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/workflow.yml (limited to '.github/workflows') diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..4117b73 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,34 @@ +name: Update README + +on: + push: + branches: [master] + +jobs: + reorganize: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Generate table with `lpm` + run: | + wget https://github.com/lite-xl/lite-xl-plugin-manager/releases/download/latest/lpm.x86_64-linux -O lpm && chmod +x lpm + # Unstub all stubs so we can make proper previews. + ./lpm --userdir . init . && ./lpm --userdir . color install "*" && ./lpm purge --userdir . + ./lpm exec scripts/make_preview_image.lua + perl -pi -e 'exit(0) if $_ =~ m/^\-\-\-/' README.md + echo "---" >> README.md + echo -e "\n## Dark\n" >> README.md + echo "| Theme | Preview" >> README.md + echo "| :------------------------------------------------------------ | :----------------------------------------------------" >> README.md + ./lpm table manifest.json --type color --tag "dark" | tail -n +3 | perl -pe '($w) = $_ =~ m/`([^`]+)`/; $_ =~ s/$/ \!\[$w\_preview\](previews\/$w.svg)/ if $w' >> README.md + echo -e "\n## Light\n" >> README.md + echo "| Theme | Preview" >> README.md + echo "| :------------------------------------------------------------ | :----------------------------------------------------" >> README.md + ./lpm table manifest.json --type color --tag "light" | tail -n +3 | perl -pe '($w) = $_ =~ m/`([^`]+)`/; $_ =~ s/$/ \!\[$w\_preview\](previews\/$w.svg)/ if $w' >> README.md + if ! git diff --exit-code -s README.md; then + git config --global user.name "Github Actions" && git config --global user.email "<>" + git add README.md previews + git commit -m '[CI] Updated README.md.' + git push + fi + -- cgit v1.2.3 From 9e404835133cd1f4f3568778ae4b1704fe9d3e35 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Sun, 17 Sep 2023 17:38:44 -0400 Subject: Updated with new lpm style table output. --- .github/workflows/workflow.yml | 8 +--- README.md | 84 +++++++++++++++++++++--------------------- 2 files changed, 44 insertions(+), 48 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 4117b73..b0fc92f 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -18,13 +18,9 @@ jobs: perl -pi -e 'exit(0) if $_ =~ m/^\-\-\-/' README.md echo "---" >> README.md echo -e "\n## Dark\n" >> README.md - echo "| Theme | Preview" >> README.md - echo "| :------------------------------------------------------------ | :----------------------------------------------------" >> README.md - ./lpm table manifest.json --type color --tag "dark" | tail -n +3 | perl -pe '($w) = $_ =~ m/`([^`]+)`/; $_ =~ s/$/ \!\[$w\_preview\](previews\/$w.svg)/ if $w' >> README.md + ./lpm list --repository . --type color --tag "dark" --table 'url,{string.format("![%s_preview](previews/%s.svg)", addon.id,addon.id)}' --type color --header Theme,Preview >> README.md echo -e "\n## Light\n" >> README.md - echo "| Theme | Preview" >> README.md - echo "| :------------------------------------------------------------ | :----------------------------------------------------" >> README.md - ./lpm table manifest.json --type color --tag "light" | tail -n +3 | perl -pe '($w) = $_ =~ m/`([^`]+)`/; $_ =~ s/$/ \!\[$w\_preview\](previews\/$w.svg)/ if $w' >> README.md + ./lpm list --repository . --type color --tag "light" --table 'url,{string.format("![%s_preview](previews/%s.svg)", addon.id,addon.id)}' --type color --header Theme,Preview >> README.md if ! git diff --exit-code -s README.md; then git config --global user.name "Github Actions" && git config --global user.email "<>" git add README.md previews diff --git a/README.md b/README.md index ba47468..d185079 100644 --- a/README.md +++ b/README.md @@ -25,48 +25,48 @@ embedded in the table.* ## Dark -| Theme | Preview -| :------------------------------------------------------------ | :---------------------------------------------------- -| [`abyss`](colors/abyss.lua?raw=1) | ![abyss_preview](previews/abyss.svg) -| [`ayu-dark`](https://github.com/juliardi/lite-xl-ayu-theme.git)\* | ![ayu-dark_preview](previews/ayu-dark.svg) -| [`ayu-mirage`](https://github.com/juliardi/lite-xl-ayu-theme.git)\* | ![ayu-mirage_preview](previews/ayu-mirage.svg) -| [`betelgeuse`](colors/betelgeuse.lua?raw=1) | ![betelgeuse_preview](previews/betelgeuse.svg) -| [`c0mfy`](colors/c0mfy.lua?raw=1) | ![c0mfy_preview](previews/c0mfy.svg) -| [`cold_lime`](colors/cold_lime.lua?raw=1) | ![cold_lime_preview](previews/cold_lime.svg) -| [`dracula`](colors/dracula.lua?raw=1) | ![dracula_preview](previews/dracula.svg) -| [`duorand`](colors/duorand.lua?raw=1) | ![duorand_preview](previews/duorand.svg) -| [`duotone`](colors/duotone.lua?raw=1) | ![duotone_preview](previews/duotone.svg) -| [`everforest`](colors/everforest.lua?raw=1) | ![everforest_preview](previews/everforest.svg) -| [`github-dark-dimmed`](colors/github-dark-dimmed.lua?raw=1) | ![github-dark-dimmed_preview](previews/github-dark-dimmed.svg) -| [`github_dark`](colors/github_dark.lua?raw=1) | ![github_dark_preview](previews/github_dark.svg) -| [`gruvbox_dark`](colors/gruvbox_dark.lua?raw=1) | ![gruvbox_dark_preview](previews/gruvbox_dark.svg) -| [`jb-fleet`](colors/jb-fleet.lua?raw=1) | ![jb-fleet_preview](previews/jb-fleet.svg) -| [`jellybeans`](colors/jellybeans.lua?raw=1) | ![jellybeans_preview](previews/jellybeans.svg) -| [`liqube`](colors/liqube.lua?raw=1) | ![liqube_preview](previews/liqube.svg) -| [`mariana`](colors/mariana.lua?raw=1) | ![mariana_preview](previews/mariana.svg) -| [`monodark`](colors/monodark.lua?raw=1) | ![monodark_preview](previews/monodark.svg) -| [`monokai`](colors/monokai.lua?raw=1) | ![monokai_preview](previews/monokai.svg) -| [`monokai-pro-classic`](colors/monokai-pro-classic.lua?raw=1) | ![monokai-pro-classic_preview](previews/monokai-pro-classic.svg) -| [`nord`](colors/nord.lua?raw=1) | ![nord_preview](previews/nord.svg) -| [`onedark`](colors/onedark.lua?raw=1) | ![onedark_preview](previews/onedark.svg) -| [`only_dark`](colors/only_dark.lua?raw=1) | ![only_dark_preview](previews/only_dark.svg) -| [`plasma`](colors/plasma.lua?raw=1) | ![plasma_preview](previews/plasma.svg) -| [`rose-pine`](colors/rose-pine.lua?raw=1) | ![rose-pine_preview](previews/rose-pine.svg) -| [`rose-pine-moon`](colors/rose-pine-moon.lua?raw=1) | ![rose-pine-moon_preview](previews/rose-pine-moon.svg) -| [`synthwave`](colors/synthwave.lua?raw=1) | ![synthwave_preview](previews/synthwave.svg) -| [`tokyo-night`](colors/tokyo-night.lua?raw=1) | ![tokyo-night_preview](previews/tokyo-night.svg) -| [`vscode-dark`](colors/vscode-dark.lua?raw=1) | ![vscode-dark_preview](previews/vscode-dark.svg) -| [`winter`](colors/winter.lua?raw=1) | ![winter_preview](previews/winter.svg) -| [`zenburn`](colors/zenburn.lua?raw=1) | ![zenburn_preview](previews/zenburn.svg) +Theme | Preview +------------------------------------------------------------------- | ---------------------------------------------------------------- +[`abyss`](colors/abyss.lua?raw=1) | ![abyss_preview](previews/abyss.svg) +[`ayu-dark`](https://github.com/juliardi/lite-xl-ayu-theme.git)\* | ![ayu-dark_preview](previews/ayu-dark.svg) +[`ayu-mirage`](https://github.com/juliardi/lite-xl-ayu-theme.git)\* | ![ayu-mirage_preview](previews/ayu-mirage.svg) +[`betelgeuse`](colors/betelgeuse.lua?raw=1) | ![betelgeuse_preview](previews/betelgeuse.svg) +[`c0mfy`](colors/c0mfy.lua?raw=1) | ![c0mfy_preview](previews/c0mfy.svg) +[`cold_lime`](colors/cold_lime.lua?raw=1) | ![cold_lime_preview](previews/cold_lime.svg) +[`dracula`](colors/dracula.lua?raw=1) | ![dracula_preview](previews/dracula.svg) +[`duorand`](colors/duorand.lua?raw=1) | ![duorand_preview](previews/duorand.svg) +[`duotone`](colors/duotone.lua?raw=1) | ![duotone_preview](previews/duotone.svg) +[`everforest`](colors/everforest.lua?raw=1) | ![everforest_preview](previews/everforest.svg) +[`github-dark-dimmed`](colors/github-dark-dimmed.lua?raw=1) | ![github-dark-dimmed_preview](previews/github-dark-dimmed.svg) +[`github_dark`](colors/github_dark.lua?raw=1) | ![github_dark_preview](previews/github_dark.svg) +[`gruvbox_dark`](colors/gruvbox_dark.lua?raw=1) | ![gruvbox_dark_preview](previews/gruvbox_dark.svg) +[`jb-fleet`](colors/jb-fleet.lua?raw=1) | ![jb-fleet_preview](previews/jb-fleet.svg) +[`jellybeans`](colors/jellybeans.lua?raw=1) | ![jellybeans_preview](previews/jellybeans.svg) +[`liqube`](colors/liqube.lua?raw=1) | ![liqube_preview](previews/liqube.svg) +[`mariana`](colors/mariana.lua?raw=1) | ![mariana_preview](previews/mariana.svg) +[`monodark`](colors/monodark.lua?raw=1) | ![monodark_preview](previews/monodark.svg) +[`monokai`](colors/monokai.lua?raw=1) | ![monokai_preview](previews/monokai.svg) +[`monokai-pro-classic`](colors/monokai-pro-classic.lua?raw=1) | ![monokai-pro-classic_preview](previews/monokai-pro-classic.svg) +[`nord`](colors/nord.lua?raw=1) | ![nord_preview](previews/nord.svg) +[`onedark`](colors/onedark.lua?raw=1) | ![onedark_preview](previews/onedark.svg) +[`only_dark`](colors/only_dark.lua?raw=1) | ![only_dark_preview](previews/only_dark.svg) +[`plasma`](colors/plasma.lua?raw=1) | ![plasma_preview](previews/plasma.svg) +[`rose-pine`](colors/rose-pine.lua?raw=1) | ![rose-pine_preview](previews/rose-pine.svg) +[`rose-pine-moon`](colors/rose-pine-moon.lua?raw=1) | ![rose-pine-moon_preview](previews/rose-pine-moon.svg) +[`synthwave`](colors/synthwave.lua?raw=1) | ![synthwave_preview](previews/synthwave.svg) +[`tokyo-night`](colors/tokyo-night.lua?raw=1) | ![tokyo-night_preview](previews/tokyo-night.svg) +[`vscode-dark`](colors/vscode-dark.lua?raw=1) | ![vscode-dark_preview](previews/vscode-dark.svg) +[`winter`](colors/winter.lua?raw=1) | ![winter_preview](previews/winter.svg) +[`zenburn`](colors/zenburn.lua?raw=1) | ![zenburn_preview](previews/zenburn.svg) ## Light -| Theme | Preview -| :------------------------------------------------------------ | :---------------------------------------------------- -| [`ayu-light`](https://github.com/juliardi/lite-xl-ayu-theme.git)\* | ![ayu-light_preview](previews/ayu-light.svg) -| [`github`](colors/github.lua?raw=1) | ![github_preview](previews/github.svg) -| [`gruvbox_light`](colors/gruvbox_light.lua?raw=1) | ![gruvbox_light_preview](previews/gruvbox_light.svg) -| [`moe`](colors/moe.lua?raw=1) | ![moe_preview](previews/moe.svg) -| [`rose-pine-dawn`](colors/rose-pine-dawn.lua?raw=1) | ![rose-pine-dawn_preview](previews/rose-pine-dawn.svg) -| [`solarized_light`](colors/solarized_light.lua?raw=1) | ![solarized_light_preview](previews/solarized_light.svg) -| [`solarobj`](colors/solarobj.lua?raw=1) | ![solarobj_preview](previews/solarobj.svg) +Theme | Preview +------------------------------------------------------------------ | -------------------------------------------------------- +[`ayu-light`](https://github.com/juliardi/lite-xl-ayu-theme.git)\* | ![ayu-light_preview](previews/ayu-light.svg) +[`github`](colors/github.lua?raw=1) | ![github_preview](previews/github.svg) +[`gruvbox_light`](colors/gruvbox_light.lua?raw=1) | ![gruvbox_light_preview](previews/gruvbox_light.svg) +[`moe`](colors/moe.lua?raw=1) | ![moe_preview](previews/moe.svg) +[`rose-pine-dawn`](colors/rose-pine-dawn.lua?raw=1) | ![rose-pine-dawn_preview](previews/rose-pine-dawn.svg) +[`solarized_light`](colors/solarized_light.lua?raw=1) | ![solarized_light_preview](previews/solarized_light.svg) +[`solarobj`](colors/solarobj.lua?raw=1) | ![solarobj_preview](previews/solarobj.svg) -- cgit v1.2.3 From 0a69c480204d41c5c9e2667972f1abe4d8f32c7a Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Sun, 17 Sep 2023 17:43:29 -0400 Subject: Fixed minor bug. --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index b0fc92f..0994fdf 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -14,7 +14,7 @@ jobs: wget https://github.com/lite-xl/lite-xl-plugin-manager/releases/download/latest/lpm.x86_64-linux -O lpm && chmod +x lpm # Unstub all stubs so we can make proper previews. ./lpm --userdir . init . && ./lpm --userdir . color install "*" && ./lpm purge --userdir . - ./lpm exec scripts/make_preview_image.lua + ./lpm exec scripts/make_preview_image.lua colors/* perl -pi -e 'exit(0) if $_ =~ m/^\-\-\-/' README.md echo "---" >> README.md echo -e "\n## Dark\n" >> README.md -- cgit v1.2.3 From 0b38ec93e8a625c6e5c8e6d33fd6cc960aab867f Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Sun, 17 Sep 2023 17:49:38 -0400 Subject: Added explanatory comment. --- .github/workflows/workflow.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.github/workflows') diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 0994fdf..6022eae 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -15,6 +15,7 @@ jobs: # Unstub all stubs so we can make proper previews. ./lpm --userdir . init . && ./lpm --userdir . color install "*" && ./lpm purge --userdir . ./lpm exec scripts/make_preview_image.lua colors/* + # Remove everything after the --- so we can regenerate it. perl -pi -e 'exit(0) if $_ =~ m/^\-\-\-/' README.md echo "---" >> README.md echo -e "\n## Dark\n" >> README.md -- cgit v1.2.3