From a97fba4d5c2a6b6007d145ba8af95b4e6fab9219 Mon Sep 17 00:00:00 2001 From: Jeremy Paul Whiting Date: Sat, 17 Nov 2007 14:07:33 +0000 Subject: [PATCH] make converter take a -f parameter so it can convert to kvtml1 files (-f kvtml1) svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=737963 --- keduvocdocument/tests/converter.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/keduvocdocument/tests/converter.cpp b/keduvocdocument/tests/converter.cpp index 2d33603..79cf509 100644 --- a/keduvocdocument/tests/converter.cpp +++ b/keduvocdocument/tests/converter.cpp @@ -36,8 +36,9 @@ int main( int argc, char ** argv ) { - KAboutData about( "converter", 0, ki18n( "Converter" ), "0.1", ki18n( "kvtml file converter" ), KAboutData::License_GPL, ki18n( "© 2007 Jeremy Whiting" ) ); + KAboutData about( "kvtml-converter", 0, ki18n( "Kvtml-Converter" ), "0.1", ki18n( "kvtml file converter" ), KAboutData::License_GPL, ki18n( "© 2007 Jeremy Whiting" ) ); KCmdLineOptions options; + options.add( "f "); options.add( "+infile" ); options.add( "+outfile" ); @@ -55,7 +56,14 @@ int main( int argc, char ** argv ) kDebug() << "Reading " << infile; document.open( infile ); kDebug() << "Writing to " << outfile; - document.saveAs( outfile, KEduVocDocument::Kvtml, "converter" ); + if (arguments->getOption("f") == "kvtml1") + { + document.saveAs( outfile, KEduVocDocument::Kvtml1, "converter" ); + } + else + { + document.saveAs( outfile, KEduVocDocument::Kvtml, "converter" ); + } } } -- 2.47.3