Debian Codegraph @

tools/KateDJ/KateDJ

raw
1 #!/usr/bin/env python3
2
3 # import what we need first, complain if we don't find it
4 import sys
5 from kdj import constants
6
7 stop=False
8 if len(sys.argv)>1:
9 arg=sys.argv[1]
10 if arg=='-V' or arg=='--version':
11 print(constants.kdj_name_version+', a remuxing program for Kate streams.\n')
12 stop=True
13 elif arg=='-h' or arg=='--help':
14 print(constants.kdj_name_version+', a remuxing program for Kate streams.\n')
15 print('\n'+\
16 constants.kdj_name+' is a remuxing program that allows extracting and decoding Kate tracks\n'+\
17 'from an Ogg stream, and recreating that Ogg stream after the Kate streams\n'+\
18 'have been altered.\n'+\
19 constants.kdj_name+' requires both the Kate tools (kateenc and katedec) and the oggz tools.\n'+\
20 '\n'+\
21 'This is a GUI program. Click the \'Help\' button in the main window for more help.\n')
22 stop=True
23 else:
24 print('Invalid option: '+arg)
25 sys.exit(1)
26
27 if stop:
28 sys.exit(0)
29
30 try:
31 import wx
32 except:
33 print('Failed to find the wx Python module')
34 sys.exit(1)
35
36 # import our own code
37 from kdj.ui_main import UIMain
38
39 app=wx.PySimpleApp()
40 wx.InitAllImageHandlers()
41 ui_main=UIMain()
42 app.MainLoop()
43