Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hdoc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Stephane Crozat
hdoc
Commits
16fe948d
Commit
16fe948d
authored
Jan 09, 2017
by
Vincent Keller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update hdoc_to_elasticsearch READ.ME. Check if input directory is empty
parent
dbe218e9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
20 deletions
+62
-20
hdoc_to_elasticSearch/README.md
hdoc_to_elasticSearch/README.md
+8
-1
hdoc_to_elasticSearch/hdoc_to_elasticsearch.ant
hdoc_to_elasticSearch/hdoc_to_elasticsearch.ant
+34
-15
hdoc_to_elasticSearch/logstash/input/.gitkeep
hdoc_to_elasticSearch/logstash/input/.gitkeep
+0
-0
opale_to_elasticSearch/opale_to_elasticsearch.ant
opale_to_elasticSearch/opale_to_elasticsearch.ant
+20
-4
No files found.
hdoc_to_elasticSearch/README.md
View file @
16fe948d
...
...
@@ -16,4 +16,11 @@ Hdoc to ElasticSearch module extract data from an Hdoc file to use it with Elast
## Dependence
-------------
No depedencies
\ No newline at end of file
No depedencies
##Utilisation
-------------
Pour utiliser ce convertisseur, veuillez suivre les étapes suivantes :
1 - Placer le(s) fichier(s) hdoc que vous souhaitez convertir dans le dossier input (des exemples sont fournis dans le dossier sample).
2 - Lancer l'un des executable run.bat ou run.sh en fonction du système d'exploitation de votre ordinateur.
3 - Récupérer le(s) résultat(s) dans le dossier output.
\ No newline at end of file
hdoc_to_elasticSearch/hdoc_to_elasticsearch.ant
View file @
16fe948d
<project name="hdoc_to_elasticsearch" default="
clea
n">
<project name="hdoc_to_elasticsearch" default="
executeTransformatio
n">
<!-- Use contribant -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
...
...
@@ -27,32 +27,51 @@
<echo message="JSON File creation" />
<xslt in="${tmpHdoc}/${fileToParseName}/content.xml" out="${outputPath}/${fileToParseName}.json" style="xsl/content_extractor.xsl"/>
</target>
</target>
<!-- Check if input directory is empty -->
<target name="check.dir">
<fileset dir="${inputPath}" id="fileset">
<include name="*.hdoc"/>
</fileset>
<pathconvert refid="fileset" property="dir.contains-files" setonempty="false"/>
</target>
<!-- Parcours la liste des fichiers pour les transformer -->
<target name="targetAllFiles">
<!-- Use converter on all files in input -->
<target name="targetAllFiles" depends="check.dir" if="dir.contains-files">
<delete>
<fileset dir="${outputPath}">
<include name="*.json"/>
</fileset>
</delete>
<foreach target="jsonFiles" param="fileToParse">
<fileset dir="${inputPath}">
<include name="*.hdoc"/>
</fileset>
<path id="hdocFiles">
<fileset dir="${inputPath}">
<include name="*.hdoc"/>
</fileset>
</path>
</foreach>
</target>
<!-- Clear tmp files -->
<target name="clean" depends="targetAllFiles">
<echo message="Clean files" />
<!-- -->
<!-- Clear tmp files -->
<delete includeemptydirs="true" verbose="true">
<fileset dir="${tmpHdoc}"> </fileset>
<dirset dir="${tmpHdoc}" includes="**/*" />
</delete>
<echo message="Conversion end" />
</target>
<!-- Tell user that he needs to provide input -->
<target name="noFileToUse" depends="check.dir" unless="dir.contains-files">
<delete>
<fileset dir="${outputPath}">
<include name="*.json"/>
</fileset>
</delete>
<echo message="You need to provide file in input directory." />
</target>
<!-- Main target -->
<target name="executeTransformation" depends="targetAllFiles, noFileToUse">
<echo message="End transformation" />
</target>
</project>
...
...
hdoc_to_elasticSearch/logstash/input/.gitkeep
deleted
100644 → 0
View file @
dbe218e9
opale_to_elasticSearch/opale_to_elasticsearch.ant
View file @
16fe948d
...
...
@@ -8,10 +8,17 @@
</taskdef>
<property file="build.properties"/>
<!-- Parcours la liste des fichiers pour les transformer -->
<target name="targetAllFiles">
<!-- Check if input directory is empty -->
<target name="check.dir">
<fileset dir="${inputPath}" id="fileset">
<include name="*.scar"/>
</fileset>
<pathconvert refid="fileset" property="dir.contains-files" setonempty="false"/>
</target>
<!-- Use converter on all files in input -->
<target name="targetAllFiles" depends="check.dir" if="dir.contains-files">
<delete>
<fileset dir="${outputPath}">
<include name="*.json"/>
...
...
@@ -35,9 +42,18 @@
</target>
<!-- Tell user that he needs to provide input -->
<target name="noFileToUse" depends="check.dir" unless="dir.contains-files">
<delete>
<fileset dir="${outputPath}">
<include name="*.json"/>
</fileset>
</delete>
<echo message="You need to provide file in input directory." />
</target>
<!-- Clear tmp files -->
<target name="clean" depends="targetAllFiles
">
<target name="clean" depends="targetAllFiles
, noFileToUse" if="dir.contains-files">
<echo message="Clean files" />
<!-- -->
<delete includeemptydirs="true" verbose="true">
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment