From 4b6c0e31385f5f27a151088c0a2b614495c4e589 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Thu, 14 Oct 2021 12:47:50 -0400 Subject: initial commit, including theme --- .../2004-01-11-gallery-on-paulduncan-org.html | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 content/posts/2004-01-11-gallery-on-paulduncan-org.html (limited to 'content/posts/2004-01-11-gallery-on-paulduncan-org.html') 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 +--- + +

+I finally finished the new gallery page on paulduncan.org. Rather than port the Pablotron Gallery 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 /store/camera, 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. +

+ +

+Well, I think I've managed to accomplish all that. At home, I'm using the new caption mode in feh to caption images, and the server-side gallery code recognizes feh captions. A single config file, galleries.yaml, 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 galleries.yaml, creates the gallery directory structure, and populates it with symlinks to an rsynced copy of the camera directory. At home, camera_update.sh generates thumbnails (via ImageMagick) and rsyncs the camera directory to kylie. +

+ +

+So, to create a new gallery, I do the following: +

+ +
    +
  1. Add the images to /store/camera
  2. +
  3. Caption the images with feh -T camera
  4. +
  5. Run camera_update.sh
  6. +
  7. Add the description to galleries.yaml
  8. +
  9. Run generate_galleries.rb
  10. +
+ +

+Note that I already put the pictures in /store/camera. And they have to captioned, scaled, and uploaded somehow. So steps 1, 2, and 3 are effectively NOOPs. That said, I'm trying to think of ways to make this process even dumber. I could cron the camera update and rsync process; that way thumbnails and data transfer are taken care of automatically. Thoughts, anyone? +

+ +

+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: +

+ +
+17:52 <giblet> dammit, that's cool
+17:53 <giblet> well I'm pissed off now :D
+17:53 <pabs> alright!
+17:53 <giblet> cos I can't do that without copying images :D
+17:53 <pabs> just call me master of symlinks
+17:53 <pabs> pabs@kylie:~/paulduncan.org/gallery> du -sh .
+17:53 <pabs> 496K    .
+17:54 <giblet> hehehe
+17:54 <giblet> I should've thought of that :)
+
+ -- cgit v1.2.3