示例#1
0
def activity_for_period():
    driver.cls()
    driver.separator()
    number_of_records = 30
    tag = sub_menu_corp_tag_selection()
    driver.compare_range_of_files(tag, number_of_records)
    driver.separator()
    exec_menu('9')
    return
示例#2
0
def add_new_tag():
    driver.separator()
    corp_tag = raw_input(
        "Please enter corporate tag (it is case sensitive):  ")
    print "Getting the data for [{0}]".format(corp_tag)
    print "All done! Data is in '{0}' file".format(
        driver.main_get_data(corp_tag))
    print "\n"
    exec_menu('9')
    return
示例#3
0
def corp_avg_members_stats():
    driver.cls()
    driver.separator()
    print "NOT IMPLEMENTED\n"
    print "9. Back"
    print "0. Quit"
    driver.separator()
    choice = raw_input(" >>  ")
    exec_menu(choice)
    return
示例#4
0
def latest_activity():
    driver.cls()
    driver.separator()
    driver.separator()
    driver.separator()
    number_of_records = 7
    corp_tags = driver.get_list_of_tags()
    for tag in corp_tags:
        print "\nLatest activity for: " + tag
        driver.compare_range_of_files(tag, number_of_records)
        driver.separator()
        driver.separator()
    exec_menu('9')
    return
示例#5
0
def main_menu():
    print "\n"
    driver.separator()
    print "Main Menu"
    driver.separator()
    print "List of current tags:"
    pprint(driver.get_list_of_tags())
    driver.separator()
    print "\n 1. Update all corporation tags"
    print " 2. Add new corporation tag"
    print "\n 3. Latest transfers for all tracked corporations"
    print " 4. Transfers for a 30 days (single corporation)"
    print "\n 5. Corporate activity for last 14 days"
    print "\n 0. Quit"
    driver.separator()
    choice = raw_input(" >>  ")
    exec_menu(choice)
    return
示例#6
0
def update_all_tags():
    driver.separator()
    list_of_tags = driver.get_list_of_tags()
    if not list_of_tags:
        print "There are no tags to update, please add corporation tags!"
    else:
        for corp_tag in list_of_tags:
            print "Getting the data for [{0}]".format(corp_tag)
            if driver.check_latest_file(corp_tag) is False:
                print "Data is in '{0}' file".format(
                    driver.main_get_data(corp_tag))
                driver.separator()
            else:
                print "Latest available data already exists, skipping"
                driver.separator()
        print "All done! updated data for {0}".format(driver.get_date_today())
    exec_menu('9')
    return
示例#7
0
def corp_members_activity():
    driver.cls()
    driver.separator()
    number_of_records = 14
    tag = sub_menu_corp_tag_selection()
    driver.separator()
    print "\n\n[{0}] PvP Activity".format(tag)
    print "Players activity for past {0}\n\n".format(number_of_records)
    driver.pr_activity_header()
    list_of_players = driver.get_list_of_players_in_corp(tag)
    for uid in list_of_players:
        avg_player_data = driver.avg_player_activity(uid, number_of_records,
                                                     tag)
        driver.pr_activity_member(avg_player_data)
    print "\n\n"
    driver.separator()
    exec_menu('9')
    return
    driver.cls()
    print "Current version: ", main.version
    print "Debug level: ", dbg
    print "Latest server data for: ", date

    # Get latest data
    list_of_tags = driver.get_list_of_tags()
    if not list_of_tags:
        print "There are no tags to update, please add corporation tags!"
    else:
        for corp_tag in list_of_tags:
            print "Getting the data for [{0}]".format(corp_tag)
            if driver.check_latest_file(corp_tag) is False:
                print "Data is in '{0}' file".format(
                    driver.main_get_data(corp_tag))
                driver.separator()
            else:
                print "Latest available data already exists, skipping"
                driver.separator()
        print "All done! updated data for {0}".format(driver.get_date_today())

    # If corporation tag has been passed as an argument to a script (from command line)
    # this script will generate report for that corporation
    # Report only includes transfers based on latest available data
    if len(sys.argv) == 1:
        main.exec_menu('0')
    elif sys.argv[1] in list_of_tags:
        corp_tag = sys.argv[1]
        print "\n\n\nArgument detected, generating a report on corporation transfers for [{}]".format(
            corp_tag)
        driver.separator()