#include "handler.ih"

void Handler::inspectMetadata()
{
    ifstream meta("metadata.txt");      // is available, checked by zipCheck

    system("ls -Fla > /tmp/list");

    string line;
    string handler{"Handler: "};

    while (getline(meta, line))
    {
        assign(&d_set,      "^\\s*Set:\\s+", line)           or
        assign(&d_author,   "^\\s*Author(s?):\\s+", line)    or
        assign(&d_rater,      "^\\s*Rater:\\s+", line);
    }

    if (d_set.empty() or d_author.empty())
        throw Exception{REPLY} << "metadata.txt without Set: and "
                            "Author(s): specifications";

    d_author = "Author(s): " + d_author;

    setRaterInfo();
}







