예제 #1
0
async def get_and_match_args(parser):
    args = parser.parse_args()
    if args.wtrack:
        await onlinetracker.tracker(args.target)

    elif args.wtgbot:
        tgbot.telegram_status(args.target)

    elif args.wchat:
        await wchat.chat(args.target)

    elif args.wblast:
        await messageblast.blast(args.target)

    elif args.wtimer:
        await messagetimer.msgTimer(args.target)

    elif args.pull:
        if args.target is None:
            parser.print_help()
            parser.exit()
        try:
            bID: int = int(sys.argv[3])
        except (IndexError, ValueError):
            bID: int = 0
        savechat.runMain('pull', str(args.target), bID)

    elif args.schedule:
        await scheduleMessage.schedule_message(args.target)

    elif args.wabout:
        await changeAbout.changeAbout()

    elif args.wnews:
        await wnews.get_news(args.target)
예제 #2
0
def match_args(args):
	if args.wtrack:
		onlinetracker.tracker(args.name)

	elif args.wchat:
		wchat.chat(args.name)

	elif args.wblast:
		messageblast.blast(args.name)

	elif args.pull:
        try:
            bID = int(sys.argv[3])
        except (IndexError, ValueError):
            bID = 0
        savechat.runMain('pull', str(args.name), bID)

	# elif args.wlocation:
	#	loactionfinder.finder(args.name)

def main():
	args = get_arguments()
	try:
		match_args(args)
		sys.exit(0)
	except KeyboardInterrupt:
		sys.exit(0)


if __name__=='__main__':
	main()
예제 #3
0
async def match_args(args):
    if args.wtrack:
        await onlinetracker.tracker(args.name)

    elif args.wtgbot:
        tgbot.telegram_status(args.name)

    elif args.wchat:
        await wchat.chat(args.name)

    elif args.wblast:
        await messageblast.blast(args.name)

    elif args.wtimer:
        await messagetimer.msgTimer(args.name)

    elif args.pull:
        try:
            bID = int(sys.argv[3])
        except (IndexError, ValueError):
            bID = 0
        savechat.runMain('pull', str(args.name), bID)