Compare commits
189 Commits
504067d96d
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6bffff0135 | ||
|
|
98dd49ca4c | ||
|
|
1a4b276aea | ||
|
|
e514b1dedb | ||
|
|
06b7cc1e26 | ||
|
|
84a5bae75d | ||
|
|
fd03e950b2 | ||
|
|
9b06b91230 | ||
|
|
8b37091e6f | ||
|
|
1936211bb7 | ||
|
|
f10dae243a | ||
|
|
81c899609a | ||
|
|
ab310968a6 | ||
|
|
f25c4c324f | ||
|
|
ef7ae3d289 | ||
|
|
4aba5079cf | ||
|
|
ee576c5594 | ||
|
|
9d25d90893 | ||
|
|
09ed909c1c | ||
|
|
0f299f7f71 | ||
|
|
fdf42fc68d | ||
|
|
b7b82a8736 | ||
|
|
cb5ae0ef3f | ||
|
|
4a3987e5d0 | ||
|
|
403ae7fcbc | ||
|
|
5284712005 | ||
|
|
f27f717249 | ||
|
|
cec0a6cb95 | ||
|
|
035b7e52ee | ||
|
|
6c790d78f2 | ||
|
|
331acf4d8f | ||
|
|
fa10e7fc52 | ||
|
|
3fb8a54fbb | ||
|
|
c4450d7990 | ||
|
|
0a1708c6f4 | ||
|
|
f0be06e303 | ||
|
|
b70c35475e | ||
|
|
e3afcc53c2 | ||
| d2b9e66c10 | |||
|
|
e94a65726a | ||
|
|
1367b24436 | ||
|
|
af88cc4305 | ||
|
|
d829ecb79c | ||
|
|
9afdf504d6 | ||
|
|
b517797b10 | ||
| 7f88e080cc | |||
|
|
d681e06239 | ||
|
|
f26e3adc4c | ||
|
|
758879ba87 | ||
|
|
4a70d27f8b | ||
|
|
e8c3606295 | ||
|
|
3ac2246a7d | ||
|
|
100d4b6dd1 | ||
|
|
839984d5c8 | ||
|
|
34830c406f | ||
|
|
801b73ef29 | ||
|
|
8cca9bc1ae | ||
|
|
a5e30ba57c | ||
|
|
1f50a52519 | ||
|
|
f261436efe | ||
|
|
8f64fa003a | ||
|
|
3c10363e22 | ||
|
|
e463247b08 | ||
|
|
47a5d53408 | ||
|
|
6a5d1ea61b | ||
|
|
0a7f38c71f | ||
|
|
a963c17669 | ||
|
|
2fb69a4aec | ||
|
|
ffa5177cc5 | ||
|
|
8f8d187bde | ||
|
|
fa3c40e493 | ||
|
|
c35f8ddd8a | ||
|
|
c504943f84 | ||
|
|
a821dbfccf | ||
|
|
67480298f8 | ||
|
|
d71561563b | ||
|
|
c5d80fe762 | ||
|
|
c4b80f9c2b | ||
|
|
135c35c7b8 | ||
|
|
99f1f1fc37 | ||
|
|
68d9fe4e9a | ||
|
|
23217107ac | ||
|
|
9789defce1 | ||
|
|
fe3526ad09 | ||
|
|
c1d3bceb2a | ||
|
|
d485837b42 | ||
|
|
70359cba80 | ||
|
|
bcc08a5213 | ||
|
|
b0c69a129a | ||
|
|
0f3a03a88c | ||
|
|
f0627b3c0b | ||
|
|
12e42cbfe3 | ||
|
|
7ebb379b14 | ||
|
|
a01d72085e | ||
|
|
e246710c70 | ||
|
|
2b8184d926 | ||
|
|
fc48d86767 | ||
|
|
2b3f4548d8 | ||
|
|
4a3a37699d | ||
|
|
d45aa0e391 | ||
|
|
d23fdc3f17 | ||
|
|
09e949986a | ||
|
|
f9eab05189 | ||
|
|
171fb8de7c | ||
|
|
4e4c735876 | ||
|
|
c4d0199349 | ||
|
|
13561392ae | ||
|
|
fcbee2e07e | ||
|
|
258d4288d9 | ||
|
|
8992eb706d | ||
|
|
2fcd32ff41 | ||
|
|
fe3044ab1f | ||
|
|
6de4a8e899 | ||
|
|
b3f0f91f9e | ||
|
|
33ff18f3ce | ||
|
|
55dee7772c | ||
|
|
64367a916d | ||
|
|
e3db71cb05 | ||
|
|
62539824a3 | ||
|
|
823aa6c319 | ||
|
|
d10103e1ce | ||
|
|
0dc439e5d4 | ||
|
|
c7d4a9c96f | ||
|
|
37926d5c2f | ||
|
|
2c90c19c83 | ||
|
|
6bab05409a | ||
|
|
889695a592 | ||
|
|
52af2611cc | ||
|
|
01d3f7da4f | ||
|
|
aba04dc511 | ||
|
|
b22da4d8cc | ||
|
|
44d0e08996 | ||
|
|
6899f3ccb9 | ||
|
|
e57c72f385 | ||
|
|
949ae2effb | ||
|
|
29d46969de | ||
|
|
8713d0a303 | ||
|
|
f340adff05 | ||
|
|
315b48683f | ||
|
|
49548b5192 | ||
|
|
b26b6c9fc7 | ||
|
|
7686aa430c | ||
|
|
08a7cd86b4 | ||
|
|
0200997f00 | ||
|
|
d77fc6476d | ||
|
|
96c1cb5cf1 | ||
|
|
aed0193c04 | ||
|
|
8f9d1dea3f | ||
|
|
a50b46b47e | ||
|
|
73417aa86a | ||
|
|
d2a50dd914 | ||
|
|
8a58ec3d7d | ||
|
|
96210f0c41 | ||
|
|
3f015ba8c6 | ||
|
|
d34043d332 | ||
|
|
7064ce5329 | ||
|
|
54a871bde6 | ||
|
|
8af023068a | ||
|
|
67d4776efc | ||
|
|
4037d8040b | ||
|
|
b9f16b611d | ||
|
|
bf92f5e477 | ||
|
|
f74521533a | ||
| f89ed9bcda | |||
| 25fb1a3604 | |||
| a620be202e | |||
|
|
8b22a7d9f1 | ||
|
|
b8e068f87b | ||
| 78e52b9ec2 | |||
| ccb6d15776 | |||
|
|
60d8ac5200 | ||
| b653cfd8cb | |||
| 1c68c76437 | |||
|
|
55f09261a8 | ||
| 9ef07b5069 | |||
| 4f58ddfc98 | |||
| a408e9990c | |||
| 9871f2d47f | |||
| ba8a4fbd0e | |||
| 7ff549e9de | |||
| 2f4bddb11f | |||
| 60ce2c5795 | |||
| 4774c885eb | |||
| 7ac733521d | |||
| 68021a1534 | |||
| f890d48ffc | |||
| 9c3804b126 | |||
| 6cd314ded2 | |||
| b7f60d75e7 |
@@ -12,7 +12,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Requirements
|
- name: Install Requirements
|
||||||
run: pip3 install requests --break-system-packages
|
run: pip3 install -r requirements.txt --break-system-packages
|
||||||
|
|
||||||
- name: Run Update Script
|
- name: Run Update Script
|
||||||
env:
|
env:
|
||||||
@@ -23,5 +23,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git config --local user.email "action@gitea.com"
|
git config --local user.email "action@gitea.com"
|
||||||
git config --local user.name "Gitea Action"
|
git config --local user.name "Gitea Action"
|
||||||
|
git pull
|
||||||
git add README.md
|
git add README.md
|
||||||
git diff --quiet && git diff --staged --quiet || (git commit -m "Update profile stats" && git push)
|
git diff --quiet && git diff --staged --quiet || (git commit -m "Update profile stats" && git push)
|
||||||
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
requests
|
||||||
|
tabulate
|
||||||
@@ -1,13 +1,24 @@
|
|||||||
import os
|
import os
|
||||||
import requests
|
import requests
|
||||||
|
import traceback
|
||||||
|
import pprint
|
||||||
import datetime
|
import datetime
|
||||||
|
import tabulate
|
||||||
|
|
||||||
# --- Configuration ---
|
# --- Configuration ---
|
||||||
GITEA_URL = "https://gitea.nathan-falvey.synology.me"
|
GITEA_URL = "https://gitea.nathan-falvey.synology.me"
|
||||||
USERNAME = "nathan"
|
USERNAME = "nathan"
|
||||||
BOT_NAME = "Gitea Action" # The name used in your git config in the .yaml
|
|
||||||
GITEA_TOKEN = os.getenv("GITEA_TOKEN")
|
GITEA_TOKEN = os.getenv("GITEA_TOKEN")
|
||||||
|
|
||||||
|
def do_request(url, headers=None):
|
||||||
|
try:
|
||||||
|
response = requests.get(url, headers=headers)
|
||||||
|
response.raise_for_status() # Will raise an HTTPError for bad responses
|
||||||
|
return response.json()
|
||||||
|
except requests.exceptions.RequestException as e:
|
||||||
|
print(f"Request failed: {e}")
|
||||||
|
return None
|
||||||
|
|
||||||
def format_bytes(size_bytes):
|
def format_bytes(size_bytes):
|
||||||
"""Converts bytes to a human-readable string."""
|
"""Converts bytes to a human-readable string."""
|
||||||
if size_bytes == 0: return "0 B"
|
if size_bytes == 0: return "0 B"
|
||||||
@@ -15,7 +26,7 @@ def format_bytes(size_bytes):
|
|||||||
if size_bytes < 1024.0:
|
if size_bytes < 1024.0:
|
||||||
return f"{size_bytes:.2f} {unit}"
|
return f"{size_bytes:.2f} {unit}"
|
||||||
size_bytes /= 1024.0
|
size_bytes /= 1024.0
|
||||||
return f"{size_bytes:.2f} PB"
|
return f"{size_bytes:.2f} PB"
|
||||||
|
|
||||||
def get_uptime():
|
def get_uptime():
|
||||||
"""Reads Linux system uptime."""
|
"""Reads Linux system uptime."""
|
||||||
@@ -25,105 +36,162 @@ def get_uptime():
|
|||||||
return str(datetime.timedelta(seconds=int(seconds)))
|
return str(datetime.timedelta(seconds=int(seconds)))
|
||||||
except: return "Running in Container"
|
except: return "Running in Container"
|
||||||
|
|
||||||
def fetch_gitea_data():
|
# a function to collect all the necessary data from the Gitea API, this will be used to gather all the information needed to build the README file. This function will make multiple API calls to gather different pieces of information and then return it in a structured format that can be easily used to build the README file.
|
||||||
|
def collect_gitea_data():
|
||||||
headers = {"Authorization": f"token {GITEA_TOKEN}"}
|
headers = {"Authorization": f"token {GITEA_TOKEN}"}
|
||||||
|
version_info = do_request(f"{GITEA_URL}/api/v1/version", headers=headers)
|
||||||
# 1. System & User Info
|
version_string = version_info.get("version", "Unknown") if version_info else "Unknown"
|
||||||
ver = requests.get(f"{GITEA_URL}/api/v1/version", headers=headers).json().get("version", "N/A")
|
repos_info = do_request(f"{GITEA_URL}/api/v1/users/{USERNAME}/repos?type=owner", headers=headers)
|
||||||
repos = requests.get(f"{GITEA_URL}/api/v1/user/repos?type=owner", headers=headers).json()
|
organisations_info = do_request(f"{GITEA_URL}/api/v1/users/{USERNAME}/orgs", headers=headers)
|
||||||
|
repos = []
|
||||||
# 2. Activity Feed (Filtered)
|
if repos_info is not None:
|
||||||
all_feeds = requests.get(f"{GITEA_URL}/api/v1/users/{USERNAME}/feeds", headers=headers).json()
|
for repo in repos_info:
|
||||||
# Filter out pushes from the bot
|
if repo.get("has_code", False):
|
||||||
human_feeds = [f for f in all_feeds if f['act_user']['login'] != BOT_NAME][:10]
|
repos.append({
|
||||||
# Specific list for "Recent Pushes"
|
"name": repo.get("name", "N/A"),
|
||||||
recent_pushes = [f for f in all_feeds if f['op_type'] == 'push_repo' and f['act_user']['login'] != BOT_NAME][:5]
|
"id": repo.get("id", "N/A"),
|
||||||
|
"private": repo.get("private", False),
|
||||||
|
"archived": repo.get("archived", False),
|
||||||
|
"language": repo.get("language", "N/A"),
|
||||||
|
"size": repo.get("size", 0),
|
||||||
|
"release_count": repo.get("release_count", 0),
|
||||||
|
})
|
||||||
|
|
||||||
repo_stats = []
|
organisations = []
|
||||||
lang_totals = {}
|
if organisations_info is not None:
|
||||||
total_instance_size = 0
|
for org in organisations_info:
|
||||||
|
organisations.append({
|
||||||
for r in repos:
|
"name": org.get("name", "N/A"),
|
||||||
name, owner = r['name'], r['owner']['login']
|
"id": org.get("id", "N/A"),
|
||||||
|
"private": org.get("private", False),
|
||||||
# Languages & Size
|
"description": org.get("description", "N/A"),
|
||||||
langs = requests.get(f"{GITEA_URL}/api/v1/repos/{owner}/{name}/languages", headers=headers).json()
|
"full_name": org.get("full_name", "N/A"),
|
||||||
for l, b in langs.items():
|
})
|
||||||
lang_totals[l] = lang_totals.get(l, 0) + b
|
|
||||||
|
|
||||||
# Commits (Gitea returns total count in the header of the commits endpoint)
|
|
||||||
c_req = requests.get(f"{GITEA_URL}/api/v1/repos/{owner}/{name}/commits?limit=1", headers=headers)
|
|
||||||
commit_count = c_req.headers.get("X-Total", "0")
|
|
||||||
|
|
||||||
repo_size = r['size'] * 1024
|
|
||||||
total_instance_size += repo_size
|
|
||||||
|
|
||||||
repo_stats.append({
|
|
||||||
"name": name, "url": r['html_url'], "commits": commit_count,
|
|
||||||
"issues": r['open_issues_count'], "size": repo_size
|
|
||||||
})
|
|
||||||
|
|
||||||
# Identify most active repo (by commit count)
|
|
||||||
most_active = max(repo_stats, key=lambda x: int(x['commits'])) if repo_stats else None
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"ver": ver, "repos": repo_stats, "langs": lang_totals,
|
"username": USERNAME,
|
||||||
"feeds": human_feeds, "pushes": recent_pushes,
|
"version": version_string,
|
||||||
"total_size": total_instance_size, "uptime": get_uptime(),
|
"uptime": get_uptime(),
|
||||||
"most_active": most_active
|
"repos": repos or [],
|
||||||
|
"organisations": organisations or [],
|
||||||
}
|
}
|
||||||
|
|
||||||
def build_readme(data):
|
|
||||||
now = datetime.datetime.now().strftime("%Y-%m-%d %H:%M")
|
|
||||||
|
|
||||||
# Header
|
|
||||||
md = f"# 🛠️ {USERNAME}'s Dev Hub\n\n"
|
|
||||||
md += f"**Gitea Instance:** `v{data['ver']}` | **Uptime:** `{data['uptime']}` | **Last Updated:** `{now}`\n\n"
|
|
||||||
|
|
||||||
# Top Languages & Total Space
|
def do_readme_parse():
|
||||||
sorted_langs = sorted(data['langs'].items(), key=lambda x: x[1], reverse=True)
|
data = collect_gitea_data() # does all the API calls and collects the data into a structured format, collected once to avoid multiple API calls during the README build process, this data will be used to populate the README template with the relevant information about the Gitea instance and the user's repositories.
|
||||||
lang_line = ", ".join([f"**{l[0]}** ({format_bytes(l[1])})" for l in sorted_langs[:5]])
|
storage_used = sum(repo["size"] for repo in data["repos"])
|
||||||
|
languages_used = set(repo["language"] for repo in data["repos"] if repo["language"] != "N/A")
|
||||||
md += "### 📊 Stats Summary\n"
|
username = data["username"].capitalize() if data["username"] else "Unknown User"
|
||||||
md += f"* **Total Storage Used:** `{format_bytes(data['total_size'])}` across {len(data['repos'])} repositories.\n"
|
|
||||||
md += f"* **Language Footprint:** {lang_line}\n"
|
|
||||||
if data['most_active']:
|
|
||||||
md += f"* **Most Active Project:** [{data['most_active']['name']}]({data['most_active']['url']}) with **{data['most_active']['commits']}** commits.\n"
|
md = f"# {username}'s Developer Hub\n\n"
|
||||||
md += "\n---\n"
|
md += f"## Welcome to {username}'s Gitea Developer Hub! This is a collection of repositories and projects that I have created and maintained on my Gitea instance. Here you can find various projects that I have worked on, ranging from personal projects to open-source contributions.\n\n"
|
||||||
|
if data["repos"]:
|
||||||
|
md += f"### 📂 Repository Breakdown\n\n"
|
||||||
|
tab_headers = ["Name", "Language", "Size", "Releases", "Private", "Archived", "Access Link", "Last Commit"]
|
||||||
|
tab_rows = []
|
||||||
|
for repo in data["repos"]:
|
||||||
|
tab_rows.append([
|
||||||
|
repo["name"],
|
||||||
|
repo["language"] if len(repo["language"]) > 1 else "N/A",
|
||||||
|
format_bytes(repo["size"]),
|
||||||
|
repo["release_count"]if repo["release_count"] > 0 else "None",
|
||||||
|
"Yes" if repo["private"] else "No",
|
||||||
|
"Yes" if repo["archived"] else "No",
|
||||||
|
f"[View]({GITEA_URL}/{USERNAME}/{repo['name']})",
|
||||||
|
f""
|
||||||
|
])
|
||||||
|
md += tabulate.tabulate(tab_rows, headers=tab_headers, tablefmt="pipe")
|
||||||
|
md += "\n\n"
|
||||||
|
|
||||||
|
md += "## 📊 Stats Summary\n"
|
||||||
|
md += f"\n**Total Repositories:** {len(data['repos'])}\n\n"
|
||||||
|
md += f"**Total Storage Used:** {format_bytes(storage_used)}\n\n"
|
||||||
|
if languages_used:
|
||||||
|
md += f"### **Languages Used:**\n\n"
|
||||||
|
md += "```\n"
|
||||||
|
for lang in languages_used:
|
||||||
|
if len(lang) > 1: # Filter out empty or invalid language entries
|
||||||
|
md += f"- **{lang}**\n"
|
||||||
|
|
||||||
|
md += "```"
|
||||||
|
|
||||||
|
md += "\n"
|
||||||
|
|
||||||
|
if data["organisations"]:
|
||||||
|
md += f"### 🏢 Owned Organisation Breakdown\n\n"
|
||||||
|
tab_headers = ["Name", "Description", "Private", "Access Link"]
|
||||||
|
tab_rows = []
|
||||||
|
for org in data["organisations"]:
|
||||||
|
tab_rows.append([
|
||||||
|
org["name"],
|
||||||
|
org["description"] if len(org["description"]) > 1 else "N/A",
|
||||||
|
"Yes" if org["private"] else "No",
|
||||||
|
f"[View]({GITEA_URL}/{org['name']})"
|
||||||
|
])
|
||||||
|
md += tabulate.tabulate(tab_rows, headers=tab_headers, tablefmt="pipe")
|
||||||
|
md += "\n\n"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Repo Table
|
|
||||||
md += "### 📂 Repository Breakdown\n"
|
|
||||||
md += "| Repository | Commits | Issues | Space |\n| :--- | :--- | :--- | :--- |\n"
|
|
||||||
for r in data['repos']:
|
|
||||||
md += f"| [{r['name']}]({r['url']}) | {r['commits']} | {r['issues']} | {format_bytes(r['size'])} |\n"
|
|
||||||
md += "\n"
|
md += "\n"
|
||||||
|
|
||||||
# Recent Pushes (Human Only)
|
|
||||||
md += "### 🚀 Recent Human Pushes\n"
|
|
||||||
if not data['pushes']: md += "*No recent manual pushes.*\n"
|
|
||||||
for p in data['pushes']:
|
|
||||||
date = p['created'].split('T')[0]
|
|
||||||
md += f"* **{date}** - Pushed to `{p['repo']['name']}`\n"
|
|
||||||
md += "\n"
|
|
||||||
|
|
||||||
# Global Activity
|
|
||||||
md += "### 🕒 Latest Changes\n"
|
|
||||||
for f in data['feeds']:
|
|
||||||
date = f['created'].split('T')[0]
|
|
||||||
action = f['op_type'].replace('_', ' ')
|
|
||||||
md += f"* **{date}**: {action} in `{f['repo']['name']}`\n"
|
|
||||||
|
|
||||||
|
md += "### System Information\n\n"
|
||||||
|
md += f"**Gitea Version:** {data['version']}\n\n"
|
||||||
|
md += f"**System Uptime:** {data['uptime']}\n\n"
|
||||||
return md
|
return md
|
||||||
|
|
||||||
def main():
|
|
||||||
|
def do_readme_build():
|
||||||
try:
|
try:
|
||||||
data = fetch_gitea_data()
|
markdown = do_readme_parse().strip()
|
||||||
markdown = build_readme(data)
|
current_contents = open("README.md", "r", encoding="utf-8").read() if os.path.exists("README.md") else ""
|
||||||
|
if markdown == current_contents.strip():
|
||||||
|
print("README.md is already up to date. No changes made.")
|
||||||
|
return
|
||||||
with open("README.md", "w", encoding="utf-8") as f:
|
with open("README.md", "w", encoding="utf-8") as f:
|
||||||
f.write(markdown)
|
f.write(markdown)
|
||||||
print("README.md rebuilt successfully.")
|
print("README.md rebuilt successfully.")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error: {e}")
|
print(f"Error: {e}")
|
||||||
|
pass # Placeholder for the actual README build logic
|
||||||
|
|
||||||
|
# a simple function to test the API connection and print some debug information, this will be used for debugging purposes to ensure that the API connection is working correctly and to see what data is being returned from the API calls.
|
||||||
|
def debug_request():
|
||||||
|
headers = {"Authorization": f"token {GITEA_TOKEN}"}
|
||||||
|
version_info = do_request(f"{GITEA_URL}/api/v1/version", headers=headers)
|
||||||
|
users_heatmap = do_request(f"{GITEA_URL}/api/v1/users/{USERNAME}/heatmap", headers=headers)
|
||||||
|
print(f"User Heatmap: {users_heatmap}")
|
||||||
|
version_string = version_info.get("version", "Unknown") if version_info else "Unknown"
|
||||||
|
if version_info:
|
||||||
|
print(f"Gitea Version: {version_string}")
|
||||||
|
print(f"System Uptime: {get_uptime()}")
|
||||||
|
try:
|
||||||
|
print(do_request(f"{GITEA_URL}/api/v1/version", headers=headers))
|
||||||
|
pprint.pprint(do_request(f"{GITEA_URL}/api/v1/user/repos?type=owner", headers=headers))
|
||||||
|
repos = do_request(f"{GITEA_URL}/api/v1/users/{USERNAME}/repos?type=owner", headers=headers)
|
||||||
|
if repos is not None:
|
||||||
|
print(f"Number of repos for user '{USERNAME}': {len(repos)}")
|
||||||
|
for repo in repos:
|
||||||
|
print(f"Repo Name: {repo.get('name', 'N/A')}, Repo ID: {repo.get('id', 'N/A')}")
|
||||||
|
if repo.get("has_code", False):
|
||||||
|
print(f"Repo '{repo.get('name', 'N/A')}' has code.")
|
||||||
|
print(f"Repo '{repo.get('name', 'N/A')}' is private: {repo.get('private', 'N/A')}")
|
||||||
|
print(f"Repo '{repo.get('name', 'N/A')}' is archived: {repo.get('archived', 'N/A')}")
|
||||||
|
print(f"Repo '{repo.get('name', 'N/A')}' has language: {repo.get('language', 'N/A')}")
|
||||||
|
print(f"Repo '{repo.get('name', 'N/A')}' has size: {repo.get('size', 'N/A')}")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
except Exception:
|
||||||
|
print("\n" + "!"*30)
|
||||||
|
print("STACK TRACE (Line Numbers):")
|
||||||
|
traceback.print_exc()
|
||||||
|
print("!"*30)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
#debug_request() # Uncomment this line to run the debug function and see the API responses and collected data
|
||||||
|
do_readme_build() # This will build the README file using the collected data from the Gitea API and the template defined in the do_readme_parse function.
|
||||||
Reference in New Issue
Block a user