In [1]:
data = """
    2020
    Arthur-Jozsef Molnar, Simona Motogna:
    Longitudinal Evaluation of Open-source Software Maintainability. ENASE 2020: 120-131
    Arthur-Jozsef Molnar, Simona Motogna:
    Longitudinal Evaluation of Open-Source Software Maintainability. CoRR abs/2003.00447 (2020)
    2019
    Arthur-Jozsef Molnar, Alexandra Neamtu, Simona Motogna:
    Longitudinal Evaluation of Software Quality Metrics in Open-Source Applications. ENASE 2019: 80-91
    Arthur-Jozsef Molnar, Alexandra Neamtu, Simona Motogna:
    Evaluation of Software Product Quality Metrics. ENASE (Selected Papers) 2019: 163-187
    Laura Diosan, Simona Motogna:
    Artificial intelligence meets software engineering in the classroom. EASEAI@ESEC/SIGSOFT FSE 2019: 35-38
    2018
    Simona Motogna, Dana Lupsa, Ioana Ciuciu:
    A NLP Approach to Software Quality Models Evaluation. OTM Workshops 2018: 207-217
    2017
    Arthur Molnar, Simona Motogna:
    Discovering maintainability changes in large software systems. IWSM-Mensura 2017: 88-93
    2015
    Simona Motogna, Ioana Ciuciu, Camelia Serban, Andreea Vescan:
    Improving Software Quality Using an Ontology-Based Approach. OTM Workshops 2015: 456-465
    2013
    Florin Craciun, Simona Motogna, Ioan Lazar:
    Towards Better Testing of fUML Models. ICST 2013: 485-486
    2012
    Adriana Neagos, Simona Motogna:
    Security Analysis Regarding Cross-Site Scripting on Internet Explorer. BCI (Local) 2012: 125-128
    2011
    Simona Motogna, Bazil Pârv, Ioan Lazar:
    An MDA Approach for Developing Executable UML Components. Model-Driven Domain Analysis and Software Development 2011: 254-273
    2010
    Ioan Lazar, Simona Motogna, Bazil Pârv:
    Behaviour-Driven Development of Foundational UML Components. Electron. Notes Theor. Comput. Sci. 264(1): 91-105 (2010)
    Codrut-Lucian Lazar, Ioan Lazar, Bazil Pârv, Simona Motogna, István Gergely Czibula:
    Tool Support for fUML Models. Int. J. Comput. Commun. Control 5(5): 775-782 (2010)
    Ioan Lazar, Simona Motogna, Bazil Pârv, Codrut-Lucian Lazar:
    Realizing use Cases for Full Code Generation in the Context of fUML. MDA/MTDD 2010: 80-89
    2009
    Simona Motogna, Ioan Lazar, Bazil Pârv, István Gergely Czibula:
    An Agile MDA Approach for Service-Oriented Components. Electron. Notes Theor. Comput. Sci. 253(1): 95-110 (2009)
    Ioan Lazar, Simona Motogna, Bazil Pârv, István Gergely Czibula, Codrut-Lucian Lazar:
    Rapid Prototyping of Service-Oriented Applications on OSGi Platform. BCI 2009: 217-222
    Codrut-Lucian Lazar, Ioan Lazar, Bazil Pârv, Simona Motogna, István Gergely Czibula:
    Using a fUML Action Language to Construct UML Models. SYNASC 2009: 93-101
    2008
    Bazil Pârv, Ioan Lazar, Simona Motogna:
    COMDEVALCO framework - the modeling language for procedural paradigm. Int. J. Comput. Commun. Control 3(2): 183-195 (2008)
    Ioan Lazar, Bazil Pârv, Simona Motogna, István Gergely Czibula, Codrut-Lucian Lazar:
    iComponent: A Platform Independent Component Model for Dynamic Execution Environments. SYNASC 2008: 257-264

a service of Schloss Dagstuhl - Leibniz Center for Informatics

    home
    browse
    search
    about



"""

In [2]:
def IsDate(line):
    if line == "":
        return False
    for c in line:
        if c not in "1234567890 ":
            return False
    return True

In [3]:
cdate = None
authors = ""
title = ""

