Précédent   Forum des professionnels en informatique > PHP > PHP & SGBD > PHP & MySQL
PHP & MySQL Forum d'entraide sur les fonctions MySQL avec PHP. Avant de poster -> FAQ MySQL, Cours MySQL et Sources MySQL. Pour les questions concernant le moteur MySQL plutôt que les fonctions PHP, merci d'utiliser le forum MySQL.
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 02/02/2011, 12h03   #1
Invité de passage
 
Inscription : décembre 2007
Messages : 5
Détails du profil
Informations forums :
Inscription : décembre 2007
Messages : 5
Points : 1
Points : 1
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!
Samax est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 02/02/2011, 17h52   #2
Modérateur
 
Inscription : septembre 2010
Messages : 7 101
Détails du profil
Informations forums :
Inscription : septembre 2010
Messages : 7 101
Points : 8 466
Points : 8 466
t'as un exemple de fichier, et des données finales que tu voudrais avoir ?
__________________
http://blog.stealth35.com/
stealth35 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 03/02/2011, 12h07   #3
Invité de passage
 
Inscription : décembre 2007
Messages : 5
Détails du profil
Informations forums :
Inscription : décembre 2007
Messages : 5
Points : 1
Points : 1
Voilà un exemple relativement exhaustif de fichier BibTex:
Code :
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).
Samax est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 25/07/2011, 22h34   #4
mmx
Futur Membre du Club
 
Inscription : janvier 2006
Messages : 81
Détails du profil
Informations personnelles :
Âge : 29

Informations forums :
Inscription : janvier 2006
Messages : 81
Points : 19
Points : 19
Hello,

j'ai le même objectif. T'a fini par trouver une solution ?
mmx est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 07/09/2011, 15h23   #5
Membre habitué
 
Homme Sébastien
Développeur informatique
Inscription : août 2003
Messages : 252
Détails du profil
Informations personnelles :
Nom : Homme Sébastien
Âge : 25
Localisation : France

Informations professionnelles :
Activité : Développeur informatique
Secteur : Communication - Médias

Informations forums :
Inscription : août 2003
Messages : 252
Points : 120
Points : 120
j'ai aussi besoin de réaliser en C# pour Silverlight. As tu quelque chose ?
smarties est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 07h32.


 
 
 
 
Partenaires

Hébergement Web