Skip to content

Commit

Permalink
Merge branch 'hyde-gallery' into hyde-gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
kRHYME7 authored Nov 19, 2024
2 parents 6031e48 + 7040982 commit 59ebeaf
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 35 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Lint Code Base

on:
push:
branches: [ "hyde-gallery" ]
branches: ["hyde-gallery"]
pull_request:
branches: [ "hyde-gallery" ]
branches: ["hyde-gallery"]
jobs:
run-lint:
runs-on: ubuntu-latest
Expand All @@ -18,20 +18,22 @@ jobs:
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_PYTHON: false
VALIDATE_JSON: true
DEFAULT_BRANCH: "hyde-gallery"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Specify the Python version you need
python-version: "3.x" # Specify the Python version you need

- name: Run generate_readme.py
run: python generate_readme.py # Run the script from the root directory
run: python generate_readme.py # Run the script from the root directory

- name: Commit changes
run: |
git config --local user.name "GitHub Action"
git config --local user.email "[email protected]"
git add README.md # Specify the README file or use . for all changes
git add . # Specify the README file or use . for all changes
git commit -m "Update README from GitHub Actions" || echo "No changes to commit"
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,41 @@
| [![Abyssal-Wave](https://placehold.co/180x50/16161D/C8C093?text=Abyssal-Wave&font=Oswald)](https://github.com/Itz-Abhishek-Tiwari/Abyssal-Wave) | Dive into the deep, where elegance meets the infinite night. | [Itz-Abhishek-Tiwari](https://github.com/Itz-Abhishek-Tiwari) |
| [![Another World](https://placehold.co/180x50/11111B/6AA9C9?text=Another+World&font=Oswald)](https://github.com/cyb3rgh0u1/Another-World) | Step beyond the horizon, where reality fades and imagination reigns supreme. | [cyb3rgh0u1](https://github.com/cyb3rgh0u1) |
| [![Vanta Black](https://placehold.co/180x50/000000/FFFFFF?text=Vanta+Black&font=Oswald)](https://github.com/rishav12s/Vanta-Black) | Vanta Black inspired theme having the deepest blacks | [rishav12s](https://github.com/rishav12s) |
| [![Ice Age](https://placehold.co/180x50/00c1e4cc/0E2840B3?text=Ice+Age&font=Oswald)](https://github.com/saber-88/Ice-Age) | Winter based Ice Age theme for Hyde | [saber-88](https://github.com/saber-88) |
| [![Bad Blood](https://placehold.co/180x50/030000/DF1010?text=Bad+Blood&font=Oswald)](https://github.com/HyDE-Project/hyde-gallery/tree/Bad-Blood) | Red & Black based theme. | [HyDE-Project](https://github.com/HyDE-Project) |
| [![Solarized Dark](https://placehold.co/180x50/044655/259E9C?text=Solarized+Dark&font=Oswald)](https://github.com/rishav12s/Solarized-Dark) | Solarized Dark based theme for HyDE | [rishav12s](https://github.com/rishav12s) |
| [![Hack the Box](https://placehold.co/180x50/061234/50AA09?text=Hack+the+Box&font=Oswald)](https://github.com/HyDE-Project/hyde-gallery/tree/Hack-the-Box) | Hacker based theme | [T-Crypt](https://github.com/T-Crypt) |
| [![Crimson Blade](https://placehold.co/180x50/082451/D32D6B?text=Crimson+Blade&font=Oswald)](https://github.com/cyb3rgh0u1/Crimson-Blade) | A striking fusion of sharp elegance, cutting through the darkness with bold hues. | [cyb3rgh0u1](https://github.com/cyb3rgh0u1) |
| [![Sci-fi](https://placehold.co/180x50/0D55B2/249CB6?text=Sci-fi&font=Oswald)](https://github.com/KaranRaval123/Sci-fi) | Sci-fi based theme | [KaranRaval123](https://github.com/KaranRaval123) |
| [![Greenify](https://placehold.co/180x50/0e120f/295233?text=Greenify&font=Oswald)](https://github.com/mahaveergurjar/Theme-Gallery/tree/Greenify) | Dark Green based theme for Hyde | [mahaveergurjar](https://github.com/mahaveergurjar) |
| [![Decay Green](https://placehold.co/180x50/14161E/95D3AF?text=Decay+Green&font=Oswald)](https://github.com/HyDE-Project/hyde-themes/tree/Decay-Green) | Official Theme | [prasanthrangan](https://github.com/prasanthrangan) |
| [![Hack the Box](https://placehold.co/180x50/061234/50AA09?text=Hack+the+Box&font=Oswald)](https://github.com/HyDE-Project/hyde-gallery/tree/Hack-the-Box) | Hacker based theme | [T-Crypt](https://github.com/T-Crypt) |
| [![Oxo Carbon](https://placehold.co/180x50/161616/EE5396?text=Oxo+Carbon&font=Oswald)](https://github.com/rishav12s/Oxo-Carbon) | Oxo Carbon based theme for Hyde | [rishav12s](https://github.com/rishav12s) |
| [![Decay Green](https://placehold.co/180x50/14161E/95D3AF?text=Decay+Green&font=Oswald)](https://github.com/HyDE-Project/hyde-themes/tree/Decay-Green) | Official Theme | [prasanthrangan](https://github.com/prasanthrangan) |
| [![Abyssal-Wave](https://placehold.co/180x50/16161D/C8C093?text=Abyssal-Wave&font=Oswald)](https://github.com/Itz-Abhishek-Tiwari/Abyssal-Wave) | Dive into the deep, where elegance meets the infinite night. | [Itz-Abhishek-Tiwari](https://github.com/Itz-Abhishek-Tiwari) |
| [![Crimson Blade](https://placehold.co/180x50/082451/D32D6B?text=Crimson+Blade&font=Oswald)](https://github.com/cyb3rgh0u1/Crimson-Blade) | A striking fusion of sharp elegance, cutting through the darkness with bold hues. | [cyb3rgh0u1](https://github.com/cyb3rgh0u1) |
| [![One Dark](https://placehold.co/180x50/1E212B/5B6B76?text=One+Dark&font=Oswald)](https://github.com/RAprogramm/HyDe-Themes/tree/One-Dark) | One Dark based theme | [RAprogramm](https://github.com/RAprogramm) |
| [![Rain Dark](https://placehold.co/180x50/1E2233/822195?text=Rain+Dark&font=Oswald)](https://github.com/rishav12s/Rain-Dark) | Cozy new Rain based theme for HyDE | [rishav12s](https://github.com/rishav12s) |
| [![Graphite Mono](https://placehold.co/180x50/222222/D9D9D9?text=Graphite+Mono&font=Oswald)](https://github.com/HyDE-Project/hyde-themes/tree/Graphite-Mono) | Official Theme | [prasanthrangan](https://github.com/prasanthrangan) |
| [![Windows 11](https://placehold.co/180x50/277AE6/D2DCFD?text=Windows+11&font=Oswald)](https://github.com/HyDE-Project/hyde-gallery/tree/Windows-11) | Official Theme | [T-Crypt](https://github.com/T-Crypt) |
| [![Rain Dark](https://placehold.co/180x50/1E2233/822195?text=Rain+Dark&font=Oswald)](https://github.com/rishav12s/Rain-Dark) | Cozy new Rain based theme for HyDE | [rishav12s](https://github.com/rishav12s) |
| [![Pixel Dream](https://placehold.co/180x50/282828/EBDDB2?text=Pixel+Dream&font=Oswald)](https://github.com/rishav12s/Pixel-Dream) | Pixel Art inspired theme | [rishav12s](https://github.com/rishav12s) |
| [![Dracula](https://placehold.co/180x50/2B2E3B/607988?text=Dracula&font=Oswald)](https://github.com/RAprogramm/HyDe-Themes/tree/Dracula) | Dracula based theme | [RAprogramm](https://github.com/RAprogramm) |
| [![Monokai](https://placehold.co/180x50/2d2a2e/f92672?text=Monokai&font=Oswald)](https://github.com/mahaveergurjar/Theme-Gallery/tree/Monokai) | Monokai based theme for Hyde | [mahaveergurjar](https://github.com/mahaveergurjar) |
| [![Dracula](https://placehold.co/180x50/2B2E3B/607988?text=Dracula&font=Oswald)](https://github.com/RAprogramm/HyDe-Themes/tree/Dracula) | Dracula based theme | [RAprogramm](https://github.com/RAprogramm) |
| [![Solarized Dark](https://placehold.co/180x50/044655/259E9C?text=Solarized+Dark&font=Oswald)](https://github.com/rishav12s/Solarized-Dark) | Solarized Dark based theme for HyDE | [rishav12s](https://github.com/rishav12s) |
| [![Gruvbox Retro](https://placehold.co/180x50/353842/ADAE89?text=Gruvbox+Retro&font=Oswald)](https://github.com/HyDE-Project/hyde-themes/tree/Gruvbox-Retro) | Official Theme | [prasanthrangan](https://github.com/prasanthrangan) |
| [![AbyssGreen](https://placehold.co/180x50/373C3F/83B38E?text=AbyssGreen&font=Oswald)](https://github.com/Itz-Abhishek-Tiwari/AbyssGreen) | AbyssGreen is a theme based on the Everforst color scheme | [Itz-Abhishek-Tiwari](https://github.com/Itz-Abhishek-Tiwari) |
| [![Monterey Frost](https://placehold.co/180x50/3B4252/D8DEE9?text=Monterey+Frost&font=Oswald)](https://github.com/rishav12s/Monterey-Frost) | Mac-OS inspired dark theme | [rishav12s](https://github.com/rishav12s) |
| [![Paranoid Sweet](https://placehold.co/180x50/821595/51ABAB?text=Paranoid+Sweet&font=Oswald)](https://github.com/rishav12s/Paranoid-Sweet) | Dark purple based theme for HyDE | [rishav12s](https://github.com/rishav12s) |
| [![Sci-fi](https://placehold.co/180x50/0D55B2/249CB6?text=Sci-fi&font=Oswald)](https://github.com/KaranRaval123/Sci-fi) | Sci-fi based theme | [KaranRaval123](https://github.com/KaranRaval123) |
| [![Scarlet Night](https://placehold.co/180x50/FF0000/0A0A0A?text=Scarlet+Night&font=Oswald)](https://github.com/abenezerw/Scarlet-Night) | Hot-Red + Deep-Black | [abenezerw](https://github.com/abenezerw) |
| [![Synth Wave](https://placehold.co/180x50/495495/ff7edb?text=Synth+Wave&font=Oswald)](https://github.com/HyDE-Project/hyde-themes/tree/Synth-Wave) | Official Theme | [prasanthrangan](https://github.com/prasanthrangan) |
| [![Nordic Blue](https://placehold.co/180x50/7B98B8/CAD7E1?text=Nordic+Blue&font=Oswald)](https://github.com/HyDE-Project/hyde-themes/tree/Nordic-Blue) | Official Theme | [prasanthrangan](https://github.com/prasanthrangan) |
| [![Red Stone](https://placehold.co/180x50/7E5655/C94342?text=Red+Stone&font=Oswald)](https://github.com/mahaveergurjar/Theme-Gallery/tree/Red-Stone) | Hot Red based theme | [mahaveergurjar](https://github.com/mahaveergurjar) |
| [![Tokyo Night](https://placehold.co/180x50/7aa2f7/24283b?text=Tokyo+Night&font=Oswald)](https://github.com/HyDE-Project/hyde-themes/tree/Tokyo-Night) | Official Theme | [prasanthrangan](https://github.com/prasanthrangan) |
| [![Frosted Glass](https://placehold.co/180x50/7ed6ff/1e4c84?text=Frosted+Glass&font=Oswald)](https://github.com/HyDE-Project/hyde-themes/tree/Frosted-Glass) | Official Theme | [prasanthrangan](https://github.com/prasanthrangan) |
| [![Paranoid Sweet](https://placehold.co/180x50/821595/51ABAB?text=Paranoid+Sweet&font=Oswald)](https://github.com/rishav12s/Paranoid-Sweet) | Dark purple based theme for HyDE | [rishav12s](https://github.com/rishav12s) |
| [![Windows 11](https://placehold.co/180x50/277AE6/D2DCFD?text=Windows+11&font=Oswald)](https://github.com/HyDE-Project/hyde-gallery/tree/Windows-11) | Official Theme | [T-Crypt](https://github.com/T-Crypt) |
| [![Mac OS](https://placehold.co/180x50/857990/B9D7EA?text=Mac+OS&font=Oswald)](https://github.com/HyDE-Project/hyde-gallery/tree/Mac-Os) | Official Theme | [T-Crypt](https://github.com/T-Crypt) |
| [![Ice Age](https://placehold.co/180x50/00c1e4cc/0E2840B3?text=Ice+Age&font=Oswald)](https://github.com/saber-88/Ice-Age) | Winter based Ice Age theme for Hyde | [saber-88](https://github.com/saber-88) |
| [![Nordic Blue](https://placehold.co/180x50/7B98B8/CAD7E1?text=Nordic+Blue&font=Oswald)](https://github.com/HyDE-Project/hyde-themes/tree/Nordic-Blue) | Official Theme | [prasanthrangan](https://github.com/prasanthrangan) |
| [![Catppuccin Latte](https://placehold.co/180x50/dd7878/eff1f5?text=Catppuccin+Latte&font=Oswald)](https://github.com/HyDE-Project/hyde-themes/tree/Catppuccin-Latte) | Official Theme | [prasanthrangan](https://github.com/prasanthrangan) |
| [![Tokyo Night](https://placehold.co/180x50/7aa2f7/24283b?text=Tokyo+Night&font=Oswald)](https://github.com/HyDE-Project/hyde-themes/tree/Tokyo-Night) | Official Theme | [prasanthrangan](https://github.com/prasanthrangan) |
| [![Rosé Pine](https://placehold.co/180x50/c4a7e7/191724?text=Rosé+Pine&font=Oswald)](https://github.com/HyDE-Project/hyde-themes/tree/Rose-Pine) | Official Theme | [prasanthrangan](https://github.com/prasanthrangan) |
| [![Green Lush](https://placehold.co/180x50/89E574/153550?text=Green+Lush&font=Oswald)](https://github.com/abenezerw/Green-Lush) | A ghibli based theme for Hyde | [abenezerw](https://github.com/abenezerw) |
| [![Cat Latte](https://placehold.co/180x50/EFF1F5/DD7878?text=Cat+Latte&font=Oswald)](https://github.com/rishav12s/Cat-Latte) | Better Catppuccin-Latte that fixes the inconsistencies of the official theme | [rishav12s](https://github.com/rishav12s) |
| [![Scarlet Night](https://placehold.co/180x50/FF0000/0A0A0A?text=Scarlet+Night&font=Oswald)](https://github.com/abenezerw/Scarlet-Night) | Hot-Red + Deep-Black | [abenezerw](https://github.com/abenezerw) |
| [![Frosted Glass](https://placehold.co/180x50/7ed6ff/1e4c84?text=Frosted+Glass&font=Oswald)](https://github.com/HyDE-Project/hyde-themes/tree/Frosted-Glass) | Official Theme | [prasanthrangan](https://github.com/prasanthrangan) |
| [![Catppuccin Mocha](https://placehold.co/180x50/b4befe/11111b?text=Catppuccin+Mocha&font=Oswald)](https://github.com/HyDE-Project/hyde-themes/tree/Catppuccin-Mocha) | Official Theme | [prasanthrangan](https://github.com/prasanthrangan) |
| [![Rosé Pine](https://placehold.co/180x50/c4a7e7/191724?text=Rosé+Pine&font=Oswald)](https://github.com/HyDE-Project/hyde-themes/tree/Rose-Pine) | Official Theme | [prasanthrangan](https://github.com/prasanthrangan) |
| [![Catppuccin Latte](https://placehold.co/180x50/dd7878/eff1f5?text=Catppuccin+Latte&font=Oswald)](https://github.com/HyDE-Project/hyde-themes/tree/Catppuccin-Latte) | Official Theme | [prasanthrangan](https://github.com/prasanthrangan) |
| [![Material Sakura](https://placehold.co/180x50/f2e9e1/b4637a?text=Material+Sakura&font=Oswald)](https://github.com/HyDE-Project/hyde-themes/tree/Material-Sakura) | Official Theme | [prasanthrangan](https://github.com/prasanthrangan) |
| [![Edge Runner](https://placehold.co/180x50/fada16/000000?text=Edge+Runner&font=Oswald)](https://github.com/HyDE-Project/hyde-themes/tree/Edge-Runner) | Official Theme | [prasanthrangan](https://github.com/prasanthrangan) |
| [![Material Sakura](https://placehold.co/180x50/f2e9e1/b4637a?text=Material+Sakura&font=Oswald)](https://github.com/HyDE-Project/hyde-themes/tree/Material-Sakura) | Official Theme | [prasanthrangan](https://github.com/prasanthrangan) |
| [![Cat Latte](https://placehold.co/180x50/EFF1F5/DD7878?text=Cat+Latte&font=Oswald)](https://github.com/rishav12s/Cat-Latte) | Better Catppuccin-Latte that fixes the inconsistencies of the official theme | [rishav12s](https://github.com/rishav12s) |

<!-- TABLE_END -->

Expand Down
52 changes: 40 additions & 12 deletions generate_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,31 @@
import json

# Load JSON data from file
with open('hyde-themes.json', 'r', encoding='utf-8') as file:
with open("hyde-themes.json", "r", encoding="utf-8") as file:
data = json.load(file)

# Sort the data list based on theme name
# data.sort(key=lambda theme: theme.get("THEME", "N/A"))
# Sort the data list based on the first element of COLORSCHEME
data.sort(key=lambda theme: theme.get("COLORSCHEME", ["#000000"])[0])


def hex_to_intensity(hex_color):
"""Convert hex color to intensity"""
hex_color = hex_color.lstrip("#")
r = int(hex_color[0:2], 16)
g = int(hex_color[2:4], 16)
b = int(hex_color[4:6], 16)
return 0.299 * r + 0.587 * g + 0.114 * b


data.sort(
key=lambda theme: hex_to_intensity(
theme.get("COLORSCHEME", ["#000000"])[0]
if isinstance(theme.get("COLORSCHEME"), list)
and len(theme.get("COLORSCHEME")) > 0
else "#000000"
)
)

# Initialize the Markdown table
MD_TABLE = "| Theme | Description | Author |\n"
Expand All @@ -19,23 +37,28 @@
for theme in data:
theme_name = theme.get("THEME", "N/A")
description = theme.get("DESCRIPTION", "N/A")
author = theme.get("OWNER", "N/A").split('/')[-1]
author = theme.get("OWNER", "N/A").split("/")[-1]
link = theme.get("LINK", "#")
colorscheme = theme.get("COLORSCHEME", ["#000000", "#FFFFFF"])

# Generate the image link
image_link = f"https://placehold.co/180x50/{colorscheme[0][1:]}/{
colorscheme[1][1:]}?text={theme_name.replace(' ', '+')}&font=Oswald"

BASE_URL = "https://placehold.co/180x50"
color1 = colorscheme[0][1:]
color2 = colorscheme[1][1:]
text = theme_name.replace(" ", "+")
IMAGE_LINK = f"{BASE_URL}/{color1}/{color2}?text={text}&font=Oswald"
# Add the row to the table
MD_TABLE += f"| [![{theme_name}]({image_link})]({link}) | {
description} | [{author}]({theme.get('OWNER', '#')}) |\n"
MD_TABLE += (
f"| [![{theme_name}]({IMAGE_LINK})]({link}) | "
f"{description} | "
f"[{author}]({theme.get('OWNER', '#')}) |\n"
)

# Add the footer note and end marker
MD_TABLE += "\n<!-- TABLE_END -->"

# Read the contents of README.md
with open('README.md', 'r', encoding='utf-8') as readme_file:
with open("README.md", "r", encoding="utf-8") as readme_file:
readme_content = readme_file.read()

# Define the markers where the table content will be inserted
Expand All @@ -48,11 +71,16 @@
after_table = readme_content.split(END_MARK)[1]
updated_readme_content = before_table + "\n" + MD_TABLE + after_table
else:
updated_readme_content = readme_content + "\n" + \
"# Theme Gallery\n" + "<!-- TABLE_START -->\n" + MD_TABLE
updated_readme_content = (
readme_content
+ "\n"
+ "# Theme Gallery\n"
+ "<!-- TABLE_START -->\n"
+ MD_TABLE
)

# Write the updated content back to README.md
with open('README.md', 'w', encoding='utf-8') as readme_file:
with open("README.md", "w", encoding="utf-8") as readme_file:
readme_file.write(updated_readme_content)

print("README.md has been updated with the generated Markdown table.")

0 comments on commit 59ebeaf

Please sign in to comment.