Notes about the site
====================

This site is generated from non-HTML source files using a combination of technologies.  Most specifically, the pipeline employed is from `N3`_ sources using `cwm`_ into basic XML, which is they converted via a stylesheet into the HTML you're viewing.  For more literally-written pages such as this one, `reStructuredText`_ markup is used.

.. _`N3`: http://www.w3.org/2000/10/swap/doc/
.. _`cwm`: http://www.w3.org/2000/10/swap/doc/cwm
.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html

Of particular interest is the generation of the recipes index, which uses the inference engine of cwm to do basically data-filtering to get very specific XML used as input to a stylesheet which can then generate the index itself.

--------------------------------------------------

The following are requirements-like notes taken while undertaking this effort:

- one file per recipes + instances

  - makes dependencies easier to interpret

  - also means one source-file per output file

- pipeline: rdf -cwm-> xml -xslt-> html

  - xslt should be dead-simple

  - intermediate XML format?

    - no. The `--rdf` output of `cwm` is good enough for us.

- change-detection?

  - none in the first go-round

  - a meta-instance of the same process to record changes, convert to rss?

Todo
----

- site creation

  - ingredient-overrides/changes in ``hb:BrewInstance``.

  - Add CC/other licensing output to recipe.xslt

  - Multiple ingredient-variation support

  - time/author-stamp generated content

  - navigation, framing.

  - listing

- Homebrew Ont

  - add resources backing the minted namespace URIs

  - ``hb:derivation`` sub-ont

  - ``hb:note`` formatting/typing

  - implied time on journal entries

  - add style/typing/classification (+ generation)

--------------------------------------------------

Thinking out loud about a templating language for the data...::

  <html>
   <body>
     [hb:Recipe...
       <h1>[rdf:label]</h1>
       Author: [foaf:maker]
       Date: [dc:created]
  
       <h2>Ingredients</h2>
       [hb:ingredient *...
         [:"standard"
           [hb:amt.rdf:value] [hb:amt.hb:units.rdf:label] [rdf:label]
         ]
         [:"hops"
           [rdf:type.rdf:label] [hb:amt.rdf:value] [hb:amt.hb:units.rdf:label] @ [hb:hopTime.rdf:value] [hb:hopTime.hb:units.rdf:label]
         ]
         - [hb:Grain... sort hb:volume,desc rdf:label,desc,alpha @standard ...]
         - [hb:Hop... sort hb:volume,desc @hops ...]
         - [hb:Adjunct... sort rdf:label,desc @standard ...]
         - [hb:<remainder>... sort rdf:label,desc @standard ...]
         - [hb:Yeast... sort rdf:label,desc @standard ...]
       ...]
  
       <h2>Notes</h2>
       [hb:notes...
       - [dc:created]: [rdf:label]
       ...]
     ...]
     
     <h1>Instances</h1>
  
     [hb:BrewInstance...
     <h2>Jan 27th, 2005</h2>
     Who: [author]
     <h3>Instruction deviations</h3>
     - [notes]
     <h3>Journal</h3>
       - [date; group by day]:
         - [specific notes: {gravity readings}]
         - [general notes]
       - [date; group by day]:
         - [note]

Links
-----

Links of interested while working through all this:

- xslt

  - http://www.w3.org/TR/xslt

- rdf pathing/templating

  - http://swig.xmlhack.com/2005/09/04/2005-09-04.html#1125841668.041319

- cwm

  - http://www.w3.org/2000/10/swap/doc/CwmBuiltins.html

    - http://www.w3.org/2000/10/swap/doc/Built-In

  - http://infomesh.net/2001/cwm/

- rst

  - http://docutils.sourceforge.net/rst.html

    - http://docutils.sourceforge.net/docs/ref/rst/directives.html


------------------------------------------------------------

authored: `jsled`_, 2005-08-31

.. _`jsled`: http://asynchronous.org/jsled
