diff --git a/gitgen.py b/gitgen.py
index c0b2b06..1dd4f98 100644
--- a/gitgen.py
+++ b/gitgen.py
@@ -379,37 +379,37 @@ class HTMLGenerator:
f"""<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>{repo['name_escaped']} - Repository Overview</title>
- <meta name="description" content="{repo['description']}">
- <link rel="stylesheet" href="../main.css">
-
- <!-- Open Graph -->
- <meta property="og:site_name" content="{BASE_NAME}">
- <meta property="og:url" content="{BASE_URL}/{repo['name']}">
- <meta property="og:title" content="{repo['name_escaped']} - Repository Overview">
- <meta property="og:description" content="{repo['description']}">
- <meta property="og:type" content="website">
- <meta property="og:locale" content="en_GB">
-
- <!-- Twitter Card -->
- <meta property="twitter:card" content="summary">
- <meta property="twitter:url" content="{BASE_URL}/{repo['name']}">
- <meta property="twitter:title" content="{repo['name_escaped']} - Repository Overview">
- <meta property="twitter:description" content="{repo['description']}">
-
- <!-- Microdata -->
- <script type="application/ld+json">
- {{
- "@context": "http://schema.org",
- "@type": "website",
- "name": "{repo['name_escaped']} - Repository Overview",
- "headline": "{repo['name_escaped']} - Repository Overview",
- "url": "{BASE_URL}/{repo['name']}",
- "description": "{repo['description']}"
- }}
- </script>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>{repo['name_escaped']} - Repository Overview</title>
+ <meta name="description" content="{repo['description']}">
+ <link rel="stylesheet" href="../main.css">
+
+ <!-- Open Graph -->
+ <meta property="og:site_name" content="{BASE_NAME}">
+ <meta property="og:url" content="{BASE_URL}/{repo['name']}">
+ <meta property="og:title" content="{repo['name_escaped']} - Repository Overview">
+ <meta property="og:description" content="{repo['description']}">
+ <meta property="og:type" content="website">
+ <meta property="og:locale" content="en_GB">
+
+ <!-- Twitter Card -->
+ <meta property="twitter:card" content="summary">
+ <meta property="twitter:url" content="{BASE_URL}/{repo['name']}">
+ <meta property="twitter:title" content="{repo['name_escaped']} - Repository Overview">
+ <meta property="twitter:description" content="{repo['description']}">
+
+ <!-- Microdata -->
+ <script type="application/ld+json">
+ {{
+ "@context": "http://schema.org",
+ "@type": "website",
+ "name": "{repo['name_escaped']} - Repository Overview",
+ "headline": "{repo['name_escaped']} - Repository Overview",
+ "url": "{BASE_URL}/{repo['name']}",
+ "description": "{repo['description']}"
+ }}
+ </script>
</head>
<body>
<div class="header">
@@ -417,35 +417,35 @@ class HTMLGenerator:
<p>{repo['name_escaped']}</p>
</div>
- <div class="breadcrumb">
- <a href="../index.html">← Back to All Repositories</a>
- </div>
+ <div class="breadcrumb">
+ <a href="../index.html">← Back to All Repositories</a>
+ </div>
- <div class="navigation">
- <a href="index.html" class="nav-btn active">README</a>
- <a href="files.html" class="nav-btn secondary">Files</a>
- <a href="commits.html" class="nav-btn secondary">Commits</a>
- </div>
+ <div class="navigation">
+ <a href="index.html" class="nav-btn active">README</a>
+ <a href="files.html" class="nav-btn secondary">Files</a>
+ <a href="commits.html" class="nav-btn secondary">Commits</a>
+ </div>
- <div class="repo-ov">
- <div class="meta-item">
- <strong>Branch: </strong>
- <span class="branch-badge">{html.escape(repo.get('branch', 'main'))}</span>
- <strong>Last commit: </strong>
- <span>{repo.get('latest_commit', {}).get('date', 'N/A')}</span>
- <strong>Clone: </strong>
- <code>git clone {html.escape(repo['remote_url'])}</code>
- </div>
+ <div class="repo-ov">
+ <div class="meta-item">
+ <strong>Branch: </strong>
+ <span class="branch-badge">{html.escape(repo.get('branch', 'main'))}</span>
+ <strong>Last commit: </strong>
+ <span>{repo.get('latest_commit', {}).get('date', 'N/A')}</span>
+ <strong>Clone: </strong>
+ <code>git clone {html.escape(repo['remote_url'])}</code>
</div>
+ </div>
- <div class="readme-content">
- {repo['readme_content'] if repo.get('readme_content') else '<p><em>No README file found in this repository.</em></p>'}
- </div>
+ <div class="readme-content">
+ {repo['readme_content'] if repo.get('readme_content') else '<p><em>No README file found in this repository.</em></p>'}
+ </div>
- <div class="footer">
- <p>Made with <a href="https://git.cybrkyd.com/GitGen" target="_blank" rel="noopener">GitGen</a> by Cybrkyd</p>
- <p>Generated on {self.time_str}</p>
- </div>
+ <div class="footer">
+ <p>Made with <a href="https://git.cybrkyd.com/GitGen" target="_blank" rel="noopener">GitGen</a> by Cybrkyd</p>
+ <p>Generated on {self.time_str}</p>
+ </div>
</body>
</html>"""
]
@@ -463,37 +463,37 @@ class HTMLGenerator:
f"""<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>{repo['name_escaped']} - Files</title>
- <meta name="description" content="Files list for repo: {repo['name_escaped']}">
- <link rel="stylesheet" href="../main.css">
-
- <!-- Open Graph -->
- <meta property="og:site_name" content="{BASE_NAME}">
- <meta property="og:url" content="{BASE_URL}/{repo['name']}/files.html">
- <meta property="og:title" content="{repo['name_escaped']} - Files list">
- <meta property="og:description" content="Files list for repo: {repo['name_escaped']}">
- <meta property="og:type" content="website">
- <meta property="og:locale" content="en_GB">
-
- <!-- Twitter Card -->
- <meta property="twitter:card" content="summary">
- <meta property="twitter:url" content="{BASE_URL}/{repo['name']}/files.html">
- <meta property="twitter:title" content="{repo['name_escaped']} - Files list">
- <meta property="twitter:description" content="Files list for repo: {repo['name_escaped']}">
-
- <!-- Microdata -->
- <script type="application/ld+json">
- {{
- "@context": "http://schema.org",
- "@type": "website",
- "name": "{repo['name_escaped']} - Files list",
- "headline": "{repo['name_escaped']} - Files list",
- "url": "{BASE_URL}/{repo['name']}/files.html",
- "description": "Files list for repo: {repo['name_escaped']}"
- }}
- </script>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>{repo['name_escaped']} - Files</title>
+ <meta name="description" content="Files list for repo: {repo['name_escaped']}">
+ <link rel="stylesheet" href="../main.css">
+
+ <!-- Open Graph -->
+ <meta property="og:site_name" content="{BASE_NAME}">
+ <meta property="og:url" content="{BASE_URL}/{repo['name']}/files.html">
+ <meta property="og:title" content="{repo['name_escaped']} - Files list">
+ <meta property="og:description" content="Files list for repo: {repo['name_escaped']}">
+ <meta property="og:type" content="website">
+ <meta property="og:locale" content="en_GB">
+
+ <!-- Twitter Card -->
+ <meta property="twitter:card" content="summary">
+ <meta property="twitter:url" content="{BASE_URL}/{repo['name']}/files.html">
+ <meta property="twitter:title" content="{repo['name_escaped']} - Files list">
+ <meta property="twitter:description" content="Files list for repo: {repo['name_escaped']}">
+
+ <!-- Microdata -->
+ <script type="application/ld+json">
+ {{
+ "@context": "http://schema.org",
+ "@type": "website",
+ "name": "{repo['name_escaped']} - Files list",
+ "headline": "{repo['name_escaped']} - Files list",
+ "url": "{BASE_URL}/{repo['name']}/files.html",
+ "description": "Files list for repo: {repo['name_escaped']}"
+ }}
+ </script>
</head>
<body>
<div class="header">
@@ -501,18 +501,18 @@ class HTMLGenerator:
<p>{repo['name_escaped']} - {len(files):,} files</p>
</div>
- <div class="breadcrumb">
- <a href="../index.html">← All Repositories</a> •
- <a href="index.html">← {repo['name_escaped']} Overview</a>
- </div>
+ <div class="breadcrumb">
+ <a href="../index.html">← All Repositories</a> •
+ <a href="index.html">← {repo['name_escaped']} Overview</a>
+ </div>
- <div class="navigation">
- <a href="index.html" class="nav-btn secondary">README</a>
- <a href="files.html" class="nav-btn active">Files</a>
- <a href="commits.html" class="nav-btn secondary">Commits</a>
- </div>
+ <div class="navigation">
+ <a href="index.html" class="nav-btn secondary">README</a>
+ <a href="files.html" class="nav-btn active">Files</a>
+ <a href="commits.html" class="nav-btn secondary">Commits</a>
+ </div>
- <div class="file-list">
+ <div class="file-list">
"""
]
@@ -521,30 +521,30 @@ class HTMLGenerator:
html_fragments.append(f'<div class="directory">📁 {html.escape(directory) if directory != "." else "Root Directory"}</div>\n')
for file_info in files_by_dir[directory]:
html_fragments.append(f"""
- <div class="file-item">
- <div class="file-info">
- <div class="file-path">
- <span class="file-icon">🗎</span>
- {file_info['name']}
- </div>
- </div>
- </div>
+ <div class="file-item">
+ <div class="file-info">
+ <div class="file-path">
+ <span class="file-icon">🗎</span>
+ {file_info['name']}
+ </div>
+ </div>
+ </div>
""")
else:
html_fragments.append("""
- <div style="padding: 3rem; text-align: center; color: #718096;">
- <p style="font-size: 1.2rem; margin-bottom: 1rem;">No files found in this repository.</p>
- <p>This repository might be empty.</p>
- </div>
+ <div style="padding: 3rem; text-align: center; color: #718096;">
+ <p style="font-size: 1.2rem; margin-bottom: 1rem;">No files found in this repository.</p>
+ <p>This repository might be empty.</p>
+ </div>
""")
html_fragments.append(f"""
- </div>
+ </div>
- <div class="footer">
- <p>Made with <a href="https://git.cybrkyd.com/GitGen" target="_blank" rel="noopener">GitGen</a> by Cybrkyd</p>
- <p>Generated on {self.time_str}</p>
- </div>
+ <div class="footer">
+ <p>Made with <a href="https://git.cybrkyd.com/GitGen" target="_blank" rel="noopener">GitGen</a> by Cybrkyd</p>
+ <p>Generated on {self.time_str}</p>
+ </div>
</body>
</html>""")
@@ -556,56 +556,56 @@ class HTMLGenerator:
f"""<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>{repo['name_escaped']} - Commits</title>
- <meta name="description" content="Commit History for repo: {repo['name_escaped']}">
- <link rel="stylesheet" href="../main.css">
-
- <!-- Open Graph -->
- <meta property="og:site_name" content="{BASE_NAME}">
- <meta property="og:url" content="{BASE_URL}/{repo['name']}/commits.html">
- <meta property="og:title" content="{repo['name_escaped']} - Commit History">
- <meta property="og:description" content="Commit History for repo: {repo['name_escaped']}">
- <meta property="og:type" content="website">
- <meta property="og:locale" content="en_GB">
-
- <!-- Twitter Card -->
- <meta property="twitter:card" content="summary">
- <meta property="twitter:url" content="{BASE_URL}/{repo['name']}/commits.html">
- <meta property="twitter:title" content="{repo['name_escaped']} - Commit History">
- <meta property="twitter:description" content="Commit History for repo: {repo['name_escaped']}">
-
- <!-- Microdata -->
- <script type="application/ld+json">
- {{
- "@context": "http://schema.org",
- "@type": "website",
- "name": "{repo['name_escaped']} - Commit History",
- "headline": "{repo['name_escaped']} - Commit History",
- "url": "{BASE_URL}/{repo['name']}/commits.html",
- "description": "Commit History for repo: {repo['name_escaped']}"
- }}
- </script>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>{repo['name_escaped']} - Commits</title>
+ <meta name="description" content="Commit History for repo: {repo['name_escaped']}">
+ <link rel="stylesheet" href="../main.css">
+
+ <!-- Open Graph -->
+ <meta property="og:site_name" content="{BASE_NAME}">
+ <meta property="og:url" content="{BASE_URL}/{repo['name']}/commits.html">
+ <meta property="og:title" content="{repo['name_escaped']} - Commit History">
+ <meta property="og:description" content="Commit History for repo: {repo['name_escaped']}">
+ <meta property="og:type" content="website">
+ <meta property="og:locale" content="en_GB">
+
+ <!-- Twitter Card -->
+ <meta property="twitter:card" content="summary">
+ <meta property="twitter:url" content="{BASE_URL}/{repo['name']}/commits.html">
+ <meta property="twitter:title" content="{repo['name_escaped']} - Commit History">
+ <meta property="twitter:description" content="Commit History for repo: {repo['name_escaped']}">
+
+ <!-- Microdata -->
+ <script type="application/ld+json">
+ {{
+ "@context": "http://schema.org",
+ "@type": "website",
+ "name": "{repo['name_escaped']} - Commit History",
+ "headline": "{repo['name_escaped']} - Commit History",
+ "url": "{BASE_URL}/{repo['name']}/commits.html",
+ "description": "Commit History for repo: {repo['name_escaped']}"
+ }}
+ </script>
</head>
<body>
<div class="header">
<h1><a href="../index.html" title="gitgen"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 21 21" width="38" height="38" fill="none" stroke="#222222" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M4.13 1.101v12.56m11.972-6.28a2.993 3.14 0 1 0 0-6.28 2.993 3.14 0 0 0 0 6.28M4.13 19.94a2.993 3.14 0 1 0 0-6.28 2.993 3.14 0 0 0 0 6.28" style="stroke-width:2.04357"/><path d="M13.109 4.241a8.978 9.42 0 0 0-8.978 9.42" style="stroke-width:2.04357"/><path stroke="#0f0" d="M16.172 13.915v6m3-3h-6"/><path stroke="red" d="M19.135 11.43h-6"/></svg></a> {BASE_NAME}</h1>
- <p>{repo['name_escaped']} - Commit History</p>
- </div>
+ <p>{repo['name_escaped']} - Commit History</p>
+ </div>
- <div class="breadcrumb">
- <a href="../index.html">← All Repositories</a> •
- <a href="index.html">← {repo['name_escaped']} Overview</a>
- </div>
+ <div class="breadcrumb">
+ <a href="../index.html">← All Repositories</a> •
+ <a href="index.html">← {repo['name_escaped']} Overview</a>
+ </div>
- <div class="navigation">
- <a href="index.html" class="nav-btn secondary">README</a>
- <a href="files.html" class="nav-btn secondary">Files</a>
- <a href="commits.html" class="nav-btn active">Commits</a>
- </div>
+ <div class="navigation">
+ <a href="index.html" class="nav-btn secondary">README</a>
+ <a href="files.html" class="nav-btn secondary">Files</a>
+ <a href="commits.html" class="nav-btn active">Commits</a>
+ </div>
- <div class="commit-list">
+ <div class="commit-list">
"""
]
@@ -621,51 +621,51 @@ class HTMLGenerator:
tags_html = f'{tags_list}'
html_fragments.append(f"""
- <div class="commit-item commit-meta">
- <table summary='commit info' class='commit-info'>
- <tr>
- <th>commit</th>
- <td colspan='2' class='oid'><a href="commits/{commit['short_hash']}.html">{commit['hash']}</a></td>
- </tr>
-
- <tr>
- <th>author</th>
- <td>{commit['author_escaped']} <{commit['author_email_escaped']}></td>
- <td class='right'>{commit['author_date']}</td>
- </tr>
-
- <tr>
- <th>committer</th>
- <td>{commit['committer_escaped']} <{commit['committer_email_escaped']}></td>
- <td class='right'> {commit['committer_date']}</td>
- </tr>
-
- <tr>
- <td>{tags_html}</td>
- </tr>
- </table>
-
- <div class="commit-message-box">
- <h3>Commit Message</h3>
- <p>{formatted_message}</p>
- </div>
- </div>
+ <div class="commit-item commit-meta">
+ <table summary='commit info' class='commit-info'>
+ <tr>
+ <th>commit</th>
+ <td colspan='2' class='oid'><a href="commits/{commit['short_hash']}.html">{commit['hash']}</a></td>
+ </tr>
+
+ <tr>
+ <th>author</th>
+ <td>{commit['author_escaped']} <{commit['author_email_escaped']}></td>
+ <td class='right'>{commit['author_date']}</td>
+ </tr>
+
+ <tr>
+ <th>committer</th>
+ <td>{commit['committer_escaped']} <{commit['committer_email_escaped']}></td>
+ <td class='right'> {commit['committer_date']}</td>
+ </tr>
+
+ <tr>
+ <td>{tags_html}</td>
+ </tr>
+ </table>
+
+ <div class="commit-message-box">
+ <h3>Commit Message</h3>
+ <p>{formatted_message}</p>
+ </div>
+ </div>
""")
else:
html_fragments.append("""
- <div style="padding: 3rem; text-align: center; color: #718096;">
- <p style="font-size: 1.2rem; margin-bottom: 1rem;">No commits found in this repository.</p>
- <p>This repository might be empty.</p>
- </div>
+ <div style="padding: 3rem; text-align: center; color: #718096;">
+ <p style="font-size: 1.2rem; margin-bottom: 1rem;">No commits found in this repository.</p>
+ <p>This repository might be empty.</p>
+ </div>
""")
html_fragments.append(f"""
- </div>
+ </div>
- <div class="footer">
- <p>Made with <a href="https://git.cybrkyd.com/GitGen" target="_blank" rel="noopener">GitGen</a> by Cybrkyd</p>
- <p>Generated on {self.time_str}</p>
- </div>
+ <div class="footer">
+ <p>Made with <a href="https://git.cybrkyd.com/GitGen" target="_blank" rel="noopener">GitGen</a> by Cybrkyd</p>
+ <p>Generated on {self.time_str}</p>
+ </div>
</body>
</html>""")
@@ -676,15 +676,14 @@ class HTMLGenerator:
commit_details = self.scanner.get_commit_details(repo['path'], commit['hash'])
if not commit_details:
return f"""
- <!DOCTYPE html>
- <html>
- <head><title>Commit Not Found</title></head>
- <body>
- <h1>Commit not found</h1>
- <p><a href="commits.html">Back to commits</a></p>
- </body>
- </html>
- """
+ <!DOCTYPE html>
+ <html>
+ <head><title>Commit Not Found</title></head>
+ <body>
+ <h1>Commit not found</h1>
+ <p><a href="commits.html">Back to commits</a></p>
+ </body>
+ </html>"""
# Get tags for this commit
tags_output = self.scanner.run_git_command(repo['path'], [
@@ -729,30 +728,30 @@ class HTMLGenerator:
total_deletions += deletions
total_changes = insertions + deletions
diffstat_content += f'''
- <div class="diffstat-row">
- <span class="diffstat-file">
- {file_change['path_escaped']}
Diff truncated. 218 more lines not shown.