<appendix xmlns="http://docbook.org/ns/docbook" xml:id="appendix.filepath_wildcards">
  <title>Filepath Wildcards</title>
  <para>
    Filepath wildcards can be used in most places in RDAdmin where a filename
    is required.
  </para>
  <sect1 xml:id="sect.filepath_wildcards.definition">
    <title>Definition</title>
    <para>
      A date/time wildcard in Rivendell has the following form:
    </para>
    <para>
      <userinput>%<replaceable>&lt;delta-secs&gt;</replaceable><replaceable>&lt;meta-char&gt;</replaceable><replaceable>&lt;fmt-char&gt;</replaceable></userinput>
    </para>
    <para>
      where:
    </para>
    <variablelist>
      <varlistentry>
	<term><userinput>%</userinput></term>
	<listitem>
	  <para>
	    A literal percent.
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput><replaceable>&lt;delta-secs&gt;</replaceable></userinput></term>
	<listitem>
	  <para>
	    Optional. A time offset, in seconds, to apply to the base date-time
	    (normally, the current wall time). Default value is
	    <userinput>0</userinput>.
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput><replaceable>&lt;meta-char&gt;</replaceable></userinput></term>
	<listitem>
	  <para>
	    Optional. One of the following meta-characters:
	  </para>
	  <variablelist>
	    <varlistentry>
	      <term><userinput>^</userinput></term>
	      <listitem>
		<para>
		  Convert value indicated by <userinput><replaceable>&lt;fmt-char&gt;</replaceable></userinput>
		  to all uppercase.
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>$</userinput></term>
	      <listitem>
		<para>
		  Convert the initial character of the value indicated by
		  <userinput><replaceable>&lt;fmt-char&gt;</replaceable></userinput> to uppercase.
		</para>
	      </listitem>
	    </varlistentry>
	  </variablelist>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput><replaceable>&lt;fmt-char&gt;</replaceable></userinput></term>
	<listitem>
	  <para>
	    One of the following letters:
	  </para>
	  <variablelist>
	    <varlistentry>
	      <term><userinput>a</userinput></term>
	      <listitem>
		<para>
		  Abbreviated weekday name --e.g. 'mon', 'tue'
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>A</userinput></term>
	      <listitem>
		<para>
		  Full weekday name --e.g. 'monday', 'tuesday'
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>b</userinput></term>
	      <listitem>
		<para>
		  Abbreviated month name --e.g. 'jan', 'feb'
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>B</userinput></term>
	      <listitem>
		<para>
		  Full month name --e.g. 'january', 'february'
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>c</userinput></term>
	      <listitem>
		<para>
		  [unassigned]
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>C</userinput></term>
	      <listitem>
		<para>
		  Century
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>d</userinput></term>
	      <listitem>
		<para>
		  Day of the month, zero padded (01 - 31)
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>D</userinput></term>
	      <listitem>
		<para>
		  Date (mm-dd-yy)
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>e</userinput></term>
	      <listitem>
		<para>
		  Day of the month, space padded ( 1 - 12)
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>E</userinput></term>
	      <listitem>
		<para>
		  Day of the month, unpadded (1 - 12)
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>f</userinput></term>
	      <listitem>
		<para>
		  [unassigned]
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>F</userinput></term>
	      <listitem>
		<para>
		  Date (yyyy-mm-dd)
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>g</userinput></term>
	      <listitem>
		<para>
		  Two digit year, as per ISO 8601
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>G</userinput></term>
	      <listitem>
		<para>
		  Four digit year, as per ISO 8601
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>h</userinput></term>
	      <listitem>
		<para>
		  Abbreviated month name --e.g. 'jan', 'feb'
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>H</userinput></term>
	      <listitem>
		<para>
		  Hour, 24 hour, zero padded (00 - 23)
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>i</userinput></term>
	      <listitem>
		<para>
		  Hour, 12 hour, space padded ( 0 - 12)
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>I</userinput></term>
	      <listitem>
		<para>
		  Hour, 12 hour, zero padded (00 - 12)
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>j</userinput></term>
	      <listitem>
		<para>
		  Day of year, zero padded (000 - 355)
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>J</userinput></term>
	      <listitem>
		<para>
		  Hour, 12 hour, unpadded (1 - 12)
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>k</userinput></term>
	      <listitem>
		<para>
		  Hour, 24 hour, space padded ( 0 - 23)
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>K</userinput></term>
	      <listitem>
		<para>
		  [unassigned]
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>l</userinput></term>
	      <listitem>
		<para>
		  Month, unpadded (1-12)
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>L</userinput></term>
	      <listitem>
		<para>
		  [unassigned]
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>m</userinput></term>
	      <listitem>
		<para>
		  Month, zero padded (01 - 12)
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>M</userinput></term>
	      <listitem>
		<para>
		  Minute, zero padded (00 - 59)
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>n</userinput></term>
	      <listitem>
		<para>
		  [unassigned]
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>N</userinput></term>
	      <listitem>
		<para>
		  [unassigned]
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>o</userinput></term>
	      <listitem>
		<para>
		  [unassigned]
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>O</userinput></term>
	      <listitem>
		<para>
		  [unassigned]
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>p</userinput></term>
	      <listitem>
		<para>
		  AM/PM string
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>P</userinput></term>
	      <listitem>
		<para>
		  [unassigned]
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>q</userinput></term>
	      <listitem>
		<para>
		  [unassigned]
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>Q</userinput></term>
	      <listitem>
		<para>
		  [unassigned]
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>r</userinput></term>
	      <listitem>
		<para>
		  Rivendell Host Name [not FQDN]
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>R</userinput></term>
	      <listitem>
		<para>
		  Rivendell Host Short Name
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>s</userinput></term>
	      <listitem>
		<para>
		  Service Name
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>S</userinput></term>
	      <listitem>
		<para>
		  Seconds, zero padded (00 - 60)
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>t</userinput></term>
	      <listitem>
		<para>
		  [unassigned]
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>T</userinput></term>
	      <listitem>
		<para>
		  [unassigned]
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>u</userinput></term>
	      <listitem>
		<para>
		  Day of the week, numeric, 1=Monday, 7=Sunday
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>U</userinput></term>
	      <listitem>
		<para>
		  [unassigned]
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>v</userinput></term>
	      <listitem>
		<para>
		  [unassigned]
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>V</userinput></term>
	      <listitem>
		<para>
		  Week number, as per ISO 8601
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>w</userinput></term>
	      <listitem>
		<para>
		  Day of the week, numeric, 0=Sunday,6=Saturday
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>W</userinput></term>
	      <listitem>
		<para>
		  Week number, as per ISO 8601
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>x</userinput></term>
	      <listitem>
		<para>
		  [unassigned]
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>X</userinput></term>
	      <listitem>
		<para>
		  [unassigned]
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>y</userinput></term>
	      <listitem>
		<para>
		  Two digit year
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>Y</userinput></term>
	      <listitem>
		<para>
		  Four digit year
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>z</userinput></term>
	      <listitem>
		<para>
		  [unassigned]
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>Z</userinput></term>
	      <listitem>
		<para>
		  [unassigned]
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><userinput>%</userinput></term>
	      <listitem>
		<para>
		  A literal '%'
		</para>
	      </listitem>
	    </varlistentry>
	  </variablelist>
	</listitem>
      </varlistentry>
    </variablelist>
  </sect1>
  <sect1 xml:id="sect.filepath_wildcards.examples">
    <title>Examples</title>
    <para>
      For the date time of February 3rd, 2017 at 2:34:26 PM:
    </para>
    <variablelist>
      <varlistentry>
	<term><userinput>%b</userinput></term>
	<listitem>
	  <para>
	    <code>feb</code>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>%B</userinput></term>
	<listitem>
	  <para>
	    <code>february</code>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>%^B</userinput></term>
	<listitem>
	  <para>
	    <code>FEBRUARY</code>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>%$B</userinput></term>
	<listitem>
	  <para>
	    <code>February</code>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>%A</userinput></term>
	<listitem>
	  <para>
	    <code>friday</code>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>%86400A</userinput></term>
	<listitem>
	  <para>
	    <code>saturday</code>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>%-86400A</userinput></term>
	<listitem>
	  <para>
	    <code>thursday</code>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>%a</userinput></term>
	<listitem>
	  <para>
	    <code>fri</code>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>%u</userinput></term>
	<listitem>
	  <para>
	    <code>5</code>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>%D</userinput></term>
	<listitem>
	  <para>
	    <code>02-03-17</code>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>%j</userinput></term>
	<listitem>
	  <para>
	    <code>034</code>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>%H:%M:%S</userinput></term>
	<listitem>
	  <para>
	    <code>14:34:26</code>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>%3600H:%3600M:%3600S</userinput></term>
	<listitem>
	  <para>
	    <code>15:34:26</code>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>%1800H:%1800M:%1800S</userinput></term>
	<listitem>
	  <para>
	    <code>15:04:26</code>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>%-1800H:%-1800M:%-1800S</userinput></term>
	<listitem>
	  <para>
	    <code>14:04:26</code>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>%m/%d/%Y - %H:%M:%S</userinput></term>
	<listitem>
	  <para>
	    <code>02/03/2017 - 14:34:26</code>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>%m/%d/%Y - %I:%M:%S %p</userinput></term>
	<listitem>
	  <para>
	    <code>02/03/2017 - 02:34:26 PM</code>
	  </para>
	</listitem>
      </varlistentry>
    </variablelist>
  </sect1>
</appendix>
