#include <odsstream/tsvdirectorywriter.h>
#include <odsstream/tsvoutputstream.h>
#include <QDebug>
#include <iostream>

using namespace std;

int main(int argc, char **argv) {

    //file.open(QIODevice::WriteOnly);
    TsvDirectoryWriter writer(QDir("test"));

    QString test("truc");

    writer.writeSheet("classeur");
    writer.setCellAnnotation("test annot");
    writer.writeCell(test);
    writer.writeLine();
    writer.writeEmptyCell();
    writer.writeCell("coucou");
    bool vf(0);
    writer.writeCell(vf);
    writer.writeCellPercentage(0.23565654545);
   

    writer.writeSheet("classeur2");
    writer.setCellAnnotation("test annot");
    writer.writeCell(test);
    writer.writeLine();
    writer.writeEmptyCell();
    writer.writeCell("coucou");

    QDateTime currentdate (QDateTime::currentDateTime());

    writer.writeCell(currentdate);

    writer.close();

    QTextStream terminalOut(stdout, QIODevice::WriteOnly);
    TsvOutputStream writero(terminalOut);


    writero.writeSheet("classeur");
    writero.writeCell(test);
    writero.writeLine();
    writero.writeEmptyCell();
    writero.setCellAnnotation("ne sera pas prise en compte en TSV");
    writero.writeCell("coucou");
    writero.writeCell(vf);


    writero.writeCell(currentdate);

    writero.close();

    //SUCCESS
    return 0;
}
