Skip to content

Commit 4a7a5ce

Browse files
done
1 parent 4a581e7 commit 4a7a5ce

120 files changed

Lines changed: 5452 additions & 209 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/update_readme.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,24 @@ jobs:
2020
id: file_list
2121
run: |
2222
echo "Generating file list..."
23+
python3 << 'PY'
24+
import json, os
25+
paths = []
26+
for root, dirs, files in os.walk("."):
27+
if ".git" in root.split(os.sep):
28+
continue
29+
for f in files:
30+
if f.endswith(".php"):
31+
rel = os.path.relpath(os.path.join(root, f), ".").replace("\\", "/")
32+
paths.append(rel)
33+
paths.sort()
34+
with open("files-manifest.json", "w", encoding="utf-8") as out:
35+
json.dump({"version": 1, "files": paths}, out, separators=(",", ":"))
36+
print("files-manifest.json:", len(paths), "PHP files")
37+
PY
2338
# Find all .php files, sort them, and format as Markdown links
2439
# Format: - [Filename](URL)
25-
FILES=$(find . -maxdepth 1 -name "*.php" -type f | sort | sed 's|^\./||' | while read -r file; do echo "- [📄 $file](https://github.com/${{ github.repository }}/blob/main/$file)"; done)
40+
FILES=$(find . -path './.git' -prune -o -name '*.php' -type f -print | sort | sed 's|^\./||' | while read -r file; do echo "- [📄 $file](https://github.com/${{ github.repository }}/blob/main/$file)"; done)
2641
2742
# Export to environment variable (multiline safe)
2843
echo "FILES<<EOF" >> $GITHUB_ENV
@@ -58,6 +73,6 @@ jobs:
5873
run: |
5974
git config --global user.name "github-actions[bot]"
6075
git config --global user.email "github-actions[bot]@users.noreply.github.com"
61-
git add README.md
76+
git add README.md files-manifest.json
6277
# Only commit if there are changes
63-
git diff --quiet && git diff --staged --quiet || (git commit -m "docs: auto-update file list in README" && git push)
78+
git diff --quiet && git diff --staged --quiet || (git commit -m "docs: sync README and files-manifest for PHP portfolio" && git push)

IMG-20260409-WA0006.jpg

102 KB

IMG-20260409-WA0007.jpg

95.9 KB

README.md

Lines changed: 71 additions & 43 deletions

HelloWorld.php renamed to Unit-01-Introduction-to-PHP/U01-SN03-hello-world.php

File renamed without changes.

Constants.php renamed to Unit-01-Introduction-to-PHP/U01-SN04-constants-greeting.php

File renamed without changes.

Constant.php renamed to Unit-01-Introduction-to-PHP/U01-SN04-constants-pi-and-circle.php

File renamed without changes.

Data_Type.php renamed to Unit-01-Introduction-to-PHP/U01-SN04-data-types.php

File renamed without changes.

Addition_program.php renamed to Unit-01-Introduction-to-PHP/U01-SN05-operators-arithmetic-addition.php

File renamed without changes.

bitwise.php renamed to Unit-01-Introduction-to-PHP/U01-SN05-operators-bitwise.php

File renamed without changes.

0 commit comments

Comments
 (0)