From f965290ba4a6d5b397fe597fe64ace6ce5e26983 Mon Sep 17 00:00:00 2001 From: Sushant Bagul Date: Sat, 10 Aug 2024 20:20:42 +0530 Subject: [PATCH 1/5] first commit --- .github/workflows/submissions.yml | 84 +++++++++++++++++++++++++++++++ docs/submissions.py | 54 ++++++++++++++++++++ 2 files changed, 138 insertions(+) create mode 100644 .github/workflows/submissions.yml create mode 100644 docs/submissions.py diff --git a/.github/workflows/submissions.yml b/.github/workflows/submissions.yml new file mode 100644 index 0000000..47df3a3 --- /dev/null +++ b/.github/workflows/submissions.yml @@ -0,0 +1,84 @@ +name: Process and Update Submissions + +on: + push: + branches: + - master + +jobs: + process: + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: List directory contents + run: | + ls -R + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Run submission processing script + run: | + python docs/submissions.py + + - name: Commit changes + run: | + git add docs/submissions.md + git commit -m "Update submissions.md with processed links" || echo "No changes to commit" + git push + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + + +# name: Process and Update Submissions + +# on: +# push: +# branches: +# - master + +# jobs: +# process: +# runs-on: ubuntu-latest + +# permissions: +# contents: write + +# steps: +# - name: Checkout repository +# uses: actions/checkout@v3 + +# - name: List directory contents +# run: | +# ls -R + +# - name: Install dependencies +# run: | +# python -m pip install --upgrade pip +# pip install -r requirements.txt + +# - name: Run submission processing script +# run: | +# python docs/submissions.py + +# - name: Configure Git +# run: | +# git config --local user.email "sushantbagul074@gmail.com" +# git config --local user.name "Sushant" + +# - name: Commit changes +# run: | +# git add docs/submissions.md +# git commit -m "Update submissions.md with processed links" || echo "No changes to commit" +# git push +# env: +# PAT_TOKEN: ${{ secrets.PAT_TOKEN }} diff --git a/docs/submissions.py b/docs/submissions.py new file mode 100644 index 0000000..f267285 --- /dev/null +++ b/docs/submissions.py @@ -0,0 +1,54 @@ +# The script code, adjusted to write directly to 'submissions.md' + +import re + +def convert_table_links(): + input_file = 'docs/submissions.md' + output_file = 'docs/submissions.md' + + with open(input_file, 'r') as f: + content = f.read() + + # Regular expressions to match table rows + separator_pattern = re.compile(r'^\|[-| ]+\|[-| ]+\|[-| ]+\|$') + row_pattern = re.compile(r'^\|([^|\n]+?)\|([^|\n]+?)\|([^|\n]+?)\|$') + + # Flag to start processing inside a table + in_table = False + output_lines = [] + + def debug_log(line, status): + print(f"Processing line: {line} | Status: {status}") + + # Process content + for line in content.splitlines(): + if separator_pattern.match(line): + in_table = True + debug_log(line, "Table separator detected") + elif row_pattern.match(line): + if in_table: + match = row_pattern.match(line) + if match: + name, url1, url2 = [s.strip() for s in match.groups()] + url1 = f'[{url1}]({url1})' if url1 and not url1.startswith('[') else url1 + url2 = f'[{url2}]({url2})' if url2 and not url2.startswith('[') else url2 + line = f'| {name} | {url1} | {url2} |' + debug_log(line, "Row processed") + else: + debug_log(line, "Row not matched") + else: + debug_log(line, "Row found outside of table") + else: + if in_table: + in_table = False + debug_log(line, "End of table detected") + + output_lines.append(line) + + new_content = '\n'.join(output_lines) + + with open(output_file, 'w') as f: + f.write(new_content) + +# Run the function +convert_table_links() From 5f0ac225206cdb0a1630d2b97b81c8d4bf9b0221 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 10 Aug 2024 14:51:44 +0000 Subject: [PATCH 2/5] docs(contributor): contrib-readme-action has updated readme --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index e2790af..894a964 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,13 @@ Thank you to everyone who decides to participate. Community challenges like this Suryendu Bhattacharyya + + + Sushant1209 +
+ Sushant Bagul +
+ Samuel7050 @@ -93,6 +100,8 @@ Thank you to everyone who decides to participate. Community challenges like this Meriem Terki + + JQCVSC @@ -100,8 +109,6 @@ Thank you to everyone who decides to participate. Community challenges like this JQCVSC - - heinhtetwin @@ -137,6 +144,8 @@ Thank you to everyone who decides to participate. Community challenges like this Zablon + + TomiwaAribisala-git @@ -144,8 +153,6 @@ Thank you to everyone who decides to participate. Community challenges like this Tomiwa - - rohit1101 @@ -181,21 +188,14 @@ Thank you to everyone who decides to participate. Community challenges like this Jaivir Baweja + + vikramnayyarcs
Vikram
- - - - - - Sushant1209 -
- Sushant Bagul -
From 3019e5dad7c131de00b5489f5bd8a0af8d8ef0ab Mon Sep 17 00:00:00 2001 From: Sushant Bagul <92586894+Sushant1209@users.noreply.github.com> Date: Sat, 10 Aug 2024 20:29:03 +0530 Subject: [PATCH 3/5] Update submissions.yml --- .github/workflows/submissions.yml | 45 ------------------------------- 1 file changed, 45 deletions(-) diff --git a/.github/workflows/submissions.yml b/.github/workflows/submissions.yml index 47df3a3..a97ceca 100644 --- a/.github/workflows/submissions.yml +++ b/.github/workflows/submissions.yml @@ -37,48 +37,3 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - -# name: Process and Update Submissions - -# on: -# push: -# branches: -# - master - -# jobs: -# process: -# runs-on: ubuntu-latest - -# permissions: -# contents: write - -# steps: -# - name: Checkout repository -# uses: actions/checkout@v3 - -# - name: List directory contents -# run: | -# ls -R - -# - name: Install dependencies -# run: | -# python -m pip install --upgrade pip -# pip install -r requirements.txt - -# - name: Run submission processing script -# run: | -# python docs/submissions.py - -# - name: Configure Git -# run: | -# git config --local user.email "sushantbagul074@gmail.com" -# git config --local user.name "Sushant" - -# - name: Commit changes -# run: | -# git add docs/submissions.md -# git commit -m "Update submissions.md with processed links" || echo "No changes to commit" -# git push -# env: -# PAT_TOKEN: ${{ secrets.PAT_TOKEN }} From ead380ba00949499c4783803e6c5556d0831f20a Mon Sep 17 00:00:00 2001 From: Sushant Bagul <92586894+Sushant1209@users.noreply.github.com> Date: Tue, 13 Aug 2024 15:11:44 +0530 Subject: [PATCH 4/5] Update submissions.md --- docs/submissions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submissions.md b/docs/submissions.md index 5f703d8..012504a 100644 --- a/docs/submissions.md +++ b/docs/submissions.md @@ -31,7 +31,7 @@ This is the place to add your own Cloud Resume API project! | Name | Resume API URL | GitHub Repo | |---------------|--------------------------------------------------------------------------------------------------------------------------| ----------- | | CityHallin | https://api.cityhallin.com/v1/resume?name=cityhallin | https://github.com/CityHallin/cloud_resume_api_challenge | -| Sushant Bagul | https://sushantresumeapi.azurewebsites.net/resumeapi?id=1 | https://github.com/Sushant1209/Azure-Resume-API-Challenge | +| Sushant Bagul | https://sushantbagul.azurewebsites.net/resumeapi?id=1 | https://github.com/Sushant1209/Azure-Resume-API-Challenge | | Charles Nwoye | [https://jkcloudresumeapi.azurewebsites.net/api/resume?id=1](https://jkcloudresumeapi.azurewebsites.net/api/resume?id=1) | [https://github.com/Jekwulum/cloud-resume-api.git](https://github.com/Jekwulum/cloud-resume-api.git) | | Hamit Sehjal | https://resume26hamitfunc.azurewebsites.net/hamitsehjal | https://github.com/hamitsehjal/Serverless-Cloud-Resume | From 51ec32b7569433321a90263a7b77d83f54705b2a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 09:41:56 +0000 Subject: [PATCH 5/5] docs(contributor): contrib-readme-action has updated readme --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 894a964..046873a 100644 --- a/README.md +++ b/README.md @@ -73,17 +73,17 @@ Thank you to everyone who decides to participate. Community challenges like this - - SuryenduB + + Sushant1209
- Suryendu Bhattacharyya + Sushant Bagul
- - Sushant1209 + + SuryenduB
- Sushant Bagul + Suryendu Bhattacharyya