pubs = []
for line in data.split('\n'):
    print(line)
    if IsDate(line):
        cdate = line
        continue
    
    if authors == "":
        authors = line
    else:
        title = line
    
    if authors != "" and title != "":
        pubs.append((authors, title, cdate))
        authors = ""
        title = ""


    2020
    Arthur-Jozsef Molnar, Simona Motogna:
    Longitudinal Evaluation of Open-source Software Maintainability. ENASE 2020: 120-131
    Arthur-Jozsef Molnar, Simona Motogna:
    Longitudinal Evaluation of Open-Source Software Maintainability. CoRR abs/2003.00447 (2020)
    2019
    Arthur-Jozsef Molnar, Alexandra Neamtu, Simona Motogna:
    Longitudinal Evaluation of Software Quality Metrics in Open-Source Applications. ENASE 2019: 80-91
    Arthur-Jozsef Molnar, Alexandra Neamtu, Simona Motogna:
    Evaluation of Software Product Quality Metrics. ENASE (Selected Papers) 2019: 163-187
    Laura Diosan, Simona Motogna:
    Artificial intelligence meets software engineering in the classroom. EASEAI@ESEC/SIGSOFT FSE 2019: 35-38
    2018
    Simona Motogna, Dana Lupsa, Ioana Ciuciu:
    A NLP Approach to Software Quality Models Evaluation. OTM Workshops 2018: 207-217
    2017
    Arthur Molnar, Simona Motogna:
    Discovering maintainability changes in large software systems. IWSM-Mensura 2017: 88-93
    2015
    Simona Motogna, Ioana Ciuciu, Camelia Serban, Andreea Vescan:
    Improving Software Quality Using an Ontology-Based Approach. OTM Workshops 2015: 456-465
    2013
    Florin Craciun, Simona Motogna, Ioan Lazar:
    Towards Better Testing of fUML Models. ICST 2013: 485-486
    2012
    Adriana Neagos, Simona Motogna:
    Security Analysis Regarding Cross-Site Scripting on Internet Explorer. BCI (Local) 2012: 125-128
    2011
    Simona Motogna, Bazil Pârv, Ioan Lazar:
    An MDA Approach for Developing Executable UML Components. Model-Driven Domain Analysis and Software Development 2011: 254-273
    2010
    Ioan Lazar, Simona Motogna, Bazil Pârv:
    Behaviour-Driven Development of Foundational UML Components. Electron. Notes Theor. Comput. Sci. 264(1): 91-105 (2010)
    Codrut-Lucian Lazar, Ioan Lazar, Bazil Pârv, Simona Motogna, István Gergely Czibula:
    Tool Support for fUML Models. Int. J. Comput. Commun. Control 5(5): 775-782 (2010)
    Ioan Lazar, Simona Motogna, Bazil Pârv, Codrut-Lucian Lazar:
    Realizing use Cases for Full Code Generation in the Context of fUML. MDA/MTDD 2010: 80-89
    2009
    Simona Motogna, Ioan Lazar, Bazil Pârv, István Gergely Czibula:
    An Agile MDA Approach for Service-Oriented Components. Electron. Notes Theor. Comput. Sci. 253(1): 95-110 (2009)
    Ioan Lazar, Simona Motogna, Bazil Pârv, István Gergely Czibula, Codrut-Lucian Lazar:
    Rapid Prototyping of Service-Oriented Applications on OSGi Platform. BCI 2009: 217-222
    Codrut-Lucian Lazar, Ioan Lazar, Bazil Pârv, Simona Motogna, István Gergely Czibula:
    Using a fUML Action Language to Construct UML Models. SYNASC 2009: 93-101
    2008
    Bazil Pârv, Ioan Lazar, Simona Motogna:
    COMDEVALCO framework - the modeling language for procedural paradigm. Int. J. Comput. Commun. Control 3(2): 183-195 (2008)
    Ioan Lazar, Bazil Pârv, Simona Motogna, István Gergely Czibula, Codrut-Lucian Lazar:
    iComponent: A Platform Independent Component Model for Dynamic Execution Environments. SYNASC 2008: 257-264

a service of Schloss Dagstuhl - Leibniz Center for Informatics

    home
    browse
    search
    about





In [5]:
for pub in pubs:
    print(pub)


