marble
#include <QCoreApplication>
#include <QString>
#include <QDebug>
#include <QFileInfo>
#include <QDir>
#include <QVariant>
#include <QTemporaryFile>
#include <QProcess>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlError>
Go to the source code of this file.
Functions | |
void | convertToMarbleFormat (const QString &input, const QString &output) |
void | convertToNewStuffFormat (const QString &input, const QString &output) |
void | convertToTomTomFormat (const QString &input, const QString &output, const QString &nick, const QString &simpleNick, int index, bool male, const QString &lang) |
void | createLegalFiles (const QString &directory, const QString &name, const QString &email) |
void | extract (const QString &zip, const QString &output) |
int | main (int argc, char *argv[]) |
QStringList | marbleFiles () |
void | normalize (const QString &output) |
int | process (const QDir &input, const QDir &output, const QString &xml) |
QStringList | tomTomFiles () |
void | usage (const QString &application) |
Function Documentation
void convertToMarbleFormat | ( | const QString & | input, |
const QString & | output | ||
) |
Definition at line 188 of file tools/speaker-files/main.cpp.
void convertToNewStuffFormat | ( | const QString & | input, |
const QString & | output | ||
) |
Definition at line 172 of file tools/speaker-files/main.cpp.
void convertToTomTomFormat | ( | const QString & | input, |
const QString & | output, | ||
const QString & | nick, | ||
const QString & | simpleNick, | ||
int | index, | ||
bool | male, | ||
const QString & | lang | ||
) |
- Todo:
- : flag, language index
Definition at line 204 of file tools/speaker-files/main.cpp.
void createLegalFiles | ( | const QString & | directory, |
const QString & | name, | ||
const QString & | |||
) |
Definition at line 143 of file tools/speaker-files/main.cpp.
void extract | ( | const QString & | zip, |
const QString & | output | ||
) |
Definition at line 130 of file tools/speaker-files/main.cpp.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 318 of file tools/speaker-files/main.cpp.
QStringList marbleFiles | ( | ) |
Definition at line 114 of file tools/speaker-files/main.cpp.
void normalize | ( | const QString & | output | ) |
Definition at line 135 of file tools/speaker-files/main.cpp.
int process | ( | const QDir & | input, |
const QDir & | output, | ||
const QString & | xml | ||
) |
Definition at line 242 of file tools/speaker-files/main.cpp.
QStringList tomTomFiles | ( | ) |
Takes an .sqlite database with metadata about voice guidance speakers and associated .zip files containing 64.ogg files and produces four files for each speaker:
- a .tar.gz to be used by KDE Marble via a GHNS dialog
- a .zip to be downloaded by Marble users via edu.kde.org
- a .zip to be downloaded by TomTom users via edu.kde.org
- an .ogg speaker preview file The archives contain the speaker files and some additional stuff (license, authors, ...)
The structure of the .sqlite database is expected as follows: One table called speakers with the following layout:
- id PRIMARY KEY
- name, email, nickname, gender, language, description, token VARCHAR
- created DATETIME Additionally, the field gender is expected to be either "male" or "female" and language to have the format "NAME (langcode)"
Also creates a knewstuff .xml file with the metadata.
Some processing is done by calling other tools, namely tar, unzip, zip, vorbisgain, viftool. Make sure they're found in $PATH
Definition at line 49 of file tools/speaker-files/main.cpp.
void usage | ( | const QString & | application | ) |
Definition at line 125 of file tools/speaker-files/main.cpp.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.