From 162464c3cdc9c291a15abbf7bfed05775eb71b10 Mon Sep 17 00:00:00 2001 From: Vibe Nuage Agent Date: Sat, 30 May 2026 07:30:59 +0000 Subject: [PATCH 1/6] Add Fedi Username Normalizer tool --- tools.json | 13 +- tools/fedi-username-normalizer/index.html | 164 ++++++++++++++++++++++ 2 files changed, 176 insertions(+), 1 deletion(-) create mode 100644 tools/fedi-username-normalizer/index.html diff --git a/tools.json b/tools.json index fe51488..3129c2e 100644 --- a/tools.json +++ b/tools.json @@ -1 +1,12 @@ -[] +[ + { + "id": "fedi-username-normalizer", + "title": "Fedi Username Normalizer", + "description": "Convert Fediverse profile URLs to standard username@domain format.", + "icon": "🔄", + "category": "text", + "tags": ["fediverse", "mastodon", "username", "normalize", "social"], + "path": "tools/fedi-username-normalizer/index.html", + "enabled": true + } +] diff --git a/tools/fedi-username-normalizer/index.html b/tools/fedi-username-normalizer/index.html new file mode 100644 index 0000000..38c87da --- /dev/null +++ b/tools/fedi-username-normalizer/index.html @@ -0,0 +1,164 @@ + + + + + + Fedi Username Normalizer + + + + +

🔄 Fedi Username Normalizer

+

+ Convert Fediverse profile URLs into standard username@domain format. + Paste your URLs below and see the normalized usernames appear in real-time. +

+ +
+
+ + +
+ +
+ + +
+
+ +
+

Examples:

+ +
+ + + + From 944d74cc9b6ce257598920823e2db52226462635 Mon Sep 17 00:00:00 2001 From: Vibe Nuage Agent Date: Sat, 30 May 2026 07:36:56 +0000 Subject: [PATCH 2/6] Add GitHub Pages deployment workflow with PR previews - Deploy main branch to root of gh-pages - Deploy PRs to /preview/pr-{number}/ subdirectories - Auto-comment PR with preview URL - Uses dedicated gh-pages branch for deployment Co-authored-by: Thib-ai --- .github/workflows/deploy-pages.yml | 39 ------- .github/workflows/deploy.yml | 161 +++++++++++++++++++++++++++++ 2 files changed, 161 insertions(+), 39 deletions(-) delete mode 100644 .github/workflows/deploy-pages.yml create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml deleted file mode 100644 index 98e003f..0000000 --- a/.github/workflows/deploy-pages.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Deploy GitHub Pages - -on: - push: - branches: ["main"] - workflow_dispatch: - -permissions: - contents: read - pages: write - id-token: write - -concurrency: - group: "pages" - cancel-in-progress: false - -jobs: - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Pages - uses: actions/configure-pages@v4 - with: - enablement: true - - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: . - - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..9ab3c6c --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,161 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + workflow_dispatch: + +permissions: + contents: write + pages: write + id-token: write + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Need full history for git operations + + - name: Setup Node.js (if needed for future tools) + uses: actions/setup-node@v4 + with: + node-version: '20' + + # Determine the deployment path + - name: Determine deployment path + id: paths + run: | + if [ "${{ github.ref }}" = "refs/heads/main" ]; then + # Main branch deploys to root + echo "DEPLOY_PATH=." >> $GITHUB_OUTPUT + echo "PREVIEW_PATH=" >> $GITHUB_OUTPUT + else + # PR branches deploy to /preview/pr-{number}/ + PR_NUM=${{ github.event.pull_request.number }} + echo "DEPLOY_PATH=preview/pr-$PR_NUM" >> $GITHUB_OUTPUT + echo "PREVIEW_PATH=/preview/pr-$PR_NUM/" >> $GITHUB_OUTPUT + fi + + # Create a temporary directory for the built files + - name: Prepare build directory + run: | + mkdir -p build + cp -r * build/ || true + cp -r .github build/ || true + + # Checkout the gh-pages branch (or create it) + - name: Checkout gh-pages branch + run: | + git fetch origin gh-pages || true + if git rev-parse --verify origin/gh-pages >/dev/null 2>&1; then + git checkout gh-pages + git pull origin gh-pages + else + git checkout --orphan gh-pages + git rm -rf . + fi + + # Clean the target directory + - name: Clean target directory + run: | + if [ -n "${{ steps.paths.outputs.DEPLOY_PATH }}" ] && [ "${{ steps.paths.outputs.DEPLOY_PATH }}" != "." ]; then + rm -rf "${{ steps.paths.outputs.DEPLOY_PATH }}" + else + rm -rf . + fi + + # Copy built files to the target location + - name: Copy files to target + run: | + if [ "${{ steps.paths.outputs.DEPLOY_PATH }}" = "." ]; then + cp -r build/* . + else + mkdir -p "${{ steps.paths.outputs.DEPLOY_PATH }}" + cp -r build/* "${{ steps.paths.outputs.DEPLOY_PATH }}/" + fi + + # Create index.html redirect for PR previews + - name: Create redirect index for PR + if: github.ref != 'refs/heads/main' + run: | + PR_NUM=${{ github.event.pull_request.number }} + cat > "preview/pr-$PR_NUM/index.html" << 'EOF' + + + + + Redirecting... + + +

