def citation_exec(rank_method_code, name, config):
    """Rank method for citation analysis"""
    #first check if this is a specific task
    if task_get_option("cmd") == "print-missing":
        num = task_get_option("num")
        print_missing(num)
    dict = get_citation_weight(rank_method_code, config)
    date = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
    if dict: intoDB(dict, date, rank_method_code)
    else: write_message("no need to update the indexes for citations")
예제 #2
0
def citation_exec(rank_method_code, name, config):
    """Rank method for citation analysis"""
    #first check if this is a specific task
    begin_date = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
    if task_get_option("cmd") == "print-missing":
        num = task_get_option("num")
        print_missing(num)
    else:
        dict = get_citation_weight(rank_method_code, config)
        if dict:
            intoDB(dict, begin_date, rank_method_code)
        else:
            write_message("no need to update the indexes for citations")
def citation_exec(rank_method_code, name, config):
    """Rank method for citation analysis"""
    #first check if this is a specific task
    if task_get_option("cmd") == "print-missing":
        num = task_get_option("num")
        print_missing(num)
    else:
        dic, index_update_time = get_citation_weight(rank_method_code, config)
        if dic:
            if task_get_option("id") or task_get_option("collection") or \
               task_get_option("modified"):
                # user have asked to citation-index specific records
                # only, so we should not update citation indexer's
                # last run time stamp information
                index_update_time = None
            intoDB(dic, index_update_time, rank_method_code)
        else:
            write_message("No need to update the indexes for citations.")
def citation_exec(rank_method_code, name, config):
    """Rank method for citation analysis"""
    #first check if this is a specific task
    if task_get_option("cmd") == "print-missing":
        num = task_get_option("num")
        print_missing(num)
    else:
        dic, index_update_time = get_citation_weight(rank_method_code, config)
        if dic:
            if task_get_option("id") or task_get_option("collection") or \
               task_get_option("modified"):
                # user have asked to citation-index specific records
                # only, so we should not update citation indexer's
                # last run time stamp information
                index_update_time = None
            intoDB(dic, index_update_time, rank_method_code)
        else:
            write_message("No need to update the indexes for citations.")