diff --git a/hal/scripts_dblp.py b/hal/scripts_dblp.py deleted file mode 100644 index 9358ce9dd46067258e63115c6075157bb2f0f761..0000000000000000000000000000000000000000 --- a/hal/scripts_dblp.py +++ /dev/null @@ -1,440 +0,0 @@ -#!/usr/bin/python -#-*- coding: utf-8 -*- - -from __future__ import unicode_literals -import requests -import csv - -# lib XML -from lxml import etree - -# lib bibtex -import bibtexparser -from bibtexparser.bparser import BibTexParser -from bibtexparser.customization import homogenize_latex_encoding -from bibtexparser.customization import convert_to_unicode - -from create_xml2hal import createXml_sendHal, create_single_xml - -################# -## VARIABLES -################# - - -# Fichier CSV en sortie -file_publis_csv = "all_csv.csv" - - -######################################################################################################################################## -######################################################################################################################################## -########## SCRIPT PRINCIPAL -######################################################################################################################################## -######################################################################################################################################## - -''' -def get_info_from_proceeding(crossref, bib_database) : - #global bib_database - list_info = [] - for entrycrossref in bib_database.entries : - if entrycrossref['ENTRYTYPE']=='proceedings' : - if entrycrossref['ID'] == crossref : - print ("CROSSREF") - #print (" TITLE : ", entrycrossref['title']) - #print (" PUBLISHER : ", entrycrossref['publisher']) - result = entrycrossref['title'] - return result -''' - -def script_dblp_2_hal (bibtex_file, bib_name_user, name_user, firstname_user, labo_auth_final, id_hal_user, login_user, listdomains, login_depot, passwd_depot, bool_depot_preprod, bool_depot_prod, single): - ''' - take bibtex file and some values in entry and parse the bibtex to get info upon publications - - if the bool 'single' == False -> bibtex file has many publications, call createXml_sendHal (create XML and deposit) return a lis of results - if the bool 'single' == True -> bibtex file has one publication, call create_single_xml (post single XML no deposit) return the XML in string - ''' - resultat = "" - problemes_url = "" - problemes_doublon = "" - problemes_depot = "" - depots = "" - reponse_single_xml = "" - - ################################### - ###### COMPTEURS - ################################### - - cnt_article = 0 - cnt_inproceeding = 0 - cnt_proceeding = 0 - cnt_incollection = 0 - cnt_book = 0 - cnt_total = 0 - cnt_phdthesis = 0 - - # errors bibtex - cnt_error_auth = 0 - cnt_error_title = 0 - cnt_error_jrn = 0 - cnt_error_vol = 0 - cnt_error_numb = 0 - cnt_error_pages = 0 - cnt_error_year_art = 0 - cnt_error_doi = 0 - cnt_error_booktitle = 0 - cnt_error_pages = 0 - cnt_error_year_inp = 0 - cnt_error_crossref = 0 - cnt_error_publisher = 0 - cnt_error_editor = 0 - cnt_error_idcrossref = 0 - cnt_error_publisher_p = 0 - cnt_error_editor_p = 0 - - list_pub_csv = [] - - # une participation a une conf (inproceeding) peut avoir une crossref reliee a une proceeding qui est une conf, celle ci - # se trouve en fin du doc bibtex donc -> - # on cherche crossref dans inproceeding, si on le trouve aller le chercher en bas, sinon chercher editor et publier directement dans inproceeding - # car certains chercheurs peuvent creer leur bibtex comme ceci - - #bibtex_file = bibtex_file.encode("utf-8") - print (bibtex_file) - - parser = BibTexParser() - parser.ignore_nonstandard_types = False - parser.homogenize_fields = False - parser.common_strings = False - parser.customization = convert_to_unicode - bib_database = bibtexparser.loads(bibtex_file, parser = parser) - ''' - parser = BibTexParser() - parser.customization = convert_to_unicode - bib_database = bibtexparser.load(bibtex_file, parser=parser) - ''' - - # list_acronym_country -> nom du pays en anglais majuscule , acronyme du pays - list_acronym_country = [] - with open('hal/countries.csv', 'rb') as csvfile: - delim = str(':') - quotech = str('|') - list_countries = csv.reader(csvfile, delimiter=delim, quotechar=quotech) - for row in list_countries: - list_acronym_country.append((row[1],row[0])) - - - for entry in bib_database.entries : - # initialize entries - type_publi ="" - numero = "" - language = "en" - title = "" - conf="" - nb_pages="" - volume = "" - town="" - country="" - country_acr="XX" - year = 0 - doi_value = "" - publisher_book = "" - editor_book = "" - - # Recup type publi, numero, language - if entry['ENTRYTYPE']=='article' : - cnt_article +=1 - type_publi = "ART" - numero = "RI"+str(cnt_article) - language = "en" - - if entry['ENTRYTYPE']=='inproceedings' : - cnt_inproceeding +=1 - type_publi = "COMM" - numero = "CI"+str(cnt_inproceeding) - language = "en" - - if entry['ENTRYTYPE']=='book' : - cnt_book +=1 - type_publi = "OUV" - numero = "O"+str(cnt_book) - language = "en" - - # Recup title and format - title = entry['title'] - title = title.replace("\n"," ") - title = title.replace("\\emph","") - - # get authors - listauthors = [] - try : - #print ("AUTHOR:"+entry['author']) - authors = entry['author'] - list_authors_mix = authors.split("\n") - for auth in list_authors_mix : - lab_struct = "" - #print ("TEST name_user "+name_user+" - auth "+auth) - - if name_user in auth : - print ("Script_DBLP Match form_author DBLP") - auth = firstname_user+" "+name_user - lab_struct = labo_auth_final - if auth[-4:] == " and" : - auth = auth[:-4] - auth_full = auth.split(" ") - prenom = auth_full[0] - prenom = prenom.encode('utf-8') - nom = auth_full[-1] - nom = nom.encode('utf-8') - #print ("Script_dblp "+"author "+auth.encode('utf-8')+ " - prenom "+ prenom.encode('utf-8')+ " - nom "+nom.encode('utf-8')+ str(type(auth.encode('utf-8')))) - listauthors.append((nom,prenom,lab_struct)) - except KeyError : - cnt_error_auth+=1 - - # Get journal for ARTICLES - if type_publi == "ART" : - try : - conf = entry['journal'] - conf = conf.replace("\n"," ") - except KeyError : - cnt_error_jrn+=1 - - # Get conf for COMM, split entry with ',' , first occurence is conf name - # then search country from CSV in other occurences and if found, get previous occurence to get town (except USA previuous previous occurence) - if type_publi == "COMM" : - try : - booktitle = entry['booktitle'] - conf_all = booktitle.split(",") - conf = conf_all[0] - conf = conf.replace("\n"," ") - conf = conf.replace("\\(^\\mboxth\\)","th") - conf = conf.replace("\\(^\\mboxe\\)","e") - prev_conf_elmt = "" - prev_prev_conf_elmt = "" - for conf_elmt in conf_all : - conf_elmt = conf_elmt.strip() - for csv_country in list_acronym_country : - if conf_elmt.upper() == csv_country[0] : - if csv_country[0] == "USA" : - prev_prev_conf_elmt = prev_prev_conf_elmt.replace("\n"," ") - town = prev_prev_conf_elmt - country_acr = csv_country[1] - country = csv_country[0] - - else : - prev_conf_elmt = prev_conf_elmt.replace("\n"," ") - town = prev_conf_elmt - country_acr = csv_country[1] - country = csv_country[0] - - prev_prev_conf_elmt = prev_conf_elmt - prev_conf_elmt = conf_elmt - - except KeyError : - cnt_error_booktitle+=1 - - # get volume - try : - volume = entry['volume'] - except KeyError : - cnt_error_vol+=1 - - # get nb_pages - try : - nb_pages = entry['pages'] - except KeyError : - cnt_error_pages+=1 - - # get Year - try : - year = entry['year'] - except KeyError : - cnt_error_year_art+=1 - - # get DOI - try : - doi_value = entry['doi'] - except KeyError : - cnt_error_doi+=1 - - - if (type_publi == "COMM") or (type_publi == "BOOK") : - # get Publisher - try : - publisher_book = entry['publisher'] - except KeyError : - cnt_error_publisher+=1 - - # get Editor - try : - editor_book = entry['editor'] - except KeyError : - cnt_error_editor+=1 - - - # Test value "single" - # if false -> call createXml_sendHal (create XML and deposit) - # if true -> call create_single_xml (build XML without creation, no deposit) - if (type_publi == "ART") or (type_publi == "COMM") or (type_publi == "OUV") : - if single == False : - - action_todo="" - - # Verification que la publi n'existe pas deja dans HAL - # pour un meilleur matching, titre en minuscule et recherche par le champ title_t (sans casse ni accent) - title_low = title.lower() - url_request = "https://api.archives-ouvertes.fr/search/?q=title_t:\"{0}\"&fl=uri_s,halId_s,authFullName_s,authIdHal_s,title_s&wt=json".format(title_low) - - req = requests.get(url_request) - json = "" - try : - json = req.json() - except ValueError : - print ("PROBLEME VALUEERROR") - try : - if json is not "" : - result = json['response']['docs'] - - # si un resultat est trouve, recup authors et URI pour affichage dans 'resultat', action_todo = "E" - if (len(result) == 1 ) : - all_auth = "" - try : - tous_authors = result[0]["authFullName_s"] - for auth in tous_authors: - all_auth = all_auth + auth+"-" - except KeyError, e : - print ("error print authors existing publi") - resultat = resultat + "num. "+numero+" - "+result[0]["uri_s"]+" - auteurs:"+all_auth+"<br/>" - action_todo = "E" - - # si plusieurs resultats trouves, recup URI pour affichage dans 'problemes_doublon', action_todo = "2" - if (len(result) >1 ) : - problemes_doublon = problemes_doublon + "num. "+numero+" - URLS "+result[0]["uri_s"]+" "+result[1]["uri_s"]+"<br/>" - action_todo = "2" - - # Si aucun resultat on peut deposer, action_todo = "D" - if (len(result) == 0 ) : - action_todo = "D" - result = False - accept_depot = True - - # Si caracteres incoherents (issus de DBLP) dans le titre -> pas de depot -> problemes_depot - if ("\\(^\\mbox" in title) : - print("-----------------> MBOX") - accept_depot = False - result = False - - title = title.encode("utf-8") - conf = conf.encode("utf-8") - town = town.encode("utf-8") - editor_book = editor_book.encode("utf-8") - - if accept_depot == True : - result = createXml_sendHal(numero, listauthors, language, title, conf, nb_pages, year, listdomains, type_publi, town, country, country_acr,doi_value, editor_book, volume, name_user, labo_auth_final, id_hal_user, login_user, login_depot, passwd_depot, bool_depot_preprod, bool_depot_prod) - - # methode createXml_sendHal renvoie true -> depot HAL ou preprod OK - if result == True : - depots = depots + "num. "+numero+" au titre "+title.decode("utf-8")+" deposee dans HAL<br/>" - # methode createXml_sendHal renvoie true -> pb depot HAL ou preprod ou pas de depot demande - if result == False : - problemes_depot = problemes_depot + "num. "+numero+" au titre "+title.decode("utf-8")+" a un probleme de depot<br/>" - else : - # pb de lecture json, pas depot -> problemes_url - action_todo = "P" - problemes_url = problemes_url + "num. "+numero+" au titre "+title.decode("utf-8")+"<br/>" - except KeyError : - # pb de lecture json, pas depot -> problemes_url - action_todo = "P" - problemes_url = problemes_url + "num. "+numero+" au titre "+title.decode("utf-8")+"<br/>" - - # Creation du CSV qui sera renvoye et affiche - authors = authors.replace(" and",", ") - list_pub_csv.append((numero,authors,title,conf,nb_pages, volume,year, type_publi, action_todo, town, country, country_acr, language)) - - - elif single == True : - title = title.encode("utf-8") - conf = conf.encode("utf-8") - town = town.encode("utf-8") - editor_book = editor_book.encode("utf-8") - login_user = login_depot - reponse_single_xml = create_single_xml(listauthors, language, title, conf, nb_pages, year, listdomains, type_publi, town, country, country_acr, doi_value, editor_book, volume, name_user, labo_auth_final, id_hal_user, login_user) - - # ------------------END LOOP ----------------- - cnt_total+=1 - - ######################## - ####### ECRITURE RESULTATS -> list_resultats - print ("list_pub_csv length :",cnt_total) - - list_resultats=[] - for pub in list_pub_csv : - allauth = pub[1] - allauth = allauth.replace("\n","") - title = pub[2]#.decode("utf-8") - conf = pub[3]#.decode("utf-8") - ville = pub[9]#.decode("utf-8") - - list_resultats.append((str(pub[0]),allauth,title,conf,str(pub[4]),str(pub[5]),str(pub[6]),str(pub[7]),str(pub[8]),ville,str(pub[10]),str(pub[11]),str(pub[12]))) - - cnt_nb_publis = cnt_article + cnt_inproceeding + cnt_book + cnt_incollection + cnt_phdthesis - - list_resultats.append(("RESULTATS","nombre de publis",str(cnt_nb_publis),"","","","","","","","","","")) - list_resultats.append(("RESULTATS","publis deja presentes dans HAL",resultat,"","","","","","","","","","")) - list_resultats.append(("RESULTATS","depots",depots,"","","","","","","","","","")) - list_resultats.append(("RESULTATS","problemes de depot",problemes_depot,"","","","","", "","","","","")) - list_resultats.append(("RESULTATS","problemes de doublon",problemes_doublon,"","","","", "","","","","","")) - list_resultats.append(("RESULTATS","problemes url",problemes_url,"","","","","","","","","","")) - - print ("####### RESULTATS PARSING BIBTEX ########") - print ("cnt_article ", cnt_article) - print ("cnt_inproceeding ", cnt_inproceeding) - print ("cnt_proceeding ", cnt_proceeding) - print ("cnt_incollection ", cnt_incollection) - print ("cnt_book ", cnt_book) - print ("cnt_phdthesis ", cnt_phdthesis) - print ("cnt_total ", cnt_total) - - print ("ERROR Author", cnt_error_auth) - print ("ERROR Title", cnt_error_title) - - print ("-------ERRORS ARTICLE------") - print ("cnt_error_jrn",cnt_error_jrn) - print ("cnt_error_vol",cnt_error_vol) - print ("cnt_error_numb",cnt_error_numb) - print ("cnt_error_pages",cnt_error_pages) - print ("cnt_error_year_art",cnt_error_year_art) - print ("cnt_error_doi",cnt_error_doi) - - print ("-------ERRORS INPROCEEDINGS------") - print ("cnt_error_booktitle:",cnt_error_booktitle) - print ("cnt_error_pages:",cnt_error_pages) - print ("cnt_error_year_inp:",cnt_error_year_inp) - print ("cnt_error_crossref:",cnt_error_crossref) - print ("cnt_error_publisher:",cnt_error_publisher) - print ("cnt_error_editor:",cnt_error_editor) - - print ("-------ERRORS PROCEEDINGS------") - print ("cnt_error_idcrossref:",cnt_error_idcrossref) - - print ("#########################################") - - print ("######## RESULTATS XML + DEPOTS ##########") - print ("RESULTATS existants") - print (resultat.encode("utf-8")) - print ("------------------") - print ("DEPOTS effectues") - print (depots.encode("utf-8")) - print ("------------------") - print ("PROBLEMES DEPOTS") - print (problemes_depot.encode("utf-8")) - print ("------------------") - print ("PROBLEMES DOUBLONS") - print (problemes_doublon.encode("utf-8")) - print ("------------------") - print ("PROBLEMES URL") - print (problemes_url.encode("utf-8")) - - - if single == False : - return list_resultats - if single == True : - return reponse_single_xml diff --git a/hal/templates/hal/dblp2hal.html b/hal/templates/hal/dblp2hal.html deleted file mode 100644 index 2474c83319777fe9414bd9d987e687fc7aa1be26..0000000000000000000000000000000000000000 --- a/hal/templates/hal/dblp2hal.html +++ /dev/null @@ -1,279 +0,0 @@ -{% extends "base.html" %} -{% load static %} -{% load staticfiles %} -{% load bootstrap3 %} -{% load bootstrap_themes %} - -{% block head %} -<head> - <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}"> - <link rel="shortcut icon" href="{% static 'imgsite/favicon.ico' %}"> - <title>Outils HAL</title> - -</head> -{% endblock %} - -{% block content %} -<h3>DBLP to HAL</h3> - <br/> - {% if user.is_authenticated %} - <p align="left">Remplissez les données demandées ci-dessous - <br/> - Tous les champs sont requis - <br/> - Dans un premier temps, simulez le dépôt en laissant les champs "dépôt préprod" et "dépôt prod" décochés - <br/> - Copiez-collez le contenu de votre fichier bibtex dans la zone prévue</p> - - <div class="well bs-component"> - <form action="{% url "dblp2hal" %}" method="post"> - {% csrf_token %} - - <div class="row"> - - <div class="col-lg-12"> - <div class="fieldWrapper"> - <h3>Auteur</h3> - </div> - </div> - - <!-- 1e ligne --> - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.bib_name_user.errors }} - {{ form.bib_name_user.label_tag }}<br/> - {{ form.bib_name_user }} - </div> - </div> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.name_user.errors }} - {{ form.name_user.label_tag }}<br/> - {{ form.name_user }} - </div> - </div> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.firstname_user.errors }} - {{ form.firstname_user.label_tag }}<br/> - {{ form.firstname_user }} - </div> - </div> - <!-- 2e ligne --> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.login_user.errors }} - {{ form.login_user.label_tag }}<br/> - {{ form.login_user }} - </div> - </div> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.id_hal_user.errors }} - {{ form.id_hal_user.label_tag }}<br/> - {{ form.id_hal_user }} - </div> - </div> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.labo_auth_final.errors }} - {{ form.labo_auth_final.label_tag }}<br/> - {{ form.labo_auth_final }} - </div> - <br/> - </div> - - - <!-- 3e ligne --> - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.domain1.errors }} - {{ form.domain1.label_tag }}<br/> - {{ form.domain1 }} - </div> - </div> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.domain2.errors }} - {{ form.domain2.label_tag }}<br/> - {{ form.domain2 }} - </div> - </div> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.domain3.errors }} - {{ form.domain3.label_tag }}<br/> - {{ form.domain3 }} - </div> - </div> - - <!-- 4e ligne --> - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.domain4.errors }} - {{ form.domain4.label_tag }}<br/> - {{ form.domain4 }} - </div> - </div> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.domain5.errors }} - {{ form.domain5.label_tag }}<br/> - {{ form.domain5 }} - </div> - </div> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - </div> - </div> - - - <div class="col-lg-12"> - <div class="fieldWrapper"> - <h3>Déposant</h3> - </div> - </div> - - <!-- 5e ligne --> - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.login_depot.errors }} - {{ form.login_depot.label_tag }}<br/> - {{ form.login_depot }} - </div> - </div> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.passwd_depot.errors }} - {{ form.passwd_depot.label_tag }}<br/> - {{ form.passwd_depot }} - </div> - </div> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - </div> - </div> - - - <!-- 5e ligne --> - - <br/> - <div class="col-lg-4"> - <div class="fieldWrapper"> - <br/><br/> - <h3>Dépôts</h3> - </div> - </div> - - - <div class="col-lg-4"> - <div class="fieldWrapper"> - - <br/><br/> - {{ form.bool_depot_preprod.errors }} - {{ form.bool_depot_preprod.label_tag }}<br/> - {{ form.bool_depot_preprod }} - - </div> - </div> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - <br/><br/> - {{ form.bool_depot_prod.errors }} - {{ form.bool_depot_prod.label_tag }}<br/> - {{ form.bool_depot_prod }} - - </div> - </div> - - <!-- 6e ligne --> - <div class="col-lg-12"> - <br/> - <hr> - <div class="fieldWrapper"> - {{ form.bibtex_file.errors }} - {{ form.bibtex_file.label_tag }}<br/> - {{ form.bibtex_file }} - </div> - </div> - </div> - - - <input type="submit" class="btn btn-primary" value="Submit" /> - </form> - </div> - - <div class="well bs-component"> - <div class="row"> - <div class="col-lg-12"> - <br/> - <b><u>Résultats :</u></b> - {% autoescape off %} - <br/> - <p align="left"> - {{ reponse_to_post }} - </p> - <br/> - {% endautoescape %} - <br/> - </div> - </div> - </div> - - {% if list_to_post|length > 0%} - <table class="table table-striped table-hover "> - <tr> - <th>n°</th> - <th>Auteurs </th> - <th>Titre</th> - <th>Conf</th> - <th>pp </th> - <th>vol</th> - <th>date</th> - <th>type </th> - <th>todo</th> - <th>Ville</th> - <th>pays </th> - <th>acr</th> - <th>lang</th> - </tr> - - {% for pub in list_to_post %} - <tr> - <td>{{ pub.num }}</td> - <td>{{ pub.authors }}</td> - <td>{{ pub.title }}</td> - <td>{{ pub.conf }}</td> - <td>{{ pub.page }}</td> - <td>{{ pub.vol }}</td> - <td>{{ pub.date }}</td> - <td>{{ pub.type }}</td> - <td>{{ pub.todo }}</td> - <td>{{ pub.ville }}</td> - <td>{{ pub.pays }}</td> - <td>{{ pub.acr }}</td> - <td>{{ pub.lang }}</td> - </tr> - {% endfor %} - </table> - {% endif %} - - {% else %} - <h5>Pour faire une demande d'identifiants, envoyer un mail à jessica.leyrit@uca.fr</h5> - <br/> - - {% endif %} - -{% endblock %} diff --git a/hal/templates/hal/dblpxml.html b/hal/templates/hal/dblpxml.html deleted file mode 100644 index f700a58db189fb9feeb232c4cc72cf105d081bfe..0000000000000000000000000000000000000000 --- a/hal/templates/hal/dblpxml.html +++ /dev/null @@ -1,176 +0,0 @@ -{% extends "base.html" %} -{% load static %} -{% load staticfiles %} -{% load bootstrap3 %} -{% load bootstrap_themes %} - -{% block head %} -<head> - <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}"> - <link rel="shortcut icon" href="{% static 'imgsite/favicon.ico' %}"> - <title>Outils HAL</title> -</head> -{% endblock %} - -{% block content %} -<h3>Create XML from DBLP</h3> - <br/> - {% if user.is_authenticated %} - <p align="left">Remplissez les données demandées ci-dessous - <br/> - Tous les champs sont requis - <br/> - Copiez-collez le contenu de votre fichier bibtex dans la zone prévue</p> - - <div class="well bs-component"> - <form action="{% url "dblpxml" %}" method="post"> - {% csrf_token %} - - <div class="row"> - - <div class="col-lg-12"> - <div class="fieldWrapper"> - <h3>Auteur</h3> - </div> - </div> - - <!-- 1e ligne --> - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.bib_name_user.errors }} - {{ form.bib_name_user.label_tag }}<br/> - {{ form.bib_name_user }} - </div> - </div> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.name_user.errors }} - {{ form.name_user.label_tag }}<br/> - {{ form.name_user }} - </div> - </div> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.firstname_user.errors }} - {{ form.firstname_user.label_tag }}<br/> - {{ form.firstname_user }} - </div> - </div> - <!-- 2e ligne --> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.login_user.errors }} - {{ form.login_user.label_tag }}<br/> - {{ form.login_user }} - </div> - </div> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.id_hal_user.errors }} - {{ form.id_hal_user.label_tag }}<br/> - {{ form.id_hal_user }} - </div> - </div> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.labo_auth_final.errors }} - {{ form.labo_auth_final.label_tag }}<br/> - {{ form.labo_auth_final }} - </div> - <br/> - </div> - - <!-- 3e ligne --> - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.domain1.errors }} - {{ form.domain1.label_tag }}<br/> - {{ form.domain1 }} - </div> - </div> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.domain2.errors }} - {{ form.domain2.label_tag }}<br/> - {{ form.domain2 }} - </div> - </div> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.domain3.errors }} - {{ form.domain3.label_tag }}<br/> - {{ form.domain3 }} - </div> - </div> - - <!-- 4e ligne --> - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.domain4.errors }} - {{ form.domain4.label_tag }}<br/> - {{ form.domain4 }} - </div> - </div> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - {{ form.domain5.errors }} - {{ form.domain5.label_tag }}<br/> - {{ form.domain5 }} - </div> - </div> - - <div class="col-lg-4"> - <div class="fieldWrapper"> - </div> - </div> - - - <!-- 5e ligne --> - <div class="col-lg-12"> - - <div class="fieldWrapper"> - {{ form.bibtex_file.errors }} - {{ form.bibtex_file.label_tag }}<br/> - {{ form.bibtex_file }} - </div> - </div> - </div> - - - <input type="submit" class="btn btn-primary" value="Submit" /> - </form> - </div> - - <div class="well bs-component"> - <div class="row"> - <div class="col-lg-12"> - <br/> - <b><u>Résultats :</u></b> - - <br/> - - <pre>{{ reponse_to_post }}</pre> - - <br/> - - <br/> - </div> - </div> - </div> - - - {% else %} - <h5>Pour faire une demande d'identifiants, envoyer un mail à jessica.leyrit@uca.fr</h5> - <br/> - - {% endif %} - -{% endblock %} diff --git a/hal/templates/hal/text_format_rg.html b/hal/templates/hal/text_format_rg.html deleted file mode 100644 index 803e8fb57c3a3c89585b712bc0645c01b4a713dd..0000000000000000000000000000000000000000 --- a/hal/templates/hal/text_format_rg.html +++ /dev/null @@ -1,69 +0,0 @@ -{% extends "base.html" %} -{% load static %} -{% load staticfiles %} -{% load bootstrap3 %} -{% load bootstrap_themes %} - -{% block head %} -<head> - <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}"> - <link rel="shortcut icon" href="{% static 'imgsite/favicon.ico' %}"> - <title>Outils HAL</title> -</head> -{% endblock %} - -{% block content %} -<h3>Format Text from Research Gate</h3> - <br/> - {% if user.is_authenticated %} - <p align="left">Copiez-collez le contenu du CV Research Gate (au format texte) texte dans la zone prévue</p> - - <div class="well bs-component"> - <form action="{% url "text_format_rg" %}" method="post"> - {% csrf_token %} - - <div class="row"> - - <!-- 6e ligne --> - <div class="col-lg-12"> - - <div class="fieldWrapper"> - {{ form.text_modif.errors }} - <h4>{{ form.text_modif.label_tag }}</h4> - {{ form.text_modif }} - </div> - </div> - </div> - - - <input type="submit" class="btn btn-primary" value="Submit" /> - </form> - </div> - - <div class="well bs-component"> - <div class="row"> - <div class="col-lg-12"> - <br/> - <b><u>Résultats :</u></b> - - <br/> - -<pre> -{{ reponse_to_post }} -</pre> - - <br/> - - <br/> - </div> - </div> - </div> - - - {% else %} - <h5>Pour faire une demande d'identifiants, envoyer un mail à jessica.leyrit@uca.fr</h5> - <br/> - - {% endif %} - -{% endblock %}