write degal page, tweak h1/h2/h3 styles, tweak other pages to use those, add missing spbot.html page
authorTero Marttila <terom@fixme.fi>
Mon, 15 Jun 2009 02:42:23 +0300
changeset 53 158854761213
parent 52 ee1e0491b4a0
child 54 d8658498f65e
write degal page, tweak h1/h2/h3 styles, tweak other pages to use those, add missing spbot.html page
.hgignore
pages/about.html
pages/list
pages/projects/degal.tmpl
pages/projects/index.html
pages/projects/nr-ttd.html
pages/spbot.html
static/style.css
--- a/.hgignore	Mon Jun 15 01:44:05 2009 +0300
+++ b/.hgignore	Mon Jun 15 02:42:23 2009 +0300
@@ -2,4 +2,4 @@
 \.[^/]+.sw[op]$
 \.pyc$
 ^cache/templates/.
-
+^stuff/
--- a/pages/about.html	Mon Jun 15 01:44:05 2009 +0300
+++ b/pages/about.html	Mon Jun 15 02:42:23 2009 +0300
@@ -1,15 +1,16 @@
-<h1>About me</h1>
+<h2>About me</h2>
 
 <p>
     My name is Tero Marttila. I'm a student at <a href="http://www.tkk.fi/">Helsinki University of Technology</a>, living in Otaniemi.
 </p>
 
-<h1>Contact</h1>
+<h2>Contact</h2>
+    <h3>IRC</h3>
+        <p>
+            I am best reached via IRC, under the nickname of <em>SpComb</em> on any of IRCNet, freenode, OFTC.
+        </p>
 
-<p>
-    I am best reached via IRC, under the nickname of <em>SpComb</em> on any of IRCNet, freenode, OFTC.
-</p>
-
-<p>
-    Alternatively, I'm also reached via email: <em>terom@fixme.fi</em>
-</p>
+    <h3>e-mail</h3>
+        <p>
+            Alternatively, I'm also reached via email: <em>terom@fixme.fi</em>
+        </p>
--- a/pages/list	Mon Jun 15 01:44:05 2009 +0300
+++ b/pages/list	Mon Jun 15 02:42:23 2009 +0300
@@ -1,11 +1,12 @@
 
             : Index
 projects        : Projects
+    irclogs2        : irclogs2
+    degal           : Degal
+    kg              : Kišna Glista
     www.qmsk.net    : www.qmsk.net
     qmsk.web        : qmsk.web
-    irclogs2        : irclogs2
     evsql           : evsql
     nr-ttd          : Nr-TTD