('    Arthur-Jozsef Molnar, Simona Motogna:', '    Longitudinal Evaluation of Open-source Software Maintainability. ENASE 2020: 120-131', '    2020')
('    Arthur-Jozsef Molnar, Simona Motogna:', '    Longitudinal Evaluation of Open-Source Software Maintainability. CoRR abs/2003.00447 (2020)', '    2020')
('    Arthur-Jozsef Molnar, Alexandra Neamtu, Simona Motogna:', '    Longitudinal Evaluation of Software Quality Metrics in Open-Source Applications. ENASE 2019: 80-91', '    2019')
('    Arthur-Jozsef Molnar, Alexandra Neamtu, Simona Motogna:', '    Evaluation of Software Product Quality Metrics. ENASE (Selected Papers) 2019: 163-187', '    2019')
('    Laura Diosan, Simona Motogna:', '    Artificial intelligence meets software engineering in the classroom. EASEAI@ESEC/SIGSOFT FSE 2019: 35-38', '    2019')
('    Simona Motogna, Dana Lupsa, Ioana Ciuciu:', '    A NLP Approach to Software Quality Models Evaluation. OTM Workshops 2018: 207-217', '    2018')
('    Arthur Molnar, Simona Motogna:', '    Discovering maintainability changes in large software systems. IWSM-Mensura 2017: 88-93', '    2017')
('    Simona Motogna, Ioana Ciuciu, Camelia Serban, Andreea Vescan:', '    Improving Software Quality Using an Ontology-Based Approach. OTM Workshops 2015: 456-465', '    2015')
('    Florin Craciun, Simona Motogna, Ioan Lazar:', '    Towards Better Testing of fUML Models. ICST 2013: 485-486', '    2013')
('    Adriana Neagos, Simona Motogna:', '    Security Analysis Regarding Cross-Site Scripting on Internet Explorer. BCI (Local) 2012: 125-128', '    2012')
('    Simona Motogna, Bazil Pârv, Ioan Lazar:', '    An MDA Approach for Developing Executable UML Components. Model-Driven Domain Analysis and Software Development 2011: 254-273', '    2011')
('    Ioan Lazar, Simona Motogna, Bazil Pârv:', '    Behaviour-Driven Development of Foundational UML Components. Electron. Notes Theor. Comput. Sci. 264(1): 91-105 (2010)', '    2010')
('    Codrut-Lucian Lazar, Ioan Lazar, Bazil Pârv, Simona Motogna, István Gergely Czibula:', '    Tool Support for fUML Models. Int. J. Comput. Commun. Control 5(5): 775-782 (2010)', '    2010')
('    Ioan Lazar, Simona Motogna, Bazil Pârv, Codrut-Lucian Lazar:', '    Realizing use Cases for Full Code Generation in the Context of fUML. MDA/MTDD 2010: 80-89', '    2010')
('    Simona Motogna, Ioan Lazar, Bazil Pârv, István Gergely Czibula:', '    An Agile MDA Approach for Service-Oriented Components. Electron. Notes Theor. Comput. Sci. 253(1): 95-110 (2009)', '    2009')
('    Ioan Lazar, Simona Motogna, Bazil Pârv, István Gergely Czibula, Codrut-Lucian Lazar:', '    Rapid Prototyping of Service-Oriented Applications on OSGi Platform. BCI 2009: 217-222', '    2009')
('    Codrut-Lucian Lazar, Ioan Lazar, Bazil Pârv, Simona Motogna, István Gergely Czibula:', '    Using a fUML Action Language to Construct UML Models. SYNASC 2009: 93-101', '    2009')
('    Bazil Pârv, Ioan Lazar, Simona Motogna:', '    COMDEVALCO framework - the modeling language for procedural paradigm. Int. J. Comput. Commun. Control 3(2): 183-195 (2008)', '    2008')
('    Ioan Lazar, Bazil Pârv, Simona Motogna, István Gergely Czibula, Codrut-Lucian Lazar:', '    iComponent: A Platform Independent Component Model for Dynamic Execution Environments. SYNASC 2008: 257-264', '    2008')
('a service of Schloss Dagstuhl - Leibniz Center for Informatics', '    home', '    2008')
('    browse', '    search', '    2008')

In [9]:
import mariadb
import json

In [10]:
with open('../credentials.json', 'r') as crd_json_fd:
    json_text = crd_json_fd.read()
    json_obj = json.loads(json_text)

In [11]:
credentials = json_obj["Credentials"]
username = credentials["username"]
password = credentials["password"]
table_name = "publications_cache"
db_name = "ubbcluj"

In [12]:
mariadb_connection = mariadb.connect(user=username, password=password, database=db_name)
mariadb_cursor = mariadb_connection.cursor()

In [13]:
for paper in pubs:
    
    title = ""
    pub_date = ""
    affiliations = ""
    authors = ""
    
    try:
        pub_date = paper[2].lstrip()
        pub_date = str(pub_date) + "-01-01"
        if len(pub_date) != 10:
            pub_date = ""
    except:
        pass
    
    try:
        affiliations = paper[2].lstrip().split('\'')[0]
    except:
        pass
    
    try:
        title = paper[1].lstrip().split('\'')[0]
    except:
        pass
    
    try:
        authors = paper[0].lstrip().split('\'')[0]
    except AttributeError:
        pass
    
    table_name = "publications_cache"
    
    insert_string = "INSERT INTO {0} SET ".format(table_name)
    insert_string += "Title=\'{0}\', ".format(title)
    insert_string += "ProfessorId=\'{0}\', ".format(13)
    if pub_date != "":
        insert_string += "PublicationDate=\'{0}\', ".format(str(pub_date))
    insert_string += "Authors=\'{0}\', ".format(authors)
    insert_string += "Affiliations=\'{0}\' ".format("")
    print(insert_string)
    
    #print(pub_date)
    
    try:
        mariadb_cursor.execute(insert_string)
    except mariadb.ProgrammingError as pe:
        print("Error")
        raise pe
    except mariadb.IntegrityError:
        continue


