CLI: Export database as CSV

* Changed `Extract` to `Export` to support additional formats
* Allow database expot as CSV.  Added a `--format` option to the `Export` command for that, which defaults to xml, so the current behavior is unchanged.
*The `CsvExporter` had to be refactored a bit, but nothing major. It can
now print to a file or return a string.
This commit is contained in:
louib 2019-06-16 21:33:13 -04:00 committed by Jonathan White
parent 547c246e88
commit 77fcde875e
11 changed files with 157 additions and 89 deletions

View file

@ -29,7 +29,7 @@
#include "Diceware.h"
#include "Edit.h"
#include "Estimate.h"
#include "Extract.h"
#include "Export.h"
#include "Generate.h"
#include "List.h"
#include "Locate.h"
@ -114,7 +114,7 @@ void populateCommands()
commands.insert(QString("diceware"), new Diceware());
commands.insert(QString("edit"), new Edit());
commands.insert(QString("estimate"), new Estimate());
commands.insert(QString("extract"), new Extract());
commands.insert(QString("export"), new Export());
commands.insert(QString("generate"), new Generate());
commands.insert(QString("locate"), new Locate());
commands.insert(QString("ls"), new List());