codeletter/codeletter/utils.py
def insert_article(data_json):
    """
    Given json, it gets the concept ids and insert the article into article database.

    :param data_json: json containing article information is given as input
    :type data_json: dict
    """
    concept_ids = get_or_insert_concept(data_json["concepts"])
    article_rec = Article(
        url=data_json["url"],
        title=data_json["title"],
        abstract=data_json["abstract"],
        domain=data_json["domain"],
        concept_ids=concept_ids,
    )
    article_rec.save()
    return article_rec

    Given json, it gets the concept ids and insert the article into article database.

    :param data_json: json containing article information is given as input
    :type data_json: dict
    
Given json, it gets the concept ids and insert the article into article database.
Given json it gets the concept ids and insert the article into article database .
def insert_article(data_json):
    concept_ids = get_or_insert_concept(data_json["concepts"])
    article_rec = Article(
        url=data_json["url"],
        title=data_json["title"],
        abstract=data_json["abstract"],
        domain=data_json["domain"],
        concept_ids=concept_ids,
    )
    article_rec.save()
    return article_rec
def insert_article ( data_json ) : concept_ids = get_or_insert_concept ( data_json [ "concepts" ] ) article_rec = Article ( url = data_json [ "url" ] , title = data_json [ "title" ] , abstract = data_json [ "abstract" ] , domain = data_json [ "domain" ] , concept_ids = concept_ids , ) article_rec . save ( ) return article_rec
Given json, it gets the concept ids and insert the article into article database.
Given json it gets the concept ids and insert the article into article database .
"""
    Given json, it gets the concept ids and insert the article into article database.

    :param data_json: json containing article information is given as input
    :type data_json: dict
    """
data_json
json containing article information is given as input
json containing article information is given as input