INSERT INTO publications_cache SET Title='Longitudinal Evaluation of Open-source Software Maintainability. ENASE 2020: 120-131', ProfessorId='13', PublicationDate='2020-01-01', Authors='Arthur-Jozsef Molnar, Simona Motogna:', Affiliations='' 
INSERT INTO publications_cache SET Title='Longitudinal Evaluation of Open-Source Software Maintainability. CoRR abs/2003.00447 (2020)', ProfessorId='13', PublicationDate='2020-01-01', Authors='Arthur-Jozsef Molnar, Simona Motogna:', Affiliations='' 
INSERT INTO publications_cache SET Title='Longitudinal Evaluation of Software Quality Metrics in Open-Source Applications. ENASE 2019: 80-91', ProfessorId='13', PublicationDate='2019-01-01', Authors='Arthur-Jozsef Molnar, Alexandra Neamtu, Simona Motogna:', Affiliations='' 
INSERT INTO publications_cache SET Title='Evaluation of Software Product Quality Metrics. ENASE (Selected Papers) 2019: 163-187', ProfessorId='13', PublicationDate='2019-01-01', Authors='Arthur-Jozsef Molnar, Alexandra Neamtu, Simona Motogna:', Affiliations='' 
INSERT INTO publications_cache SET Title='Artificial intelligence meets software engineering in the classroom. EASEAI@ESEC/SIGSOFT FSE 2019: 35-38', ProfessorId='13', PublicationDate='2019-01-01', Authors='Laura Diosan, Simona Motogna:', Affiliations='' 
INSERT INTO publications_cache SET Title='A NLP Approach to Software Quality Models Evaluation. OTM Workshops 2018: 207-217', ProfessorId='13', PublicationDate='2018-01-01', Authors='Simona Motogna, Dana Lupsa, Ioana Ciuciu:', Affiliations='' 
INSERT INTO publications_cache SET Title='Discovering maintainability changes in large software systems. IWSM-Mensura 2017: 88-93', ProfessorId='13', PublicationDate='2017-01-01', Authors='Arthur Molnar, Simona Motogna:', Affiliations='' 
INSERT INTO publications_cache SET Title='Improving Software Quality Using an Ontology-Based Approach. OTM Workshops 2015: 456-465', ProfessorId='13', PublicationDate='2015-01-01', Authors='Simona Motogna, Ioana Ciuciu, Camelia Serban, Andreea Vescan:', Affiliations='' 
INSERT INTO publications_cache SET Title='Towards Better Testing of fUML Models. ICST 2013: 485-486', ProfessorId='13', PublicationDate='2013-01-01', Authors='Florin Craciun, Simona Motogna, Ioan Lazar:', Affiliations='' 
INSERT INTO publications_cache SET Title='Security Analysis Regarding Cross-Site Scripting on Internet Explorer. BCI (Local) 2012: 125-128', ProfessorId='13', PublicationDate='2012-01-01', Authors='Adriana Neagos, Simona Motogna:', Affiliations='' 
INSERT INTO publications_cache SET Title='An MDA Approach for Developing Executable UML Components. Model-Driven Domain Analysis and Software Development 2011: 254-273', ProfessorId='13', PublicationDate='2011-01-01', Authors='Simona Motogna, Bazil Pârv, Ioan Lazar:', Affiliations='' 
INSERT INTO publications_cache SET Title='Behaviour-Driven Development of Foundational UML Components. Electron. Notes Theor. Comput. Sci. 264(1): 91-105 (2010)', ProfessorId='13', PublicationDate='2010-01-01', Authors='Ioan Lazar, Simona Motogna, Bazil Pârv:', Affiliations='' 
INSERT INTO publications_cache SET Title='Tool Support for fUML Models. Int. J. Comput. Commun. Control 5(5): 775-782 (2010)', ProfessorId='13', PublicationDate='2010-01-01', Authors='Codrut-Lucian Lazar, Ioan Lazar, Bazil Pârv, Simona Motogna, István Gergely Czibula:', Affiliations='' 
INSERT INTO publications_cache SET Title='Realizing use Cases for Full Code Generation in the Context of fUML. MDA/MTDD 2010: 80-89', ProfessorId='13', PublicationDate='2010-01-01', Authors='Ioan Lazar, Simona Motogna, Bazil Pârv, Codrut-Lucian Lazar:', Affiliations='' 
INSERT INTO publications_cache SET Title='An Agile MDA Approach for Service-Oriented Components. Electron. Notes Theor. Comput. Sci. 253(1): 95-110 (2009)', ProfessorId='13', PublicationDate='2009-01-01', Authors='Simona Motogna, Ioan Lazar, Bazil Pârv, István Gergely Czibula:', Affiliations='' 
INSERT INTO publications_cache SET Title='Rapid Prototyping of Service-Oriented Applications on OSGi Platform. BCI 2009: 217-222', ProfessorId='13', PublicationDate='2009-01-01', Authors='Ioan Lazar, Simona Motogna, Bazil Pârv, István Gergely Czibula, Codrut-Lucian Lazar:', Affiliations='' 
INSERT INTO publications_cache SET Title='Using a fUML Action Language to Construct UML Models. SYNASC 2009: 93-101', ProfessorId='13', PublicationDate='2009-01-01', Authors='Codrut-Lucian Lazar, Ioan Lazar, Bazil Pârv, Simona Motogna, István Gergely Czibula:', Affiliations='' 
INSERT INTO publications_cache SET Title='COMDEVALCO framework - the modeling language for procedural paradigm. Int. J. Comput. Commun. Control 3(2): 183-195 (2008)', ProfessorId='13', PublicationDate='2008-01-01', Authors='Bazil Pârv, Ioan Lazar, Simona Motogna:', Affiliations='' 
INSERT INTO publications_cache SET Title='iComponent: A Platform Independent Component Model for Dynamic Execution Environments. SYNASC 2008: 257-264', ProfessorId='13', PublicationDate='2008-01-01', Authors='Ioan Lazar, Bazil Pârv, Simona Motogna, István Gergely Czibula, Codrut-Lucian Lazar:', Affiliations='' 
INSERT INTO publications_cache SET Title='home', ProfessorId='13', PublicationDate='2008-01-01', Authors='a service of Schloss Dagstuhl - Leibniz Center for Informatics', Affiliations='' 
INSERT INTO publications_cache SET Title='search', ProfessorId='13', PublicationDate='2008-01-01', Authors='browse', Affiliations='' 

In [ ]: