IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

PHP & Base de données Discussion :

Parser un fichier BibTex pour l'insérer dans une bdd MySQL


Sujet :

PHP & Base de données

  1. #1
    Futur Membre du Club
    Profil pro
    Inscrit en
    Décembre 2007
    Messages
    8
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2007
    Messages : 8
    Points : 8
    Points
    8
    Par défaut Parser un fichier BibTex pour l'insérer dans une bdd MySQL
    Salut,
    Je cherche la meilleure solution pour parser une série de fichiers BibTex (générés par JabRef) afin de les insérer dans une base de données MySQL.
    J'ai trouvé des convertisseurs BibTex -> XML, mais je sais qu'il existe des scripts qui font déjà tout le travail (parser les fichiers BibTex et les insérer dans une base de données). Le problème est que je n'arrive pas à mettre la main dessus.

    Est-ce que quelqu'un saurait où trouver un script du genre ?

    Merci d'avance!

  2. #2
    Expert éminent sénior

    Profil pro
    Inscrit en
    Septembre 2010
    Messages
    7 920
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2010
    Messages : 7 920
    Points : 10 727
    Points
    10 727
    Par défaut
    t'as un exemple de fichier, et des données finales que tu voudrais avoir ?

  3. #3
    Futur Membre du Club
    Profil pro
    Inscrit en
    Décembre 2007
    Messages
    8
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2007
    Messages : 8
    Points : 8
    Points
    8
    Par défaut
    Voilà un exemple relativement exhaustif de fichier BibTex:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
     
    @Manual{btxdoc,
      author = 	 {Oren Patashnik},
      title = 	 {BibTeXing},
      address =      {BibTeX distribution},
      month = 	 {February},
      year = 	 {1988},
      url =          {ftp://sunsite.unc.edu/pub/packages/TeX/biblio/bibtex/distribs/doc/btxdoc.tex}
    }
     
    @Book{Tufte:1997:VEI,
      author =       "Edward R. Tufte",
      title =        "Visual Explanations: Images and Quantities, Evidence
                     and Narrative",
      publisher =    "Graphics Press",
      address =      "Box 430, Cheshire, CT 06410, USA",
      pages =        "156",
      year =         "1997",
      ISBN =         "0-9613921-2-6",
      LCCN =         "P93.5.T846 1997",
      MRnumber =     "B.Tufte.97",
      bibdate =      "Thu Aug 07 13:39:07 1997",
      price =        "US\$45.00",
      acknowledgement = ack-nhfb,
      contents =     "(not listed)",
      class =        "map2",
      keywords =     "scglib",
    }
     
    @book{robinson,
       editor = {Robinson, W. F. and Huxtable, C. R. R.},
       title = {Clinicopathologic Principles For Veterinary Medicine},
       publisher = {Cambridge University Press},
       year = {1988},
       address = {Cambridge},
    }
     
    @article{huffman,
       author = {Huffman, L. M.},
       title = {Processing whey protein for use as a food ingredient},
       journal = {Food Technology},
       year = {1996},
       volume = {50},
       number = {2},
       pages = {49-52},
    }
     
    @Article{graps,
      author = 	 {Graps, Amara L.},
      title = 	 {An Introduction to Wavelets},
      journal = 	 {IEEE Computational Sciences and Engineering},
      year = 	 {1995},
      volume = 	 {2},
      number = 	 {2},
      pages = 	 {50--61},
      note = 	 {http://www.amara.com/ftpstuff/IEEEwavelet.ps.gz}
    }
     
    @book{berkman,
       author = {Berkman, R. I.},
       title = {Find It Fast: How to Uncover Expert Information on Any Subject},
       publisher = {HarperPerennial},
       year = {1994},
       address = {New York},
    }
     
    @INBOOK{chicago,
    title = "The Chicago Manual of Style",
    publisher = "University of Chicago Press",
    edition = "Thirteenth",
    year = 1982,
    pages = "400--401",
    key = "Chicago" }
     
    @ARTICLE{testcase-percent,
      AUTHOR =       {Doe, J.},
      TITLE =        {The use of \% gives trouble},
      JOURNAL =      {Doe's Journal},
      YEAR =         {2004},
      volume =       {1},
      number =       {1},
      pages =        {1--2},
    }
     
    @INPROCEEDINGS{Gawinecki2005a,
      author = {Maciej Gawinecki and Minor Gordon and Marcin Paprzycki and Michał
    	Szymczak and Zygmunt Vetulani and Jimmy Wright},
      title = {Enabling Semantic Referencing of Selected Travel Related Resources},
      booktitle = {Proceedings of the 8 th International Conference on Business Information
    	Systems (BIS 2005)},
      year = {2005},
      pages = {271-28},
      address = {Poznań, Poland},
      publisher = {Poznań University of Economics Press},
      abstract = {This paper describes our efforts to semantically describe travelrelated
    	documents on the Internet. We focus on the areas of lodging and
    	gastronomy, with allowance for further expansion into other aspects
    	of the world of travel. Based on an analysis of currently-available
    	data, we develop hotel ontology. Furthermore, we explicitly define
    	an ontology for the Chefmoz project data, which has no official
    	schema. Finally, we sketch a way to combine these two ontologies
    	for use in an integrated travel framework.},
      owner = {maciej},
      timestamp = {2006.07.13},
      url = {http://agentlab.swps.edu.pl/BIS_2005.pdf}
    }
    Le but étant d'insérer ces données dans une base de données Mysql, avec une table par type et un champ par attribut. Le plus simple, je pense, est de le convertir d'abord en XML et de le parser ensuite pour pouvoir l'insérer facilement dans la BDD.

    J'ai déjà trouvé un script python permettant de faire la conversion BibTex -> BibTeXML, mais ce format n'est pas des plus simple à manipuler en XML... (voir mon autre sujet concernant ce problème).

  4. #4
    mmx
    mmx est déconnecté
    Membre du Club
    Inscrit en
    Janvier 2006
    Messages
    86
    Détails du profil
    Informations personnelles :
    Âge : 42

    Informations forums :
    Inscription : Janvier 2006
    Messages : 86
    Points : 47
    Points
    47
    Par défaut
    Hello,

    j'ai le même objectif. T'a fini par trouver une solution ?

  5. #5
    Expert confirmé
    Homme Profil pro
    Développeur
    Inscrit en
    Août 2003
    Messages
    1 353
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 38
    Localisation : France, Charente Maritime (Poitou Charente)

    Informations professionnelles :
    Activité : Développeur

    Informations forums :
    Inscription : Août 2003
    Messages : 1 353
    Points : 4 388
    Points
    4 388
    Par défaut
    j'ai aussi besoin de réaliser en C# pour Silverlight. As tu quelque chose ?

Discussions similaires

  1. Réponses: 4
    Dernier message: 23/08/2014, 13h12
  2. Récuperer les données d'un fichier txt pour les insérer dans une Table
    Par sandokhane dans le forum Bases de données
    Réponses: 47
    Dernier message: 31/05/2014, 15h10
  3. Réponses: 5
    Dernier message: 11/06/2012, 13h58
  4. Réponses: 2
    Dernier message: 20/07/2008, 11h29
  5. Réponses: 4
    Dernier message: 22/05/2007, 14h42

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo