summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
blob: 8beedaae55eff339f44d9657eba178bde8fbfd36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75


#include "soundkonverterapp.h"

#include "tplugins.h"

#include <tdeaboutdata.h>
#include <tdecmdlineargs.h>
#include <klocale.h>

static const char description[] =
    I18N_NOOP("soundKonverter is a frontend to various audio converters, Replay Gain tools and CD rippers.\n\nPlease file bug reports at https://bugs.launchpad.net/ubuntu/+source/soundkonverter\nor simply send me a mail to [email protected]");

static const char version[] = "0.3.8";

static TDECmdLineOptions options[] =
{
    { "replaygain", I18N_NOOP("Open the Replay Gain tool an add all given files"), 0 },
//     { "repair", I18N_NOOP("Open the repair files tool an add all given files"), 0 },
    { "rip <device>", I18N_NOOP("List all tracks on the cd drive <device>, 'auto' will search for a cd"), 0 },
    { "profile <profile>", I18N_NOOP("Add all files using the given profile"), 0 },
    { "format <format>", I18N_NOOP("Add all files using the given format"), 0 },
    { "output <directory>", I18N_NOOP("Output all files to <directory>"), 0 },
    { "invisible", I18N_NOOP("Start soundKonverter invisible"), 0 },
    { "autoclose", I18N_NOOP("Close soundKonverter after all files are converted (enabled when using '--invisible')"), 0 },
    { "command <command>", I18N_NOOP("Execute <command> after each file has been converted"), 0 },
    { "+[files]", I18N_NOOP("Audio file(s) to append to the file list"), 0 },
    TDECmdLineLastOption
};

int main(int argc, char **argv)
{
    TDEAboutData about("soundkonverter", I18N_NOOP("soundKonverter"), version, description,
        TDEAboutData::License_GPL, "(C) 2008 Daniel Faust", 0, 0, "[email protected]");
    about.addAuthor( "Daniel Faust", 0, "[email protected]" );
    about.addCredit( "David Vignoni", "Nuvola icon theme", 0, "http://www.icon-king.com" );
    about.addCredit( "Scott Wheeler", "TagLib", "[email protected]", "http://ktown.kde.org/~wheeler" );
    about.addCredit( "Amarok developers", "Amarok", 0, "http://amarok.kde.org" );
    about.addCredit( "Kaffeine developers", "Kaffeine", 0, "http://kaffeine.sourceforge.net" );
    about.addCredit( "All programmers of audioconverters", "Backends" );
    TDECmdLineArgs::init(argc, argv, &about);
    TDECmdLineArgs::addCmdLineOptions( options );

    soundKonverterApp::addCmdLineOptions();
    if( !soundKonverterApp::start() ) {
        return 0;
    }

    soundKonverterApp app;

    registerTaglibPlugins();

    // mainWin has WDestructiveClose flag by default, so it will delete itself.
    return app.exec();
}

/*
methods and files to update:
outputdirectory.cpp: vfatPath( const TQString& path )
metadata/
cddb.cpp, cddb.h
cdmanager.cpp, cdmanager.h


audio/x-musepack;application/x-musepack;audio/musepack;application/musepack;
application/x-ape;audio/ape;audio/x-ape;
audio/x-mp3;application/x-id3;audio/mpeg;audio/x-mpeg;audio/x-mpeg-3;audio/mpeg3;audio/mp3;audio/x-mp3;application/x-id3;audio/mpeg;audio/x-mpeg;audio/x-mpeg-3;audio/mpeg3;audio/mp3;
audio/mp4;audio/x-m4a;audio/x-m4a;
audio/mpc;audio/x-mpc;audio/mp;audio/x-mp;audio/mpc;audio/x-mpc;audio/mp;audio/x-mp;
application/ogg;application/x-ogg;application/x-vorbis+ogg;audio/x-vorbis+ogg;audio/vorbis;audio/x-vorbis;audio/ogg;audio/x-ogg;application/ogg;application/x-ogg;audio/vorbis;audio/x-vorbis;audio/ogg;audio/x-ogg;
audio/x-flac;application/x-flac;audio/flac;audio/x-flac;application/x-flac;audio/flac;
audio/x-s3m;audio/x-mod;audio/x-xm;audio/x-it;audio/x-s3m;audio/x-mod;audio/x-xm;audio/x-it

*/