Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 24 additions & 13 deletions .github/workflows/update_date.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,30 @@

# Function to update the last modified date in a file
def update_date_in_file(file_path):
with open(file_path, 'r') as file:
lines = file.readlines()

updated = False
with open(file_path, 'w') as file:
for line in lines:
if line.startswith('Last updated:'):
file.write(f'Last updated: {current_date}\n')
updated = True
else:
file.write(line)
if not updated:
file.write(f'\nLast updated: {current_date}\n')
if 'node_modules' in file_path:
print(f"Skipping file in node_modules: {file_path}")
return

try:
with open(file_path, 'r') as file:
lines = file.readlines()

updated = False
with open(file_path, 'w') as file:
for line in lines:
if line.startswith('Last updated:'):
file.write(f'Last updated: {current_date}\n')
updated = True
else:
file.write(line)
if not updated:
file.write(f'\nLast updated: {current_date}\n')

print(f"Updated file: {file_path}")
except FileNotFoundError:
print(f"File not found: {file_path}")
except Exception as e:
print(f"Error updating file {file_path}: {e}")

# Check if there are any modified Markdown files
if not modified_md_files:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:

<!-- START BADGE -->
<div align="center">
<img src="https://img.shields.io/badge/Total%20views-734-yellow" alt="Total views">
<img src="https://img.shields.io/badge/Total%20views-611-yellow" alt="Total views">
<p>Refresh Date: 2025-07-10</p>
</div>
<!-- END BADGE -->
4 changes: 2 additions & 2 deletions metrics.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"count": 734,
"lastUpdated": "2025-07-10T17:27:34.741Z"
"count": 611,
"lastUpdated": "2025-07-10T17:39:05.310Z"
}
50 changes: 0 additions & 50 deletions node_modules/.package-lock.json

This file was deleted.

22 changes: 0 additions & 22 deletions node_modules/node-fetch/LICENSE.md

This file was deleted.

Loading