stagit


stagit

~ Unnamed repository; edit this file 'description' to name the repository.
log | files | refs | archive | README | LICENSE

commit 1a3f96141ef448b89dc73c0261e0cf9c2446c557
parent 70836c3f127e9beeea8d1a97f07a01bbf2440391
Author: djnn <email@djnn.sh>
Date: Wed, 5 Nov 2025 22:04:56 +0100

maybe this works ?

Diffstat:
Mstagit-index.c | 8++------
Mstagit.c | 18+++---------------

2 files changed, 5 insertions(+), 21 deletions(-)

diff --git a/stagit-index.c b/stagit-index.c
@@ -16,7 +16,7 @@ struct repoinfo {
 
 static git_repository *repo;
 static const char *relpath = "";
-static char description[255] = "Repositories";
+static char description[255] = "evil.djnn.sh";
 static char *name = "";
 static char category[255];
 
@@ -129,7 +129,7 @@ void writeheader(FILE *fp) {
           "<b>evil.djnn.sh ~ repositories</b>\n"
           "\t\t</td></tr>\n\t</table>\n\t</center>\n</div>\n<br>\n",
           fp);
-    fputs("<div id=\"content\">\n\t<table id=\"index\">\n\t\t<thead>\n\t\t\t<tr><td>Name</td><td>Description</td><td>Last commit</td></tr>\n\t\t</thead>\n\t\t<tbody>", fp);
+    fputs("<div id=\"content\">\n\t<center><table id=\"index\">\n\t\t<thead>\n\t\t\t<tr><td><b>name</b></td><td><b>description</b></td><td></b>last commit</b></td></tr>\n\t\t</thead>\n\t\t<tbody>", fp);
 }
 
 void writefooter(FILE *fp) {
@@ -259,8 +259,6 @@ int main(int argc, char *argv[]) {
 
     // Write output
     writeheader(stdout);
-    fprintf(stdout, "<div class=\"repo-list\">\n");
-    fprintf(stdout, "<ul>\n");
     for (i = 0; i < nrepos; i++) {
         // open the repo, set globals as needed
         if (git_repository_open_ext(&repo, repos[i].path, GIT_REPOSITORY_OPEN_NO_SEARCH, NULL)) {
@@ -274,8 +272,6 @@ int main(int argc, char *argv[]) {
         writelog(stdout);
         git_repository_free(repo);
     }
-    fprintf(stdout, "</ul>\n");
-    fprintf(stdout, "</div>\n");
     writefooter(stdout);
 
     git_libgit2_shutdown();
diff --git a/stagit.c b/stagit.c
@@ -939,7 +939,7 @@ writeblob(git_object *obj, const char *fpath, const char *filename, size_t files
     fputs("</p></div>", fp);
 
     if (git_blob_is_binary((git_blob *)obj))
-        fputs("<p>Binary file.</p>\n", fp);
+        fputs("<p>binary file</p>\n", fp);
     else
         lc = writeblobhtml(fp, (git_blob *)obj);
 
@@ -1377,7 +1377,7 @@ int main(int argc, char *argv[]) {
 
     /* files for HEAD */
     fp = efopen("files.html", "w");
-    writeheader(fp, "Files");
+    writeheader(fp, "files");
     if (head)
         writefiles(fp, head);
     writefooter(fp);
@@ -1386,24 +1386,12 @@ int main(int argc, char *argv[]) {
 
     /* summary page with branches and tags */
     fp = efopen("refs.html", "w");
-    writeheader(fp, "Refs");
+    writeheader(fp, "refs");
     writerefs(fp);
     writefooter(fp);
     checkfileerror(fp, "refs.html", 'w');
     fclose(fp);
 
-    /* Atom feed */
-    fp = efopen("atom.xml", "w");
-    writeatom(fp, 1);
-    checkfileerror(fp, "atom.xml", 'w');
-    fclose(fp);
-
-    /* Atom feed for tags / releases */
-    fp = efopen("tags.xml", "w");
-    writeatom(fp, 0);
-    checkfileerror(fp, "tags.xml", 'w');
-    fclose(fp);
-
     /* rename new cache file on success */
     if (cachefile && head) {
         if (rename(tmppath, cachefile))