Browse Source

Ajout partie 3

Loquicom 5 years ago
parent
commit
83188c2a9a
3 changed files with 13 additions and 3 deletions
  1. 1 0
      .gitignore
  2. 11 2
      README.md
  3. 1 1
      package.json

+ 1 - 0
.gitignore

@@ -7,4 +7,5 @@ data/*.db
 data/*.gz
 data/*.dtd
 data/*.ppf
+data/*.html
 .directory

+ 11 - 2
README.md

@@ -197,11 +197,20 @@ node extract.js -n "Fabien Delorme" -o "./data/fabienDelorme.xml" -f "./data/bas
 node extract.js -n "Fabien Delorme" -o "./data/fabienDelorme.xml" -f "./data/base.xml" -v
 ```
 
-
-
 ### Temps d'exécution
 
 |                | Ubuntu (PC Fac) | Kubuntu (I5-7300HQ) | KDE Neon (I7-8550U) |
 | -------------- | :-------------: | :-----------------: | :-----------------: |
 | **Extraction** |                 |  50 à 70 secondes   |  45 à 50 secondes   |
 
+## Partie 3
+
+Pour convertir le document xml extrait en un fichier html il suffit d'utiliser la commande suivante (ou son équivalent avec npm) :
+
+```bash
+xsltproc -o out.html convert.xsl ./data/extract.xml
+# <=>
+npm run xslt
+``` 
+
+La fichier est crée dans le dossier data sous le nom de `extract.html` en utilisant la commande npm

+ 1 - 1
package.json

@@ -23,7 +23,7 @@
     "coauth": "node coauth.js --name \"Fabien Delorme\" -v",
     "extract": "node extract.js --name \"Fabien Delorme\" -v",
     "validate": "xmllint --noout --dtdvalid ./data/extract.dtd ./data/extract.xml",
-    "xslt": "xsltproc -o extract.html convert.xsl ./data/extract.xml"
+    "xslt": "xsltproc -o ./data/extract.html convert.xsl ./data/extract.xml"
   },
   "engines": {
     "node": ">=10.12.0"