-
Notifications
You must be signed in to change notification settings - Fork 3
/
pp_options.py
54 lines (47 loc) · 3.05 KB
/
pp_options.py
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
# Dec 2015 - add --manager option
from pp_utils import Monitor
import argparse
def command_options():
""" reads the command line options and returns a dictionary of them"""
debug_no_d=Monitor.m_fatal|Monitor.m_err|Monitor.m_warn
debug_d=Monitor.m_fatal|Monitor.m_err|Monitor.m_warn|Monitor.m_log
wait_no_w=5
wait_w = 0
parser = argparse.ArgumentParser(description = 'Pi Presents multimedia toolkit')
parser.add_argument( '-b','--noblank', action='store_true', help='Disable screen blanking.')
parser.add_argument( '-f','--fullscreen', action='store_true',help='Full Screen')
parser.add_argument( '-d','--debug', nargs='?', default=debug_no_d, const=debug_d,help='Enable Debug Output [and loglevel]')
parser.add_argument( '-o','--home', nargs='?', default='', const='',help='Path to pp_home')
parser.add_argument( '-l','--liveshow', nargs='?', default='', const='',help='Directory1 for live tracks')
parser.add_argument( '-p','--profile', nargs='?', default='', const='',help='Profile')
parser.add_argument( '--manager', action='store_true',help='Use With Manager for PiPresents')
parser.add_argument( '-n','--nonetwork', nargs='?', default=wait_no_w, const=wait_w,help='Enable wait for network [and time in secs]')
parser.add_argument( '--loadcounters', action='store_true',help='Load counters form Start Show')
parser.add_argument( '--nounclutter', action='store_true', help='Disable Unclutter')
parser.add_argument( '--vibes', action='store_true', help='Enable Vibes')
parser.add_argument( '--backlight', action='store_true', help='Enable Touchscreen Backlight')
args=parser.parse_args()
return vars(args)
def web_ed_options():
""" reads the command line options and returns a dictionary of them"""
parser = argparse.ArgumentParser(description = 'Pi Presents Web Editor')
parser.add_argument( '-d','--debug', nargs='?', default='7', const='15',help='Debug output to terminal window')
parser.add_argument( '-n','--native', action='store_true',help='Native')
parser.add_argument( '-l','--local', action='store_true',help='Local')
parser.add_argument( '-r','--remote', action='store_true',help='Remote')
args=parser.parse_args()
return vars(args)
def ed_options():
""" reads the command line options and returns a dictionary of them"""
parser = argparse.ArgumentParser(description = 'Pi Presents Editor')
parser.add_argument( '-d','--debug', nargs='?', default='7', const='15',help='Debug output to terminal window')
parser.add_argument( '--forceupdate', action='store_true',help='Force Update')
args=parser.parse_args()
return vars(args)
def remote_options():
""" reads the command line options and returns a dictionary of them"""
parser = argparse.ArgumentParser(description = 'Pi Presents Remote')
parser.add_argument( '-d','--debug', nargs='?', default='7', const='15',help='Debug output to terminal window')
parser.add_argument( '-o','--home', nargs='?', default="/home/pi", const='',help='Path to pp_home')
args=parser.parse_args()
return vars(args)