]> Git trees. - libqmvoc.git/commitdiff
make converter take a -f parameter so it can convert to kvtml1 files (-f kvtml1)
authorJeremy Paul Whiting <jpwhiting@kde.org>
Sat, 17 Nov 2007 14:07:33 +0000 (14:07 +0000)
committerJeremy Paul Whiting <jpwhiting@kde.org>
Sat, 17 Nov 2007 14:07:33 +0000 (14:07 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=737963

keduvocdocument/tests/converter.cpp

index 2d3360318a2653db16adefc6d49c285490d7cb58..79cf509928210c9a906a3c24859d6d0cd3524d29 100644 (file)
@@ -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( "Ã\82© 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 <format>");
     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" );
+            }
         }
     }