Exemplo n.º 1
0
    def invoke(self, arg, from_tty):
        read_content_preview = False
        do_debug_log = False
        config_path = None

        arg = arg.split()
        for i in range(len(arg)):
            if arg[i] == "-r":
                read_content_preview = True
            if arg[i] == "-v":
                do_debug_log = True

            elif arg[i] == "-c":
                if i + 1 >= len(arg):
                    print('[shadow] empty configuration path')
                    return
                config_path = arg[i+1]
                if not os.path.isfile(config_path):
                    print('[shadow] configuration file not found')
                    return

        shadow.parse(read_content_preview, config_path, do_debug_log=do_debug_log)
Exemplo n.º 2
0
        do_debug_log = False
        config_path = None

        for i in range(len(arg)):
            if arg[i] == "-r":
                read_content_preview = True
            if arg[i] == "-v":
                do_debug_log = True

            elif arg[i] == "-c":
                if i + 1 >= len(arg):
                    print('[shadow] empty configuration path')
                    sys.exit()
                config_path = arg[i+1]

        shadow.parse(read_content_preview, config_path, do_debug_log=do_debug_log)

    elif sys.argv[1] == 'jeversion':
        shadow.version()
        shadow.firefox_version()

    elif sys.argv[1] == 'jedump':
        arg = sys.argv[2:]

        if len(arg) == 0:
            path = None
        else:
            path = arg[0]

        shadow.dump_all(path=path)
Exemplo n.º 3
0
true = True
false = False
none = None

if __name__ == '__main__':
    argc = len(sys.argv)

    if argc == 1:
        shadow.help()
        sys.exit()

    if sys.argv[1] == 'help':
        shadow.help()

    elif sys.argv[1] == 'jeparse':
        shadow.parse()

    elif sys.argv[1] == 'version':
        shadow.version()
        shadow.firefox_version()

    elif sys.argv[1] == 'jedump':
        arg = ''

        try:
            arg = sys.argv[2]
            screen = false
        except:
            screen = true

        shadow.dump_all(filename=arg, dump_to_screen=screen)
Exemplo n.º 4
0
        config_path = None

        for i in range(len(arg)):
            if arg[i] == "-r":
                read_content_preview = True
            if arg[i] == "-v":
                do_debug_log = True

            elif arg[i] == "-c":
                if i + 1 >= len(arg):
                    print('[shadow] empty configuration path')
                    sys.exit()
                config_path = arg[i + 1]

        shadow.parse(read_content_preview,
                     config_path,
                     do_debug_log=do_debug_log)

    elif sys.argv[1] == 'jeversion':
        shadow.version()
        shadow.firefox_version()

    elif sys.argv[1] == 'jedump':
        arg = sys.argv[2:]

        if len(arg) == 0:
            path = None
        else:
            path = arg[0]

        shadow.dump_all(path=path)
Exemplo n.º 5
0
 def invoke(self, arg, from_tty):
     shadow.parse(proc=self.proc)
Exemplo n.º 6
0
 def invoke(self, arg, from_tty):
     shadow.parse(proc = self.proc)
Exemplo n.º 7
0
true = True
false = False
none = None

if __name__ == '__main__':
    argc = len(sys.argv)

    if argc == 1:
        shadow.help()
        sys.exit()

    if sys.argv[1] == 'help':
        shadow.help()

    elif sys.argv[1] == 'jeparse':
        shadow.parse()

    elif sys.argv[1] == 'version':
        shadow.version()
        shadow.firefox_version()

    elif sys.argv[1] == 'jedump':
        arg = ''

        try:
            arg = sys.argv[2]
            screen = false
        except:
            screen = true

        shadow.dump_all(filename = arg, dump_to_screen = screen)