🢀︎ stagit :: b2cef6e


commit b2cef6e5790dc47c787a1dcd605ae9bc8c6b12ed
Author: acidvegas <acid.vegas@acid.vegas>
Date:   Wed Jul 10 01:40:29 2019 -0400

    Removed un-needed html, prevented emoji rendering, fixed table headers, and source cleanup

diff --git a/stagit b/stagit
index a8402e9..07d2c43 100755
--- a/stagit
+++ b/stagit
@@ -50,12 +50,10 @@ generate_css() {
 }
 
 generate_index() {
-	echo -e "<!DOCTYPE html>\n"\
-			"<html lang=\"en-US\">\n"\
-			"<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\">\n"\
-			"<meta charset=\"UTF-8\">\n"\
+	echo -e "<!doctype html>\n"\
+			"<link rel=\"stylesheet\" href=\"style.css\">\n"\
 			"<title>Repositories</title>\n"\
-			"<h1><a href=\"index.html\" title=\"Home\">&#8962;</a> Repositories</h1>\n"\
+			"<h1><a href=\"index.html\" title=\"Home\">&#8962;&#xFE0E;</a> Repositories</h1>\n"\
 			"<hr>\n"\
 			"<table id=\"main\" cellpadding=\"0\" cellspacing=\"0\">\n"\
 			"<tr id=\"navigation\"><th>Name</th><th>Description</th><th>Owner</th><th>Last commit</th></tr>" >> $WWW_DIR/index.html
@@ -66,28 +64,24 @@ generate_repository_index() {
 	local REPO_URL=$2
 	local REPO_DESC=${@:3}
 	mkdir -p $WWW_DIR/$REPO_NAME/commit
-	echo -e "<!DOCTYPE html>\n"\
-			"<html lang=\"en-US\">\n"\
-			"<link rel=\"stylesheet\" type=\"text/css\" href=\"../style.css\">\n"\
-			"<meta charset=\"UTF-8\">\n"\
+	echo -e "<!doctype html>\n"\
+			"<link rel=\"stylesheet\" href=\"../style.css\">\n"\
 			"<title>$REPO_NAME</title>\n"\
-			"<h1><a href=\"../index.html\" title=\"Home\">&#8962;</a> $REPO_NAME</h1>\n"\
+			"<h1><a href=\"../index.html\" title=\"Home\">&#8962;&#xFE0E;</a> $REPO_NAME</h1>\n"\
 			"<h4>$REPO_DESC</h4>\n"\
 			"<h5>git clone <a href=\"$REPO_URL\" title=\"$REPO_NAME clone URL\">$REPO_URL</a></h5>\n"\
 			"<hr>\n"\
 			"<table id=\"main\" cellpadding=\"0\" cellspacing=\"0\">\n"\
-			"<tr id=\"navigation\"><td>&nbsp;&nbsp; Hash</td><td>Commit message</td><td>Author</td><td>Date</td></tr>" >> $WWW_DIR/$REPO_NAME/index.html
+			"<tr id=\"navigation\"><th></th><th>Hash</th><th>Commit message</th><th>Author</th><th>Date</th></tr>" >> $WWW_DIR/$REPO_NAME/index.html
 }
 
 generate_commit_index() {
 	local REPO_NAME=$1
 	local COMMIT_HASH=$2
-	echo -e "<!DOCTYPE html>\n"\
-			"<html lang=\"en-US\">\n"\
-			"<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style.css\">\n"\
-			"<meta charset=\"UTF-8\">\n"\
+	echo -e "<!doctype html>\n"\
+			"<link rel=\"stylesheet\" href=\"../../style.css\">\n"\
 			"<title>$REPO_NAME :: $COMMIT_HASH</title>\n"\
-			"<h1><a href=\"../index.html\" title=\"Back to Repository\">&#x1F880;</a> $REPO_NAME :: $COMMIT_HASH</h1>\n"\
+			"<h1><a href=\"../index.html\" title=\"Back to Repository\">&#x1F880;&#xFE0E;</a> $REPO_NAME :: $COMMIT_HASH</h1>\n"\
 			"<hr>\n"\
 			"<pre>" >> $WWW_DIR/$REPO_NAME/commit/$COMMIT_HASH.html
 }
@@ -128,11 +122,11 @@ for d in $(find $REPO_DIR -name .git -type d -prune | sort); do # todo: sort by
 		COMMIT_KEY=$(echo $line | cut -d'|' -f2)
 		COMMIT_KEYID=$(echo $line | cut -d'|' -f3)
 		if [ $COMMIT_SIGNED = 'G' ]; then
-			COMMIT_SIGNED="<span style=\"color:green\" title=\"$COMMIT_KEY&#13;$COMMIT_KEYID\">&#128274;</span>"
+			COMMIT_SIGNED="<span style=\"color:green\" title=\"$COMMIT_KEY&#13;$COMMIT_KEYID\">&#128274;&#xFE0E;</span>"
 		elif [ $COMMIT_SIGNED = 'B' ] || [ $COMMIT_SIGNED = 'U' ]  || [ $COMMIT_SIGNED = 'X' ] || [ $COMMIT_SIGNED = 'Y' ] || [ $COMMIT_SIGNED = 'R' ]; then
-			COMMIT_SIGNED="<span style=\"color:red\" title=\"$COMMIT_KEY&#13;$COMMIT_KEYID&#13;key is bad, invalid, expired, or revoked\">&#128274;</span>"
+			COMMIT_SIGNED="<span style=\"color:red\" title=\"$COMMIT_KEY&#13;$COMMIT_KEYID&#13;key is bad, invalid, expired, or revoked\">&#128274;&#xFE0E;</span>"
 		else
-			COMMIT_SIGNED="&nbsp;"
+			COMMIT_SIGNED=""
 		fi
 		COMMIT_HASH=$(echo $line | cut -d'|' -f4)
 		COMMIT_MESSAGE=$(echo $line | cut -d'|' -f5 | sed 's/&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g;s/"/\&quot;/g;')
@@ -141,7 +135,7 @@ for d in $(find $REPO_DIR -name .git -type d -prune | sort); do # todo: sort by
 		fi
 		COMMIT_AUTHOR=$(echo $line | cut -d'|' -f6)
 		COMMIT_DATE=$(echo $line | cut -d'|' -f7)
-		echo "<tr class=\"item\"><td>$COMMIT_SIGNED <a href=\"commit/$COMMIT_HASH.html\" title=\"View this commit\">$COMMIT_HASH</a></td><td>$COMMIT_MESSAGE</td><td>$COMMIT_AUTHOR</td><td>$COMMIT_DATE</td></tr>" >> $WWW_DIR/$REPO_NAME/index.html
+		echo "<tr class=\"item\"><td>$COMMIT_SIGNED</td><td><a href=\"commit/$COMMIT_HASH.html\" title=\"View this commit\">$COMMIT_HASH</a></td><td>$COMMIT_MESSAGE</td><td>$COMMIT_AUTHOR</td><td>$COMMIT_DATE</td></tr>" >> $WWW_DIR/$REPO_NAME/index.html
 		generate_commit_index $REPO_NAME $COMMIT_HASH
 		COMMIT_DIFF=$(git --git-dir $d show $COMMIT_HASH) # todo: convert terminal colors to html
 		if [ $MAX_COMMIT_LINES -ne 0 -a $(echo "$COMMIT_DIFF" | wc -l) -gt $MAX_COMMIT_LINES ]; then