Redirecting to PR #$PR_NUM preview...

+ + + EOF + + # Commit and push to gh-pages + - name: Commit and push to gh-pages + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "actions@github.com" + + # Add all files + git add -A + + # Commit + if git diff --cached --quiet; then + echo "No changes to commit" + else + COMMIT_MSG="Deploy ${{ steps.paths.outputs.DEPLOY_PATH || 'main' }} from ${{ github.sha }}" + git commit -m "$COMMIT_MSG" + git push origin gh-pages + fi + + # Post preview URL as PR comment + - name: Comment PR with preview URL + if: github.ref != 'refs/heads/main' + uses: actions/github-script@v7 + with: + script: | + const prNumber = context.payload.pull_request?.number; + if (!prNumber) return; + + const repo = context.repo; + const previewUrl = `https://${repo.owner}.github.io/${repo.repo}/preview/pr-${prNumber}/`; + + // Check if comment already exists + const { data: comments } = await github.rest.issues.listComments({ + owner: repo.owner, + repo: repo.repo, + issue_number: prNumber, + }); + + const previewComment = comments.find(c => + c.body.includes('PR Preview Ready') || c.body.includes(previewUrl) + ); + + if (!previewComment) { + await github.rest.issues.createComment({ + owner: repo.owner, + repo: repo.repo, + issue_number: prNumber, + body: `🚀 **PR Preview Ready!**\n\nYou can preview this PR at:\n${previewUrl}\n\n_Note: Previews may take a few minutes to deploy._` + }); + } else { + // Update existing comment + const commentId = previewComment.id; + const commentBody = previewComment.body.replace( + /https:\/\/[^\s]+/, + previewUrl + ); + await github.rest.issues.updateComment({ + owner: repo.owner, + repo: repo.repo, + comment_id: commentId, + body: commentBody + }); + } From e8b17e146fb0e1b2da01e09d11f8a2d745af48f9 Mon Sep 17 00:00:00 2001 From: Vibe Nuage Agent Date: Sat, 30 May 2026 07:39:09 +0000 Subject: [PATCH 3/6] Fix workflow triggers and add meta description to tool Co-authored-by: Thib-ai --- .github/workflows/deploy.yml | 1 + tools/fedi-username-normalizer/index.html | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9ab3c6c..9bacefa 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,6 +5,7 @@ on: branches: ["main"] pull_request: branches: ["main"] + types: [opened, synchronize, reopened] workflow_dispatch: permissions: diff --git a/tools/fedi-username-normalizer/index.html b/tools/fedi-username-normalizer/index.html index 38c87da..33c1374 100644 --- a/tools/fedi-username-normalizer/index.html +++ b/tools/fedi-username-normalizer/index.html @@ -4,6 +4,7 @@ Fedi Username Normalizer +