From 45f5dc1bf8d89e4a61ebb70b93ae4aca230df4b9 Mon Sep 17 00:00:00 2001 From: Rajdeep Chakraborty Date: Wed, 30 Oct 2024 21:43:35 +0530 Subject: [PATCH 1/9] Added: File to store the project structure --- repo_structure.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 repo_structure.txt diff --git a/repo_structure.txt b/repo_structure.txt new file mode 100644 index 0000000..e69de29 From c402fddc36bc5c02f159ed6fd1ab436d0d5234f3 Mon Sep 17 00:00:00 2001 From: Rajdeep Chakraborty Date: Wed, 30 Oct 2024 21:44:03 +0530 Subject: [PATCH 2/9] Added: Seperate file to store the Project Strucutre --- PROJECT_STRUCTURE.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 PROJECT_STRUCTURE.md diff --git a/PROJECT_STRUCTURE.md b/PROJECT_STRUCTURE.md new file mode 100644 index 0000000..a6e25b9 --- /dev/null +++ b/PROJECT_STRUCTURE.md @@ -0,0 +1,3 @@ +## Project Structure ✨ + + \ No newline at end of file From 55a68ddbd783691a1ba7fef25da75c19143c4424 Mon Sep 17 00:00:00 2001 From: Rajdeep Chakraborty Date: Wed, 30 Oct 2024 22:02:40 +0530 Subject: [PATCH 3/9] Added: Python Code to update the Project Structure and automate it --- .github/scripts/update_structure.py | 101 ++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 .github/scripts/update_structure.py diff --git a/.github/scripts/update_structure.py b/.github/scripts/update_structure.py new file mode 100644 index 0000000..087a077 --- /dev/null +++ b/.github/scripts/update_structure.py @@ -0,0 +1,101 @@ +import os +import github +from github import Github + +# Helper function to recursively build the repo structure and include file extensions +def get_repo_structure(path='.', prefix=''): + structure = [] + try: + items = sorted(os.listdir(path)) + except FileNotFoundError: + print(f"Path not found: {path}") + return structure + + for i, item in enumerate(items): + if item.startswith('.'): + continue # Skip hidden files and directories + item_path = os.path.join(path, item) + is_last = i == len(items) - 1 + current_prefix = '└── ' if is_last else '├── ' + + if os.path.isdir(item_path): + # Directory case + structure.append(f"{prefix}{current_prefix}{item}/") + next_prefix = prefix + (' ' if is_last else '│ ') + structure.extend(get_repo_structure(item_path, next_prefix)) + else: + # File case with extension + file_name, file_extension = os.path.splitext(item) + structure.append(f"{prefix}{current_prefix}{file_name}{file_extension}") + + return structure + +# Function to update the repo_structure.txt file +def update_structure_file(structure): + try: + with open('repo_structure.txt', 'w') as f: + f.write('\n'.join(structure)) + print("repo_structure.txt updated successfully.") + except IOError as e: + print(f"Error writing to repo_structure.txt: {e}") + +# Function to update the README.md with the new structure +def update_README(structure): + try: + with open('PROJECT_STRUCTURE.md', 'r') as f: + content = f.read() + except FileNotFoundError: + print("PROJECT_STRUCTURE.md not found.") + return + + start_marker = '' + end_marker = '' + + start_index = content.find(start_marker) + end_index = content.find(end_marker) + + if start_index != -1 and end_index != -1: + new_content = ( + content[:start_index + len(start_marker)] + + '\n```\n' + '\n'.join(structure) + '\n```\n' + + content[end_index:] + ) + try: + with open('PROJECT_STRUCTURE.md', 'w') as f: + f.write(new_content) + print("PROJECT_STRUCTURE.md updated with new structure.") + except IOError as e: + print(f"Error writing to PROJECT_STRUCTURE.md: {e}") + else: + print("Markers not found in PROJECT_STRUCTURE.md. Structure not updated.") + +# Main function to compare and update repository structure +def main(): + gh_token = os.getenv('GH_TOKEN') + gh_repo = os.getenv('GITHUB_REPOSITORY') + + if not gh_token or not gh_repo: + print("Environment variables GH_TOKEN and GITHUB_REPOSITORY must be set.") + return + + g = Github(gh_token) + repo = g.get_repo(gh_repo) + + current_structure = get_repo_structure() + + try: + # Fetch the contents of repo_structure.txt from GitHub + contents = repo.get_contents("repo_structure.txt") + existing_structure = contents.decoded_content.decode().split('\n') + except github.GithubException: + existing_structure = None + + if current_structure != existing_structure: + update_structure_file(current_structure) + update_README(current_structure) + print("Repository structure updated.") + else: + print("No changes in repository structure.") + +if __name__ == "__main__": + main() \ No newline at end of file From e2e030e364ddb53c96397e8bc7cce74021f52226 Mon Sep 17 00:00:00 2001 From: Rajdeep Chakraborty Date: Wed, 30 Oct 2024 22:03:07 +0530 Subject: [PATCH 4/9] Added: Workflow to update Project Repository --- .github/workflows/update-readme.yml | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/update-readme.yml diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml new file mode 100644 index 0000000..211e05d --- /dev/null +++ b/.github/workflows/update-readme.yml @@ -0,0 +1,41 @@ +name: Update Repository structure + +on: + schedule: + - cron: '0 * * * *' # Run every hour + workflow_dispatch: # Allow manual triggering + push: + branches: + # - main + # Adding branch to check the feature on local repo first + - auto + +jobs: + detect-and-update-structure: + runs-on: ubuntu-latest + permissions: + contents: write # Permission to the GitHub Bot to access and update the Project Repository + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.12 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install PyGithub + - name: Run update script + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: python .github/scripts/update_structure.py # Run the python script to create/update the repo sturcture + + - name: Commit and push if changed # Commit and push changes to the head branch(main) + run: | + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config user.name "github-actions[bot]" + git add . + git diff --quiet && git diff --staged --quiet || (git commit -m "Update repo structure" && git push) \ No newline at end of file From ca3c4f2c99fcb87ca3edf2d99da5f8088ec7f12a Mon Sep 17 00:00:00 2001 From: Rajdeep Chakraborty Date: Wed, 30 Oct 2024 22:03:30 +0530 Subject: [PATCH 5/9] Added: Initial Structure --- PROJECT_STRUCTURE.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PROJECT_STRUCTURE.md b/PROJECT_STRUCTURE.md index a6e25b9..e2e0db4 100644 --- a/PROJECT_STRUCTURE.md +++ b/PROJECT_STRUCTURE.md @@ -1,3 +1,4 @@ ## Project Structure ✨ - \ No newline at end of file + + \ No newline at end of file From 94cd238a160c2ad62b55146a83ff019205039352 Mon Sep 17 00:00:00 2001 From: Rajdeep Chakraborty Date: Wed, 30 Oct 2024 22:04:06 +0530 Subject: [PATCH 6/9] Added: Redirect to the Project Repository from the Readme file --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index cc75670..cae5d90 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,9 @@ ChaosWeb is proudly part of global initiatives engaging with passionate develope +## ✨ Project Structure + +Check the project structure here [Project Structure](PROJECT_STRUCTURE.md) and choose where to start with spreading chaos. ## 💥Live Preview: **[Chaos web🚀](https://chaosweb.vercel.app/)** From 58cd1c9f568f37deed42fdc0505206594459e6c9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 16:34:54 +0000 Subject: [PATCH 7/9] Update repo structure --- PROJECT_STRUCTURE.md | 173 +++++++++++++++++++++++++++++++++++++++++++ repo_structure.txt | 171 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 344 insertions(+) diff --git a/PROJECT_STRUCTURE.md b/PROJECT_STRUCTURE.md index e2e0db4..ea35a0e 100644 --- a/PROJECT_STRUCTURE.md +++ b/PROJECT_STRUCTURE.md @@ -1,4 +1,177 @@ ## Project Structure ✨ +``` +├── 3d-effect-hypnosis-spiral-vector-7844424.jpg +├── CODE_OF_CONDUCT.md +├── CONTRIBUTING.md +├── ConnectFour.html +├── ContactUs.html +├── IMG_20241015_121622.jpg +├── LICENSE +├── LightsOut.html +├── PROJECT_STRUCTURE.md +├── README.md +├── SECURITY.md +├── Simongame.html +├── Timeline.html +├── WordGuessingGame.html +├── assets/ +│ ├── Order And Chaos.png +│ ├── colourfulbg.png +│ ├── crayonbg.png +│ ├── logo/ +│ │ ├── ChaosWeb.jpg +│ │ ├── ChaosWeb.png +│ │ ├── ChaosWeb.svg +│ │ ├── ChaosWeb.tiff +│ │ ├── ChaosWeb.webp +│ │ ├── chaosweb_topborder-removebg.png +│ │ ├── favicon.ico +│ │ └── logo2.png +│ ├── mazeIcon.png +│ ├── moon1.png +│ └── moon2.png +├── chaos.html +├── chaosweb-v@2/ +│ ├── README.md +│ ├── eslint.config.js +│ ├── index.html +│ ├── package-lock.json +│ ├── package.json +│ ├── postcss.config.js +│ ├── public/ +│ │ ├── assets/ +│ │ │ ├── js/ +│ │ │ │ ├── night_time.js +│ │ │ │ ├── script.js +│ │ │ │ └── sound.js +│ │ │ ├── logo/ +│ │ │ │ ├── ChaosWeb.jpg +│ │ │ │ ├── ChaosWeb.png +│ │ │ │ ├── ChaosWeb.svg +│ │ │ │ ├── ChaosWeb.tiff +│ │ │ │ ├── ChaosWeb.webp +│ │ │ │ └── favicon.ico +│ │ │ └── react.svg +│ │ └── logo.png +│ ├── src/ +│ │ ├── App.css +│ │ ├── App.jsx +│ │ ├── assets/ +│ │ │ ├── boy1.jpeg +│ │ │ ├── boy2.jpeg +│ │ │ ├── boy3.jpeg +│ │ │ ├── creepyImg/ +│ │ │ │ ├── jump-scare-2.jpg +│ │ │ │ ├── jump-scare-3.jpg +│ │ │ │ ├── jump-scare-4.jpg +│ │ │ │ ├── jump-scare-5.jpg +│ │ │ │ └── jump-scare.jpg +│ │ │ ├── girl1.jpeg +│ │ │ ├── girl2.jpeg +│ │ │ ├── hamsterSound.mp3 +│ │ │ ├── logo/ +│ │ │ │ ├── ChaosWeb.jpg +│ │ │ │ ├── ChaosWeb.png +│ │ │ │ ├── ChaosWeb.svg +│ │ │ │ ├── ChaosWeb.tiff +│ │ │ │ ├── ChaosWeb.webp +│ │ │ │ ├── boy2.jpeg +│ │ │ │ ├── favicon.ico +│ │ │ │ └── logo.png +│ │ │ ├── monkey.jpg +│ │ │ ├── react.svg +│ │ │ └── snowstruct.png +│ │ ├── components/ +│ │ │ ├── FireRain.css +│ │ │ ├── FireRain.jsx +│ │ │ ├── Firework.css +│ │ │ ├── Firework.jsx +│ │ │ ├── FloatingRain.css +│ │ │ ├── FloatingRain.jsx +│ │ │ ├── InvertColorToggle.jsx +│ │ │ ├── JumpScareEffect.css +│ │ │ ├── JumpScareEffect.jsx +│ │ │ ├── MazeGame.css +│ │ │ ├── MazeGame.jsx +│ │ │ ├── Snowfall.css +│ │ │ ├── Snowfall.jsx +│ │ │ ├── Starfield.css +│ │ │ ├── Starfield.jsx +│ │ │ ├── navbar.css +│ │ │ ├── navbar.jsx +│ │ │ └── popup.jsx +│ │ ├── index.css +│ │ ├── main.jsx +│ │ ├── pages/ +│ │ │ ├── BarrelRoll.css +│ │ │ ├── BarrelRoll.jsx +│ │ │ ├── BouncingDiv.jsx +│ │ │ ├── ButtonCollection.css +│ │ │ ├── ButtonCollection.jsx +│ │ │ ├── ChaosMania.css +│ │ │ ├── ChaosMania.jsx +│ │ │ ├── Contributors.css +│ │ │ ├── Contributors.jsx +│ │ │ ├── HypnoticChaos.jsx +│ │ │ ├── Review.jsx +│ │ │ ├── Timeline.css +│ │ │ ├── contact.css +│ │ │ ├── contact.jsx +│ │ │ ├── home.jsx +│ │ │ ├── review.css +│ │ │ └── timeline.jsx +│ │ └── utils/ +│ │ └── pages.js +│ ├── style.css +│ ├── tailwind.config.js +│ └── vite.config.js +├── css/ +│ ├── contactus.css +│ ├── style.css +│ └── styles.css +├── emojiland.html +├── hypnotic.html +├── index.html +├── js/ +│ ├── night_time.js +│ ├── script.js +│ ├── script1.js +│ ├── searchbar.js +│ └── sound.js +├── maze.html +├── night_time.html +├── node_modules/ +├── package-lock.json +├── preloader.js +├── preloaderStyle.css +├── repo_structure.txt +├── sfx/ +│ ├── Emoji-Land/ +│ │ ├── digital-chaos.mp3 +│ │ ├── drammatic-cinematic-glitch.mp3 +│ │ ├── electric-wasps.mp3 +│ │ ├── glitch-sound.mp3 +│ │ ├── hurricane.mp3 +│ │ └── intro-music-black-box-dirty-glitch.mp3 +│ ├── bird.mp3 +│ ├── buffalo.mp3 +│ ├── cat1.mp3 +│ ├── cat2.mp3 +│ ├── eagle-squawking-type-2-235997.mp3 +│ ├── elephant1.mp3 +│ ├── elephant2.mp3 +│ ├── mixkit-annoyed-big-dog-barking-51.wav +│ ├── mixkit-scared-horse-neighing-85.wav +│ ├── mixkit-sweet-kitty-meow-93.wav +│ ├── penguin.mp3 +│ ├── rooster.mp3 +│ ├── source.md +│ └── tiger.mp3 +├── signup.html +├── style1.css +├── testing.html +└── yarn.lock +``` \ No newline at end of file diff --git a/repo_structure.txt b/repo_structure.txt index e69de29..c4a758c 100644 --- a/repo_structure.txt +++ b/repo_structure.txt @@ -0,0 +1,171 @@ +├── 3d-effect-hypnosis-spiral-vector-7844424.jpg +├── CODE_OF_CONDUCT.md +├── CONTRIBUTING.md +├── ConnectFour.html +├── ContactUs.html +├── IMG_20241015_121622.jpg +├── LICENSE +├── LightsOut.html +├── PROJECT_STRUCTURE.md +├── README.md +├── SECURITY.md +├── Simongame.html +├── Timeline.html +├── WordGuessingGame.html +├── assets/ +│ ├── Order And Chaos.png +│ ├── colourfulbg.png +│ ├── crayonbg.png +│ ├── logo/ +│ │ ├── ChaosWeb.jpg +│ │ ├── ChaosWeb.png +│ │ ├── ChaosWeb.svg +│ │ ├── ChaosWeb.tiff +│ │ ├── ChaosWeb.webp +│ │ ├── chaosweb_topborder-removebg.png +│ │ ├── favicon.ico +│ │ └── logo2.png +│ ├── mazeIcon.png +│ ├── moon1.png +│ └── moon2.png +├── chaos.html +├── chaosweb-v@2/ +│ ├── README.md +│ ├── eslint.config.js +│ ├── index.html +│ ├── package-lock.json +│ ├── package.json +│ ├── postcss.config.js +│ ├── public/ +│ │ ├── assets/ +│ │ │ ├── js/ +│ │ │ │ ├── night_time.js +│ │ │ │ ├── script.js +│ │ │ │ └── sound.js +│ │ │ ├── logo/ +│ │ │ │ ├── ChaosWeb.jpg +│ │ │ │ ├── ChaosWeb.png +│ │ │ │ ├── ChaosWeb.svg +│ │ │ │ ├── ChaosWeb.tiff +│ │ │ │ ├── ChaosWeb.webp +│ │ │ │ └── favicon.ico +│ │ │ └── react.svg +│ │ └── logo.png +│ ├── src/ +│ │ ├── App.css +│ │ ├── App.jsx +│ │ ├── assets/ +│ │ │ ├── boy1.jpeg +│ │ │ ├── boy2.jpeg +│ │ │ ├── boy3.jpeg +│ │ │ ├── creepyImg/ +│ │ │ │ ├── jump-scare-2.jpg +│ │ │ │ ├── jump-scare-3.jpg +│ │ │ │ ├── jump-scare-4.jpg +│ │ │ │ ├── jump-scare-5.jpg +│ │ │ │ └── jump-scare.jpg +│ │ │ ├── girl1.jpeg +│ │ │ ├── girl2.jpeg +│ │ │ ├── hamsterSound.mp3 +│ │ │ ├── logo/ +│ │ │ │ ├── ChaosWeb.jpg +│ │ │ │ ├── ChaosWeb.png +│ │ │ │ ├── ChaosWeb.svg +│ │ │ │ ├── ChaosWeb.tiff +│ │ │ │ ├── ChaosWeb.webp +│ │ │ │ ├── boy2.jpeg +│ │ │ │ ├── favicon.ico +│ │ │ │ └── logo.png +│ │ │ ├── monkey.jpg +│ │ │ ├── react.svg +│ │ │ └── snowstruct.png +│ │ ├── components/ +│ │ │ ├── FireRain.css +│ │ │ ├── FireRain.jsx +│ │ │ ├── Firework.css +│ │ │ ├── Firework.jsx +│ │ │ ├── FloatingRain.css +│ │ │ ├── FloatingRain.jsx +│ │ │ ├── InvertColorToggle.jsx +│ │ │ ├── JumpScareEffect.css +│ │ │ ├── JumpScareEffect.jsx +│ │ │ ├── MazeGame.css +│ │ │ ├── MazeGame.jsx +│ │ │ ├── Snowfall.css +│ │ │ ├── Snowfall.jsx +│ │ │ ├── Starfield.css +│ │ │ ├── Starfield.jsx +│ │ │ ├── navbar.css +│ │ │ ├── navbar.jsx +│ │ │ └── popup.jsx +│ │ ├── index.css +│ │ ├── main.jsx +│ │ ├── pages/ +│ │ │ ├── BarrelRoll.css +│ │ │ ├── BarrelRoll.jsx +│ │ │ ├── BouncingDiv.jsx +│ │ │ ├── ButtonCollection.css +│ │ │ ├── ButtonCollection.jsx +│ │ │ ├── ChaosMania.css +│ │ │ ├── ChaosMania.jsx +│ │ │ ├── Contributors.css +│ │ │ ├── Contributors.jsx +│ │ │ ├── HypnoticChaos.jsx +│ │ │ ├── Review.jsx +│ │ │ ├── Timeline.css +│ │ │ ├── contact.css +│ │ │ ├── contact.jsx +│ │ │ ├── home.jsx +│ │ │ ├── review.css +│ │ │ └── timeline.jsx +│ │ └── utils/ +│ │ └── pages.js +│ ├── style.css +│ ├── tailwind.config.js +│ └── vite.config.js +├── css/ +│ ├── contactus.css +│ ├── style.css +│ └── styles.css +├── emojiland.html +├── hypnotic.html +├── index.html +├── js/ +│ ├── night_time.js +│ ├── script.js +│ ├── script1.js +│ ├── searchbar.js +│ └── sound.js +├── maze.html +├── night_time.html +├── node_modules/ +├── package-lock.json +├── preloader.js +├── preloaderStyle.css +├── repo_structure.txt +├── sfx/ +│ ├── Emoji-Land/ +│ │ ├── digital-chaos.mp3 +│ │ ├── drammatic-cinematic-glitch.mp3 +│ │ ├── electric-wasps.mp3 +│ │ ├── glitch-sound.mp3 +│ │ ├── hurricane.mp3 +│ │ └── intro-music-black-box-dirty-glitch.mp3 +│ ├── bird.mp3 +│ ├── buffalo.mp3 +│ ├── cat1.mp3 +│ ├── cat2.mp3 +│ ├── eagle-squawking-type-2-235997.mp3 +│ ├── elephant1.mp3 +│ ├── elephant2.mp3 +│ ├── mixkit-annoyed-big-dog-barking-51.wav +│ ├── mixkit-scared-horse-neighing-85.wav +│ ├── mixkit-sweet-kitty-meow-93.wav +│ ├── penguin.mp3 +│ ├── rooster.mp3 +│ ├── source.md +│ └── tiger.mp3 +├── signup.html +├── style1.css +├── testing.html +└── yarn.lock \ No newline at end of file From 3babf22885fb4d56964095632b6f26274c3e2647 Mon Sep 17 00:00:00 2001 From: Rajdeep Chakraborty Date: Wed, 30 Oct 2024 22:09:48 +0530 Subject: [PATCH 8/9] Updated: Branch of updation from 'auto' to 'main' --- .github/workflows/update-readme.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml index 211e05d..c4f6b81 100644 --- a/.github/workflows/update-readme.yml +++ b/.github/workflows/update-readme.yml @@ -6,9 +6,7 @@ on: workflow_dispatch: # Allow manual triggering push: branches: - # - main - # Adding branch to check the feature on local repo first - - auto + - main jobs: detect-and-update-structure: From 70decd5a562d330a04503721c73b1786ca4279fe Mon Sep 17 00:00:00 2001 From: Rajdeep Chakraborty Date: Wed, 30 Oct 2024 23:11:23 +0530 Subject: [PATCH 9/9] Removed Project Structure from the Contributing.md file --- CONTRIBUTING.md | 69 ------------------------------------------------- 1 file changed, 69 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fea35f6..6fb6da6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,75 +29,6 @@ If you're new to Git and GitHub, no worries! Here are some useful resources:
-# Project Structure 📂 - -```bash -ChaosWeb/ -├── .github/ # GitHub-related configurations such as workflows, issue templates, etc -│ -├── assets/ # Some images -│ -├── chaosweb-v@2/ # Contains index.html and also some core components of the project -│ -├── css/ # Contains stylesheet files -│ -├── js/ # Contains javascript files -│ -├── node_modules/ # Contains the integrity files -│ -├── sfx/ # Contains sound effects -│ -├── .gitignore -│ -├── 3d-effect-hypnosis-spiral-vector-7844424.jpg -│ -├── chaos.html -│ -├── CODE_OF_CONDUCT.md # Some rules for contributors -├── -├── ContactUs.html # Contains the contact us page -├── -├── CONTRIBUTING.md # Instructions for the contributors -├── -├── emojiland.html -├── -├── hypnotic.html -├── -├── IMG_20241015_121622.jpg -├── -├── index.html # The main .html page -├── -├── LICENSE # A permission to do something -├── -├── maze.html -├── -├── night_time.html -├── -├── package-lock.json -├── -├── preloader.js -├── -├── preloaderStyle.css -├── -├── README.md # Some instructions related to the contributions -├── -├── SECURITY.md -├── -├── signup.html -├── -├── Simongame.html -├── -├── style1.css -├── -├── testing.html -├── -├── Timeline.html -├── -├── yarn.lock -``` - -
- # First Pull Request ✨ 1. **Star this repository**