-    kg              : Kišna Glista
 about           : About
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pages/projects/degal.tmpl	Mon Jun 15 02:42:23 2009 +0300
@@ -0,0 +1,119 @@
+<%
+
+import os
+
+RELEASE_PATH = "/home/projects/degal/releases"
+RELEASE_URL = "http://projects.qmsk.net/degal/releases"
+
+# load release links
+releases = []
+
+for filename in os.listdir(RELEASE_PATH) :
+    if filename.startswith('.') :
+        continue
+
+    path = os.path.join(RELEASE_PATH, filename)
+    url = "%s/%s" % (RELEASE_URL, filename)
+
+    releases.append((filename, url))
+
+releases.sort()
+
+%>
+
+<h1>Degal</h1>
+    <h2>About</h2>
+        <p>
+            <strong>Degal</strong> is a HTML photo gallery script written in Python.
+        </p>
+    
+    <h2>History</h2>
+        <p>
+            Degal was origionally based on a similar HTML gallery script called <a href="http://pajukanta.fi/projects/egal/">EGAL</a>,
+            written by Santtu Pajukanta, rewritten to add more features such as support for sub-folders (!).
+        </p>
+
+        <p>
+            Releases 0.1 - 0.2 remained fairly simplistic single-module scripts which were manageable, but development
+            in the old SVN repository quickly split the code up into a package. At this point the packaging and
+            structure quickly fell apart, with the resulting code and CGI scripts being barely useable by myself.
+        </p>
+
+        <p>
+            In early summer 2009, I picked up development again, heavily refactoring the old svn code into a (hopefully)
+            better structure.
+        </p>
+
+        <p>
+            Currently, the only releases are still from the old first-generation era, but hopefully we should be seeing a
+            third-generation release fairly soon :)
+        </p>
+    
+    <h2>Features</h2>
+        <ul>
+            <li>Generate static per-folder/img .html files for a directory tree</li>
+            <li>Generate thumbnail and preview versions of each image</li>
+        </ul>
+ 
+    <h2>Download</h2>
+        <h3>Release versions</h3>
+            <ul>
+            % for filename, url in releases :
+                <li><a href="${url}">${filename}</a></li>
+            % endfor
+            </ul>
+            
+        <h3>Development version</h3>
+            <code>hg clone http://hg.qmsk.net/degal</code>
+    
+    <h2>Installation and usage (for release versions)</h2>
+        <p>Extract the archive file and move these files and directories to where your images are:</p>
+        <ul>
+            <li>.htaccess</li>
+            <li>degal.py</li>
+            <li>utils.py</li>
+            <li>shorturl.cgi</li>
+            <li>style.css</li>
+            <li>templates/</li>
+        </ul>
+        <p>If you wish to use ShortURLs and run DeGAL with mod_userdir, you may need to modify the .htaccess to set the RewriteBase.</p>
+        <p>If you now execute degal.py on the command line, it will scan through your images, create thumbnails, preview images, as well as generate the HTML gallery pages.</p>
+        <p>Gallery (directory) titles may optionaly be specified in a file called title.txt in each directory. If present, it should contain a short title that will be used for all links to that gallery. You may also add a longer description (after the title, seperated by three dashes, ---, extra whitespace will be stripped away) which will be shown on the directory's index page.</p>
+        <p>The same may be done for induvidual images (replace the file extension with .txt, i.e. DSC0001.jpg becomes DSC0001.txt) whereupon the URL for the image will use a simplified version of the image's title.</p>
+        <p>It is also possible to specify a list of directories/files to index as command-line arguments to degal.py, in which case it will only process those files. Note that a directory index will only be updated if the directory itself is included in the filter.</p>
+        
+   
+    <h2>Requirements</h2>
+        <h3>Release version / Development core</h3>
+            <ul>
+                <li><a href="http://www.python.org/">Python</a> 2.5</li>
+                <li><a href="http://www.pythonware.com/products/pil/">PIL</a> 1.1.6</li>
+            </ul>
+
+        <h3>Development optional</h3>
+            <ul>
+                <li><a href="http://tilloy.net/dev/pyexiv2/">pyexiv2</a></li>
+                <li><a href="http://sourceforge.net/projects/exif-py">EXIFpy</a></li>
+            </ul>
+    
+    <h2>Changelog</h2>
+        <ul>
+            <li>
+                0.2
+                <ul>
+                    <li>Added ShortURL feature</li>
+                    <li>Added ability to specify a list of files to update on the command line</li>
+                </ul>
+            </li>
+        </ul>
+
+    <h2>Links</h2>
+        <h3>Source Repository</h3>
+            <p>
+                Mercurial: <a href="http://hg.qmsk.net/degal">http://hg.qmsk.net/degal</a>
+            </p>
+            
+        <h3>Example Gallery</h3>
+            <p>
+                <a href="http://photos.qmsk.net/">http://photos.qmsk.net/</a>
+            </p>
--- a/pages/projects/index.html	Mon Jun 15 01:44:05 2009 +0300
+++ b/pages/projects/index.html	Mon Jun 15 02:42:23 2009 +0300
@@ -3,12 +3,17 @@
     <p>I've worked on a variety of projects over the years, leaving them in various stages of completion.</p>
 
     <p>Some of the perhaps more noteworthy ones have their own project pages here (see menu to the left).</p>
+    
+    <h3>irclogs2</h3>
+        <p>A neat web-based IRC log viewer: <a href="http://irclogs.qmsk.net/">irclogs.qmsk.net</a></p>
 
-    <h2>Nr-TTD</h2>
-        
+    <h3>Degal</h3>
+        <p>A HTML photo gallery.</p>
+
+    <h3>Nr-TTD</h3>
         <p>A bunch of Microsoft batch-file code that functions as an installer for <a href="http://www.ttdpatch.net/">TTD Patch</a>, a third-party binary patch for an <a href="http://en.wikipedia.org/wiki/Transport_Tycoon">old game</a>.</p>
 
-    <h2>Kišna Glista</h2>
+    <h3>Kišna Glista</h3>
 
         <p>An open-source Liero clone (the 985th one).</p>
 
--- a/pages/projects/nr-ttd.html	Mon Jun 15 01:44:05 2009 +0300
+++ b/pages/projects/nr-ttd.html	Mon Jun 15 02:42:23 2009 +0300
@@ -1,10 +1,12 @@
-<h1>Summary</h1>
+<h1>nr-TTD</h1>
+
+<h2>Summary</h2>
 
     <p><em>nr-TTD</em> (originally <q>No Registry - TTD</q>) is a batch file installer for TTD. It can download and install <a href="http://en.wikipedia.org/wiki/Transport_Tycoon#Transport_Tycoon_Deluxe">TTD</a>, <a href="http://ttdpatch.net/">TTD Patch</a>, <a href="http://www.tt-forums.net/viewtopic.php?t=26352">TTD Patch Configurator</a> as well as a (poor) selection of newgrf files.</p>
 
     <p>Please note that the project is not under any form of active development anymore.</p>
 
