From 51a0a020bb1aa4f08dd171749e9377ac9187ba8d Mon Sep 17 00:00:00 2001 From: kRHYME7 Date: Tue, 19 Nov 2024 10:56:00 +0800 Subject: [PATCH] I'm dumb! --- README.md | 0 generate_readme.py | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 README.md diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/generate_readme.py b/generate_readme.py index 0ddf292..de5f031 100755 --- a/generate_readme.py +++ b/generate_readme.py @@ -1,5 +1,6 @@ #!/bin/env python3 """"This is a script to generate a Markdown table for the README.md file""" +import os import json # Load JSON data from file @@ -79,7 +80,8 @@ def hex_to_intensity(hex_color): + MD_TABLE ) -import os +if not os.path.exists("README.md"): + os.chmod("README.md", 0o666) # Check if the script has write permissions for README.md if os.access("README.md", os.W_OK): @@ -89,5 +91,3 @@ def hex_to_intensity(hex_color): 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.")