From 8bc155e9ddd7492e4b0c14017482723f6cfe761d Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Wed, 14 Mar 2012 17:33:35 -0500 Subject: [PATCH] move to cgit --- Makefile | 8 +- cgit-header.html | 13 + cgit.css | 729 +++++++++++++++++++++++++++++++++++++++++++++ cgitrc | 18 ++ default.css | 1 + g.cgi.c | 11 + gitweb.conf | 2 +- src/dwm/index.mdwn | 2 +- src/eris.mdwn | 9 +- src/escm.mdwn | 2 +- src/firebot.mdwn | 2 +- src/index.mdwn | 12 +- src/ubk/index.mdwn | 2 +- src/xss.mdwn | 4 +- 14 files changed, 795 insertions(+), 20 deletions(-) create mode 100644 cgit-header.html create mode 100644 cgit.css create mode 100644 cgitrc create mode 100644 g.cgi.c diff --git a/Makefile b/Makefile index 85042a1..a884f17 100644 --- a/Makefile +++ b/Makefile @@ -12,13 +12,14 @@ COPY += face.png chumby-photo.cgi COPY += format.css default.css print.css COPY += gitweb.cgi git-logo.png gitweb.css gitweb.conf COPY += portal.png portal.cgi +COPY += g.cgi cgitrc cgit-header.html cgit.css # Directories in which %.mdwn generates %.html PLAIN = . papers poems misc # Other targets for "make all" TARGETS = html copy -TARGETS += $(DESTDIR)/tmp $(DESTDIR)/footer.xml $(DESTDIR)/projects +TARGETS += $(DESTDIR)/tmp $(DESTDIR)/footer.html $(DESTDIR)/projects TARGETS += $(DESTDIR)/geneweb.cgi all: default @@ -36,7 +37,7 @@ $(DESTDIR)/%: % $(DESTDIR)/tmp: mkdir -p $@ -$(DESTDIR)/footer.xml: $(TEMPLATE) +$(DESTDIR)/footer.html: $(TEMPLATE) awk '(/FOOT/) { a += 1; next; } (a == 1) { print; }' $< > $@ $(DESTDIR)/projects: @@ -46,6 +47,9 @@ $(DESTDIR)/geneweb.cgi: geneweb.c $(CC) -o $@ $< chmod +s $@ +$(DESTDIR)/g.cgi: g.cgi.c + $(CC) -o $@ $< + $(DESTDIR)/%-sm.jpg: %.jpg jpegtopnm $< | pnmscale -xysize 200 200 | pnmtojpeg > $@ diff --git a/cgit-header.html b/cgit-header.html new file mode 100644 index 0000000..2fad497 --- /dev/null +++ b/cgit-header.html @@ -0,0 +1,13 @@ + + + + Neale's git projects + + + + + + + + + diff --git a/cgit.css b/cgit.css new file mode 100644 index 0000000..8764481 --- /dev/null +++ b/cgit.css @@ -0,0 +1,729 @@ +@import url("default.css"); +body { + max-width: inherit; +} + +table#header { + width: 100%; + margin-bottom: 1em; +} + +table#header td.main { + font-family: "URW Gothic L", sans-serif; + font-size: 200%; + color: #c17f6f; + padding-left: 10px; + white-space: nowrap; +} + +table#header td.form { + text-align: right; + vertical-align: bottom; + padding-right: 1em; + padding-bottom: 2px; + white-space: nowrap; +} + +table#header td.form form, +table#header td.form input, +table#header td.form select { + font-size: 90%; +} + +table#header td.sub { + color: #777; + border-top: solid 1px #ccc; + padding-left: 10px; +} + +table.tabs { + border-bottom: solid 3px #ccc; + border-collapse: collapse; + margin-top: 2em; + margin-bottom: 0px; + width: 100%; +} + +table.tabs td { + padding: 0px 1em; + vertical-align: bottom; +} + +table.tabs td a { + padding: 2px 0.75em; + font-size: 110%; +} + +table.tabs td a.active { + color: #000; + background-color: #ccc; +} + +table.list { + width: 100%; + border: none; + border-collapse: collapse; +} + +table.list tr:hover { + background: #ddd; +} + +table.list tr.nohover:hover { + background: inherit; +} + +table.list th { + font-weight: bold; + background: #ccc; + border-bottom: solid 1px #888; + padding: 0.1em 0.5em 0.05em 0.5em; + vertical-align: baseline; +} + +table.list td { + border: none; + padding: 0.1em 0.5em 0.1em 0.5em; +} + +table.list td.commitgraph { + font-family: monospace; + white-space: pre; +} + +table.list td.commitgraph .column1 { + color: #a00; +} + +table.list td.commitgraph .column2 { + color: #0a0; +} + +table.list td.commitgraph .column3 { + color: #aa0; +} + +table.list td.commitgraph .column4 { + color: #00a; +} + +table.list td.commitgraph .column5 { + color: #a0a; +} + +table.list td.commitgraph .column6 { + color: #0aa; +} + +table.list td.logsubject { + font-family: monospace; + font-weight: bold; +} + +table.list td.logmsg { + font-family: monospace; + white-space: pre; + padding: 0 0.5em; +} + +table.list td a.ls-dir { + font-weight: bold; + color: #00f; +} + +img { + border: none; +} + +input#switch-btn { + margin: 2px 0px 0px 0px; +} + +td#sidebar input.txt { + width: 100%; + margin: 2px 0px 0px 0px; +} + +table#grid { + margin: 0px; +} + +td#content { + vertical-align: top; + padding: 1em 2em 1em 1em; + border: none; +} + +div#summary { + vertical-align: top; + margin-bottom: 1em; +} + +table#downloads { + float: right; + border-collapse: collapse; + border: solid 1px #777; + margin-left: 0.5em; + margin-bottom: 0.5em; +} + +table#downloads th { + background-color: #ccc; +} + +div#blob { + border: solid 1px black; +} + +div.error { + color: red; + font-weight: bold; + margin: 1em 2em; +} + +a.ls-blob, a.ls-dir, a.ls-mod { + font-family: monospace; +} + +td.ls-size { + text-align: right; + font-family: monospace; + width: 10em; +} + +td.ls-mode { + font-family: monospace; + width: 10em; +} + +table.blob { + margin-top: 0.5em; + border-top: solid 1px black; +} + +table.blob td.lines { + margin: 0; padding: 0 0 0 0.5em; + vertical-align: top; + color: black; +} + +table.blob td.linenumbers { + margin: 0; padding: 0 0.5em 0 0.5em; + vertical-align: top; + text-align: right; + border-right: 1px solid gray; +} + +table.blob pre { + padding: 0; margin: 0; +} + +table.blob a.no, table.ssdiff a.no { + color: gray; + text-align: right; + text-decoration: none; +} + +table.blob a.no a:hover { + color: black; +} + +table.bin-blob { + margin-top: 0.5em; + border: solid 1px black; +} + +table.bin-blob th { + font-family: monospace; + white-space: pre; + border: solid 1px #777; + padding: 0.5em 1em; +} + +table.bin-blob td { + font-family: monospace; + white-space: pre; + border-left: solid 1px #777; + padding: 0em 1em; +} + +table.nowrap td { + white-space: nowrap; +} + +table.commit-info { + border-collapse: collapse; + margin-top: 1.5em; +} + +div.cgit-panel { + float: right; + margin-top: 1.5em; +} + +div.cgit-panel table { + border-collapse: collapse; + border: solid 1px #aaa; + background-color: #eee; +} + +div.cgit-panel th { + text-align: center; +} + +div.cgit-panel td { + padding: 0.25em 0.5em; +} + +div.cgit-panel td.label { + padding-right: 0.5em; +} + +div.cgit-panel td.ctrl { + padding-left: 0.5em; +} + +table.commit-info th { + text-align: left; + font-weight: normal; + padding: 0.1em 1em 0.1em 0.1em; + vertical-align: top; +} + +table.commit-info td { + font-weight: normal; + padding: 0.1em 1em 0.1em 0.1em; +} + +div.commit-subject { + font-weight: bold; + font-size: 125%; + margin: 1.5em 0em 0.5em 0em; + padding: 0em; +} + +div.commit-msg { + white-space: pre; + font-family: monospace; +} + +div.notes-header { + font-weight: bold; + padding-top: 1.5em; +} + +div.notes { + white-space: pre; + font-family: monospace; + border: solid 1px #ee9; + background-color: #ffd; + padding: 0.3em 2em 0.3em 1em; + float: left; +} + +div.notes-footer { + clear: left; +} + +div.diffstat-header { + font-weight: bold; + padding-top: 1.5em; +} + +table.diffstat { + border-collapse: collapse; + border: solid 1px #aaa; + background-color: #eee; +} + +table.diffstat th { + font-weight: normal; + text-align: left; + text-decoration: underline; + padding: 0.1em 1em 0.1em 0.1em; + font-size: 100%; +} + +table.diffstat td { + padding: 0.2em 0.2em 0.1em 0.1em; + font-size: 100%; + border: none; +} + +table.diffstat td.mode { + white-space: nowrap; +} + +table.diffstat td span.modechange { + padding-left: 1em; + color: red; +} + +table.diffstat td.add a { + color: green; +} + +table.diffstat td.del a { + color: red; +} + +table.diffstat td.upd a { + color: blue; +} + +table.diffstat td.graph { + width: 500px; + vertical-align: middle; +} + +table.diffstat td.graph table { + border: none; +} + +table.diffstat td.graph td { + padding: 0px; + border: 0px; + height: 7pt; +} + +table.diffstat td.graph td.add { + background-color: #5c5; +} + +table.diffstat td.graph td.rem { + background-color: #c55; +} + +div.diffstat-summary { + color: #888; + padding-top: 0.5em; +} + +table.diff { + width: 100%; +} + +table.diff td { + font-family: monospace; + white-space: pre; +} + +table.diff td div.head { + font-weight: bold; + margin-top: 1em; + color: black; +} + +table.diff td div.hunk { + color: #009; +} + +table.diff td div.add { + color: green; +} + +table.diff td div.del { + color: red; +} + +.sha1 { + font-family: monospace; + font-size: 90%; +} + +.left { + text-align: left; +} + +.right { + text-align: right; +} + +table.list td.reposection { + font-style: italic; + color: #888; +} + +a.button { + font-size: 80%; + padding: 0em 0.5em; +} + +a.primary { + font-size: 100%; +} + +a.secondary { + font-size: 90%; +} + +td.toplevel-repo { + +} + +table.list td.sublevel-repo { + padding-left: 1.5em; +} + +div.pager { + text-align: center; + margin: 1em 0em 0em 0em; +} + +div.pager a { + color: #777; + margin: 0em 0.5em; +} + +span.age-mins { + font-weight: bold; + color: #080; +} + +span.age-hours { + color: #080; +} + +span.age-days { + color: #040; +} + +span.age-weeks { + color: #444; +} + +span.age-months { + color: #888; +} + +span.age-years { + color: #bbb; +} +div.footer { + margin-top: 0.5em; + text-align: center; + font-size: 80%; + color: #ccc; +} +a.branch-deco { + margin: 0px 0.5em; + padding: 0px 0.25em; + background-color: #88ff88; + border: solid 1px #007700; +} +a.tag-deco { + margin: 0px 0.5em; + padding: 0px 0.25em; + background-color: #ffff88; + border: solid 1px #777700; +} +a.remote-deco { + margin: 0px 0.5em; + padding: 0px 0.25em; + background-color: #ccccff; + border: solid 1px #000077; +} +a.deco { + margin: 0px 0.5em; + padding: 0px 0.25em; + background-color: #ff8888; + border: solid 1px #770000; +} + +div.commit-subject a.branch-deco, +div.commit-subject a.tag-deco, +div.commit-subject a.remote-deco, +div.commit-subject a.deco { + margin-left: 1em; + font-size: 75%; +} + +table.stats { + border: solid 1px black; + border-collapse: collapse; +} + +table.stats th { + text-align: left; + padding: 1px 0.5em; + background-color: #eee; + border: solid 1px black; +} + +table.stats td { + text-align: right; + padding: 1px 0.5em; + border: solid 1px black; +} + +table.stats td.total { + font-weight: bold; + text-align: left; +} + +table.stats td.sum { + color: #c00; + font-weight: bold; +/* background-color: #eee; */ +} + +table.stats td.left { + text-align: left; +} + +table.vgraph { + border-collapse: separate; + border: solid 1px black; + height: 200px; +} + +table.vgraph th { + background-color: #eee; + font-weight: bold; + border: solid 1px white; + padding: 1px 0.5em; +} + +table.vgraph td { + vertical-align: bottom; + padding: 0px 10px; +} + +table.vgraph div.bar { + background-color: #eee; +} + +table.hgraph { + border: solid 1px black; + width: 800px; +} + +table.hgraph th { + background-color: #eee; + font-weight: bold; + border: solid 1px black; + padding: 1px 0.5em; +} + +table.hgraph td { + vertical-align: middle; + padding: 2px 2px; +} + +table.hgraph div.bar { + background-color: #eee; + height: 1em; +} + +table.ssdiff { + width: 100%; +} + +table.ssdiff td { + font-size: 75%; + font-family: monospace; + white-space: pre; + padding: 1px 4px 1px 4px; + border-left: solid 1px #aaa; + border-right: solid 1px #aaa; +} + +table.ssdiff td.add { + color: black; + background: #cfc; + min-width: 50%; +} + +table.ssdiff td.add_dark { + color: black; + background: #aca; + min-width: 50%; +} + +table.ssdiff span.add { + background: #cfc; + font-weight: bold; +} + +table.ssdiff td.del { + color: black; + background: #fcc; + min-width: 50%; +} + +table.ssdiff td.del_dark { + color: black; + background: #caa; + min-width: 50%; +} + +table.ssdiff span.del { + background: #fcc; + font-weight: bold; +} + +table.ssdiff td.changed { + color: black; + background: #ffc; + min-width: 50%; +} + +table.ssdiff td.changed_dark { + color: black; + background: #cca; + min-width: 50%; +} + +table.ssdiff td.lineno { + color: black; + background: #eee; + text-align: right; + width: 3em; + min-width: 3em; +} + +table.ssdiff td.hunk { + color: black; + background: #ccf; + border-top: solid 1px #aaa; + border-bottom: solid 1px #aaa; +} + +table.ssdiff td.head { + border-top: solid 1px #aaa; + border-bottom: solid 1px #aaa; +} + +table.ssdiff td.head div.head { + font-weight: bold; + color: black; +} + +table.ssdiff td.foot { + border-top: solid 1px #aaa; + border-left: none; + border-right: none; + border-bottom: none; +} + +table.ssdiff td.space { + border: none; +} + +table.ssdiff td.space div { + min-height: 3em; +} + +/* Syntax highlighting */ +table.blob .num { color:#2928ff; } +table.blob .esc { color:#ff00ff; } +table.blob .str { color:#ff0000; } +table.blob .dstr { color:#818100; } +table.blob .slc { color:#838183; font-style:italic; } +table.blob .com { color:#838183; font-style:italic; } +table.blob .dir { color:#008200; } +table.blob .sym { color:#000000; } +table.blob .kwa { color:#000000; font-weight:bold; } +table.blob .kwb { color:#830000; } +table.blob .kwc { color:#000000; font-weight:bold; } +table.blob .kwd { color:#010181; } diff --git a/cgitrc b/cgitrc new file mode 100644 index 0000000..88768d6 --- /dev/null +++ b/cgitrc @@ -0,0 +1,18 @@ +project-list=/home/neale/projects/public.txt +#photobob pgircd py-pcap wticket gikiwiki unpluck firebot status py-ipqueue dbtl scoreboard eris + +snapshots=zip tar.gz +clone-url=http://woozle.org/~neale/projects/$CGIT_REPO_URL +scan-path=/home/neale/projects +virtual-root=/~neale/g.cgi/ +css=/~neale/cgit.css + +root-title=Neale's git projects +root-desc= + +logo= +#embedded=1 +#noheader=1 +#header=/home/neale/public_html/cgit-header.html +footer=/home/neale/public_html/footer.html + diff --git a/default.css b/default.css index 8049c22..92554d6 100644 --- a/default.css +++ b/default.css @@ -12,6 +12,7 @@ h1:first-child { h1, h2, h3, h4, h5, h6 { font-family: "URW Gothic L", sans-serif; + font-weight: normal; color: #c17f6f; } diff --git a/g.cgi.c b/g.cgi.c new file mode 100644 index 0000000..d9ef443 --- /dev/null +++ b/g.cgi.c @@ -0,0 +1,11 @@ +#include +#include + +int +main(int argc, char *argv[]) +{ + setenv("CGIT_CONFIG", "/home/neale/public_html/cgitrc", 1); + execl("/usr/local/src/cgit/cgit-stable/cgit", "cgit", NULL); + + return 0; +} diff --git a/gitweb.conf b/gitweb.conf index 6f50863..b6a1a64 100644 --- a/gitweb.conf +++ b/gitweb.conf @@ -10,6 +10,6 @@ $projects_list = "/home/neale/projects/public.txt"; $site_name = "Neale's git repositories"; @stylesheets = ("/~neale/default.css", "/~neale/gitweb.css"); $site_header = "$projectroot/header.xml"; -$site_footer = "/home/neale/public_html/footer.xml"; +$site_footer = "/home/neale/public_html/footer.html"; undef $favicon; \ No newline at end of file diff --git a/src/dwm/index.mdwn b/src/dwm/index.mdwn index b953170..5df8fc0 100644 --- a/src/dwm/index.mdwn +++ b/src/dwm/index.mdwn @@ -17,7 +17,7 @@ browser. restarting dwm, multimedia buttons, and [xss](http://woozle.org/~neale/src/xss.html) integration (3 lines of code). -* [My status program](http://woozle.org/~neale/gitweb.cgi/status) +* [My status program](http://woozle.org/~neale/g.cgi/status) is responsible for having DWM show the current time, load average, battery charge, and wifi status. It gracefully handles machines that lack one or more of these features. diff --git a/src/eris.mdwn b/src/eris.mdwn index 939db07..a0cbda6 100644 --- a/src/eris.mdwn +++ b/src/eris.mdwn @@ -14,7 +14,7 @@ Features * Actively maintained * Small: around 1100 lines of code, 19k binary with glibc -* Fast: as fast as fnord, at least +* Fast: as fast as fnord * Connection keepalive * thttpd-style virtual domains * IPv6 and SSL support @@ -28,17 +28,16 @@ Differences with fnord * command-line arguments instead of compile-time defines * eliminated use of libowfat -* no build dependency of dietlibc +* no build dependency on dietlibc * elimination of "old style symlink handling" * elimination of user switching (you can use tcpserver -[ug]) * elimination of chroot code (you can use chroot) * several bugfixes (sent to the fnord mail list) -* ignores Accept header (fnord does too) Download -------- -* [3.0 Release Candidate 1](http://woozle.org/~neale/gitweb.cgi/eris/snapshot/3.0rc1.tar.gz) -* [Version Control](http://woozle.org/~neale/gitweb.cgi/eris) +* [3.0 Release Candidate 1](http://woozle.org/~neale/g.cgi/eris/snapshot/eris-3.0rc1.tar.gz) +* [Version Control](http://woozle.org/~neale/g.cgi/eris) diff --git a/src/escm.mdwn b/src/escm.mdwn index 3861b90..2b9cfa2 100644 --- a/src/escm.mdwn +++ b/src/escm.mdwn @@ -18,7 +18,7 @@ I'm not going to package it up until someone's interested. Downloading it -------------- -You can download a [tarball of the latest version in git](http://woozle.org/~neale/gitweb.cgi?p=escm;a=snapshot), or check it out yourself: +You can download a [tarball of the latest version in git](http://woozle.org/~neale/g.cgi/escm/snapshot/escm-master.tar.gz), or check it out yourself: git clone http://woozle.org/~neale/repos/escm diff --git a/src/firebot.mdwn b/src/firebot.mdwn index 41de5d5..bf44595 100644 --- a/src/firebot.mdwn +++ b/src/firebot.mdwn @@ -20,7 +20,7 @@ FireBot's name. Example: Downloading ----------- -You can download a [tarball snapshot of the latest release](http://woozle.org/~neale/gitweb.cgi?p=firebot;a=snapshot;h=HEAD), or use cogito: +You can download a [tarball snapshot of the latest release](http://woozle.org/~neale/g.cgi/firebot/snapshot/firebot-master.tar.gz), or use cogito: git clone http://woozle.org/~neale/projects/firebot diff --git a/src/index.mdwn b/src/index.mdwn index f61ea9c..0bfc26b 100644 --- a/src/index.mdwn +++ b/src/index.mdwn @@ -3,23 +3,26 @@ Title: Software I write software for a living. I like doing it so much that sometimes I even write software just for fun. -My [version control](/~neale/gitweb.cgi) holds the source code to most +My [version control](/~neale/g.cgi) holds the source code to most of these packages. Networky things ------------------------------- * [Eris HTTPd](eris.html), a small HTTP (web) server -* [pysieved](pysieved.html), a Python ManageSieve server +* [pysieved](http://www.gitorious.net/pysieved/pages/Home), a Python ManageSieve server +* [CBot](/~neale/g.cgi/bot), an IRC bot you program with shell scripts or whatever other language you prefer * [Firebot](firebot.html), an easily-extended IRC bot in continuous use since 1996 * [Python IPQUEUE library](ipqueue/) +* [netre-tools](/~neale/g.cgi/netre-tools), protocol reverse-engineering toolset X11 things ------------------------------- * [xss](xss.html), a simple (suckless) screen saver for X11 -* [dwm hacks](dwm/) contains my tweaks to [dwm](http://dwm.suckless.org/) +* [dwm hacks](dwm/), my tweaks to [dwm](http://dwm.suckless.org/) Various and sundry things ------------------------------- +* [Roller Derby Scoreboard](http://woozle.org/scoreboard/) * The [Universal Boardgame Kit](ubk/) * [eguile](eguile/), like PHP for Guile Scheme * [escm](escm.html), like PHP for Gauche Scheme and others @@ -27,6 +30,3 @@ Various and sundry things * [Postscript hacks](postscript/) of diminutive size and quality * [Other hacks](misc/) of diminutive size and quality - - - diff --git a/src/ubk/index.mdwn b/src/ubk/index.mdwn index 78a524c..c388a61 100644 --- a/src/ubk/index.mdwn +++ b/src/ubk/index.mdwn @@ -18,7 +18,7 @@ restrict others' access to the source code. syscmd("src/ubk/parts.sh") -You can download the [source code](/~neale/gitweb.cgi?p=ubk) if you'd +You can download the [source code](/~neale/g.cgi/ubk) if you'd like it. diff --git a/src/xss.mdwn b/src/xss.mdwn index 08af411..fa24a85 100644 --- a/src/xss.mdwn +++ b/src/xss.mdwn @@ -86,9 +86,9 @@ won't lock if the cursor's at the top of the screen. Download -------- -You can [browse the source](http://woozle.org/~neale/gitweb.cgi?p=xss), +You can [browse the source](http://woozle.org/~neale/g.cgi/xss), download a [tarball of the latest -commit](http://woozle.org/~neale/gitweb.cgi?p=xss;a=snapshot), or clone the +commit](http://woozle.org/~neale/g.cgi/xss/snapshot/xss-master.tar.gz), or clone the git repository: git clone http://woozle.org/~neale/projects/xss