-<h1>Install</h1>
+<h2>Install</h2>
 
 <ol>
     <li>Download <a href="http://zapotek.paivola.fi/~terom/nr-ttd/get/nr-ttd_latest.zip">the latest version</a></li>
@@ -14,7 +16,7 @@
     <li>Done</li>
 </ol>
 
-<h1>Playing</h1>
+<h2>Playing</h2>
 
     <p>Usually, you can play TTD by simply running <tt>ttdpatchw.exe</tt> in the folder that you unzipped Nr-TTD to. For added convenience you can create a shortcut to the <tt>ttdpatchw.exe</tt> file:</p>
 
@@ -26,22 +28,22 @@
 
     <p>Then simply run this shortcut to play TTD.</p>
 
-<h2>Registry errors</h2>
+<h3>Registry errors</h3>
 
     <p>In case you get registry errors when running <tt>ttdpatchw.exe</tt> (as may be the case when installing on top of previous installs of TTD), you should simply use <tt>run-forcenoreg.bat</tt> instead of <tt>ttdpatchw.exe</tt>. This instructs TTD Patch to ignore the windows registry, which should solve all registry problems.</p>
 
-<h1>Configuring</h1>
+<h2>Configuring</h2>
 
     <p>Nr-TTD also installs the <a href="http://www.tt-forums.net/viewtopic.php?t=26352">TTD Patch Configurator</a>, which can be used to change your TTD Patch configuration. This enables you to tweak your gameplay in many different ways, and it is highly recommended that you look through the available settings. Refer to the <a href="http://wiki.ttdpatch.net/tiki-index.php?page=Manual">TTD Patch Manual</a> for further information on the induvidual switches.</p>
 
     <p>Simply run <tt>ttdpc.exe</tt> from the TTD folder.</p>
 
-<h1>Requirements</h1>
+<h2>Requirements</h2>
     <p>Nr-TTD uses fairly new batch file syntax, and hence probably only works on Windows XP SP2 or later. Space requirements are about 20MB or so. Total download size is some 9 MB without newgrfs, and then a couple hundred KB per newgrf.</p>
 
     <p>TTD Patch should work on Windows Vista as well, provided you have a <a href="http://nightly.ttdpatch.net/latest/">recent enough version</a> (grab the file called TTDPatch-nightly-rXXXX-win32.zip), which you may need to download yourself.</p>
 
-<h1>Problems? Suggestions?</h1>
+<h2>Problems? Suggestions?</h2>
 
     <p>Not working? Cryptic error messages? Turned your default language into swahili? Unfortunately, there is nobody actively fixing bugs, but you can try asking for help.</p>
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pages/spbot.html	Mon Jun 15 02:42:23 2009 +0300
@@ -0,0 +1,8 @@
+<h1>SpBot</h1>
+
+<p>SpBot is an IRC bot that performs logging activity for <a href="http://irclogs.qmsk.net/">irclogs.qmsk.net</a>.</p>
+
+<p>To see the list of networks/channels that it inhabits, see the above URL.</p>
+
+<p>For abuse/etc, contact spbot@qmsk.net.</p>
+
--- a/static/style.css	Mon Jun 15 01:44:05 2009 +0300
+++ b/static/style.css	Mon Jun 15 02:42:23 2009 +0300
@@ -142,11 +142,26 @@
 }
 
 h1 {
-    font-size: x-large;
+    font-size: xx-large;
+
+    text-align: center;
 }
 
 h2 {
     font-size: large;
+    
+    margin-left: 0px;
+    padding: 5px;
+    width: 100%;
+
+    background-color: #e5e5e5;
+    
+    border: 1px dashed #c5c5c5;
+}
+
+h3 {
+    font-size: medium;
+    font-style: italic;
 }
 
 div#content p {
@@ -163,3 +178,18 @@
     background: transparent url(/static/link.png) no-repeat center right;
 }
 
+dt {
+    font-size: large;
+}
+
+dd {
+    margin: 1em auto 1em 5em;
+}
+
+code {
+    display: block;
+    margin: 8px;
+    padding: 8px;
+
+    border: 1px dotted #b5b5b5;
+}