IMG

IMG is a simple image stream generated using mk(1).

TODO:

Using it

One time-setup:

  1. Satisfy the prerequisites.
  2. Stick the mkfile in a directory your web server can get at.
  3. Create files "_header" and "_footer" with whatever you like.
    The header should start with something like "<html>" or whatnot, and must end with a line containing exactly and only the string "<!--End header-->". The footer, similarly, must begin with a line containing exactly and only the string "<!--Begin footer-->", and should end the document with something like a "</html>". Mine are very simple and you can use them as examples for both header and footer, but you are free to use them to implement navigation, a sidebar, include javascript, whatever.
  4. If you want to use the JSON or Atom feeds, you'll want _atomhead and _jsonhead. Change the strings in there to make sense for your installation.
  5. Optionally, add an entry in cron to run "mk" in this directory.
    In case you forget to run it yourself after making changes or creating a new entry. I run it every 10 minutes.

To create an entry:

  1. Create an image file with a recognized extension.
    We recognize the extensions jpeg, jpg, gif, and png.
  2. Optionally, add alt text (highly encouraged) and/or a caption.
    Create a test file with the same name as the image, plus ".alt" for the alt text and ".caption" for the caption.
  3. Run 'mk' (optional if you created the 'cron' entry)..
    This will add any new image file names to _timestamps if this is the first time we're seeing it, and then regenerate "index", "index.html", "index.atom", and "feed.json", as needed.

Other notes

Prerequisites:

On Plan 9:

You'll need my datefmt and statprograms.

On unix:

(This is expected to work but is completely untested.)
You'll need Plan 9 from User Space installed, and in your $path or $PATH before the normal unix tools.
You'll also need datefmt and stat, like above.

Reserved words/patterns:

Notes:


Inspired by the version at Texto-Plano.