Add Patches/<package>/README.rst files

Add a README.rst to each package directory to document its purpose and
reference the top-level README.rst file.  This will aid users that
arrive in a repository browser through a link pointing directly at a
package directory.

Use the following shell code to create the files from Packages.csv:

tail -n +2 Packages.csv |
egrep '^[^,]+' |
while IFS=, read pkg dir _; do
  mkdir -p "Packages/$dir" &&
  hdr="VistA: $pkg"
  line="$(echo "$hdr"|sed 's/./=/g')" &&
  echo >"Packages/$dir/README.rst" \
"$line
$hdr
$line"'

This directory facilitates development and distribution of a VistA package.

See `<../../README.rst>`__ for more information.

-------
Patches
-------

The `<Patches>`__ directory contains patch host files for the package
organized into subdirectories named for each patch.'
done
Add Patches/<package>/Patches/README.rst files

Add a README.rst to each package Patches directory to document its
purpose and reference the package README.rst file.  This will aid users
that arrive in a repository browser through a link pointing directly at
a package Patches directory.

Use the following shell code to create the files from Packages.csv:

tail -n +2 Packages.csv |
egrep '^[^,]+' |
while IFS=, read pkg dir _; do
  mkdir -p "Packages/$dir/Patches" &&
  hdr="VistA Patches: $pkg"
  line="$(echo "$hdr"|sed 's/./=/g')" &&
  echo >"Packages/$dir/Patches/README.rst" \
"$line
$hdr
$line"'

This directory contains patch host files for a VistA package.
The files are organized into subdirectories named for each patch.

See `<../README.rst>`__ for package details.'
done
Packages.csv: Add column for VistA Document Library App Id

The VistA Document Library at http://www.va.gov/vdl identifies packages
with an integer "appid" and publishes documentation at URLs of the form

 http://www.va.gov/vdl/application.asp?appid=$appid

Add a column to Packages.csv called "VDL ID" to hold the appid for each
package.
Packages.csv: Fill in VDL ID column for known packages

Add the VDL appid for each package whose VDL page is known.
Add VDL links to Patches/<package>/README.rst files

Add a Documentation section to every package README.rst file to link to
its VistA Document Library page.

Use the following shell code:

tail -n +2 Packages.csv |
egrep '^[^,]+' |
while IFS=, read pkg dir _ _ _ _ vdl; do
  if test -n "$vdl"; then
    sed -i '/^---*$/ {h;d} # hold section header lines for next cycle
/^Patches$/ {# If this was preceded by a header line, prepend our section.
x;/^---*$/i\
-------------\
Documentation\
-------------\
\
Documentation for this package is available in the `VistA Document Library`_.\
\
.. _`VistA Document Library`: http://www.va.gov/vdl/application.asp?appid='"$vdl"'\

;x}
{x;/./{p;s/.*//};x} # dump any held lines
' "Packages/$dir/README.rst"
  fi
done
Dox: Read Packages.csv from this source tree

We no longer need to read it from the VistA-FOIA checkout.  Also remove
PackagesToVDL.csv and read the VDL ID from Packages.csv instead.  While
at it, refactor argument parsing.
Merge branch 'add-patches'

* add-patches:
  Move patches from FOIA/ to populate Packages/
  Prepare to organize Feb 2013 FOIA patch files
  Add VA VistA FOIA patches from most of Feb 2013
  Move patches from FOIA/ to populate Packages/
  Prepare to organize Dec 2012 and Jan 2013 FOIA patch files
  Add VA VistA FOIA patches from Dec 2012 to Jan 2013
  Add custom intaller for patches XU*8.0*599 and PXRM*2.0*27
  Move patches from FOIA/ to populate Packages/
  Remove VA VistA FOIA patch files that we do not need
  Add VA VistA FOIA patches from Nov 2012 to part of Dec 2012
  Move patches from FOIA/ to populate Packages/
  Remove VA VistA FOIA patch files that we do not need
  Add VA VistA FOIA patches from Jan 2011 to Oct 2012
VA Gold Disk: Document Increment 1 Products and Routines

Add a "VA Gold Disk" section to Patches/<package>/README.rst for each
package standardized at US DVA sites reported to OSEHRA as Increment 1:

 From: Charles Allard <Charles.Allard2@va.gov>
 Date: 2013-02-19 09:13:59 EST
 ...
 The checksums will correspond to the checksums as they would have been
 on September 26th 2012.
 ...

Report the gold patch level and routine checksums.