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 59ebeaf + 7fc79cd commit 7168aa7
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions generate_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,15 @@ def hex_to_intensity(hex_color):
+ MD_TABLE
)

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

# Check if the script has write permissions for README.md
if os.access("README.md", os.W_OK):
# Write the updated content back to README.md
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.")
else:
print("Permission denied: 'README.md'. Please check the file permissions.")

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

0 comments on commit 7168aa7

Please sign in to comment.