aboutsummaryrefslogtreecommitdiff
path: root/content/posts/2004-01-11-gallery-on-paulduncan-org.html
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2021-10-14 12:47:50 -0400
committerPaul Duncan <pabs@pablotron.org>2021-10-14 12:47:50 -0400
commit4b6c0e31385f5f27a151088c0a2b614495c4e589 (patch)
tree12243cdcd00704bc1a9d94ac9cc128459417370c /content/posts/2004-01-11-gallery-on-paulduncan-org.html
downloadpablotron.org-4b6c0e31385f5f27a151088c0a2b614495c4e589.tar.bz2
pablotron.org-4b6c0e31385f5f27a151088c0a2b614495c4e589.zip
initial commit, including theme
Diffstat (limited to 'content/posts/2004-01-11-gallery-on-paulduncan-org.html')
-rw-r--r--content/posts/2004-01-11-gallery-on-paulduncan-org.html47
1 files changed, 47 insertions, 0 deletions
diff --git a/content/posts/2004-01-11-gallery-on-paulduncan-org.html b/content/posts/2004-01-11-gallery-on-paulduncan-org.html
new file mode 100644
index 0000000..14aebad
--- /dev/null
+++ b/content/posts/2004-01-11-gallery-on-paulduncan-org.html
@@ -0,0 +1,47 @@
+---
+date: "2004-01-11T23:43:33Z"
+title: Gallery on paulduncan.org
+---
+
+<p>
+I finally finished the <a href='http://www.paulduncan.org/gallery/'>new gallery page</a> on <a href='http://www.paulduncan.org/'><code>paulduncan.org</code></a>. Rather than port the <a href='/gallery/'>Pablotron Gallery</a> directly, I decided to start from scratch and see if I could do it better the second time around. I also had a bunch of pictures at home to work with and some slightly different requirements. All my camera pictures at home are in <code>/store/camera</code>, but I wanted to split the files up by gallery on the server-side. Also, I wanted a straightforward way to edit captions. Above all, I wanted the entire setup to be simple to maintain.
+</p>
+
+<p>
+Well, I think I've managed to accomplish all that. At home, I'm using the new caption mode in <a href='http://www.linuxbrit.co.uk/feh/'>feh</a> to caption images, and the server-side gallery code recognizes feh captions. A single config file, <code>galleries.yaml</code>, tells the web interface and gallery generating script the title, path, description and images associated with each gallery. The server-side gallery generation script reads <code>galleries.yaml</code>, creates the gallery directory structure, and populates it with symlinks to an <code><a href='http://rsync.samba.org/'>rsync</a></code>ed copy of the camera directory. At home, <code>camera_update.sh</code> generates thumbnails (via <a href='http://www.imagemagick.org/'>ImageMagick</a>) and rsyncs the camera directory to <code>kylie</code>.
+</p>
+
+<p>
+So, to create a new gallery, I do the following:
+</p>
+
+<ol>
+<li>Add the images to <code>/store/camera</code></li>
+<li>Caption the images with <code>feh -T camera</code></li>
+<li>Run <code>camera_update.sh</code></li>
+<li>Add the description to <code>galleries.yaml</code></li>
+<li>Run <code>generate_galleries.rb</code></li>
+</ol>
+
+<p>
+Note that I already put the pictures in <code>/store/camera</code>. And they have to captioned, scaled, and uploaded somehow. So steps 1, 2, and 3 are effectively <abbr title='No/Null Operation'>NOOPs</abbr>. That said, I'm trying to think of ways to make this process even dumber. I could <code>cron</code> the camera update and rsync process; that way thumbnails and data transfer are taken care of automatically. Thoughts, anyone?
+</p>
+
+<p>
+Oh yeah, if you want any of this code, let me know and I'll post it.
+It's written with my setup in mind, but you might be able to salvage or
+modify it for your setup. Here's the first review of the code:
+</p>
+
+<pre>
+17:52 &lt;<a href='http://www.linuxbrit.co.uk/'>giblet</a>&gt; dammit, that's cool
+17:53 &lt;<a href='http://www.linuxbrit.co.uk/'>giblet</a>&gt; well I'm pissed off now :D
+17:53 &lt;pabs&gt; alright!
+17:53 &lt;<a href='http://www.linuxbrit.co.uk/'>giblet</a>&gt; cos I can't do that without copying images :D
+17:53 &lt;pabs&gt; just call me master of symlinks
+17:53 &lt;pabs&gt; pabs@kylie:~/paulduncan.org/gallery&gt; du -sh .
+17:53 &lt;pabs&gt; 496K .
+17:54 &lt;<a href='http://www.linuxbrit.co.uk/'>giblet</a>&gt; hehehe
+17:54 &lt;<a href='http://www.linuxbrit.co.uk/'>giblet</a>&gt; I should've thought of that :)
+</pre>
+