Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephane Crozat
hdoc
Commits
ced15ba7
Commit
ced15ba7
authored
Dec 29, 2016
by
Tyrannas
Browse files
support multiFichiers opale_to_hdoc
parent
00cab33c
Changes
3
Hide whitespace changes
Inline
Side-by-side
hdoc_to_neo4j/hdoc_to_neo4j.ant
View file @
ced15ba7
...
...
@@ -23,12 +23,12 @@
<antcall
target=
"transformation"
>
<param
name=
"file"
value=
"${newFileName}"
/>
</antcall>
<echo>
${newFileName}
</echo>
</sequential>
</for>
<antcall
target=
"insertion"
/>
</target>
<!-- on initilialise les répertoires -->
<target
name=
"preparation"
>
<echo>
On initialise le dossier!
</echo>
<delete
dir=
"./output"
></delete>
...
...
@@ -36,11 +36,13 @@
<delete
dir=
"./input/unziped"
></delete>
<mkdir
dir=
'./input/unziped'
></mkdir>
</target>
<!-- unzip -->
<target
name=
"unZip"
>
<unzip
src=
"./input/${file}"
dest=
"./input/unziped/"
overwrite=
"false"
/>
</target>
<!-- transformation xsl -->
<target
name=
"transformation"
>
<sequential>
<xslt
in=
"./input/unziped/content.xml"
out=
"./output/${file}.cql"
style=
"./xsl/hdoc_to_neo4j.xsl"
classpath=
"./lib/saxon9he.jar"
>
...
...
@@ -51,7 +53,7 @@
</sequential>
</target>
<!-- insertion dans la base en appelant le script node si jamais la propriete node vaut true -->
<target
name=
"insertion"
if=
"wantToInsert"
>
<exec
executable=
"node"
dir=
"./node"
>
<arg
line=
"insert.js"
/>
...
...
opale_to_hdoc/opale_to_hdoc.ant
View file @
ced15ba7
<project name="ProjetOpale" default="convert">
<!-- additionnal lib -->
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="lib/ant-contrib.jar"/>
</classpath>
</taskdef>
<!-- Other properties -->
<property name="ScarPath" value="input" />
<property name="UnzipSourcePath" value="unzipSourcePath" />
<property name="XmlModuleName" value="" />
<property name="TmpPath" value="tmp" />
...
...
@@ -8,31 +16,38 @@
<property name="RacineFile" value="content.xml" />
<property name="OutputPath" value="output" />
<property name="HdocPath" value="${OutputPath}/hdoc" />
<property name="ZipPath" value="${OutputPath}/result.hdoc" />
<!-- Others properties (in another file) currently empty -->
<property file="opale_to_hdoc.properties" />
<!-- Beginning -->
<target name="convert">
<antcall target="clean" />
<antcall target="unzip_scar" />
<antcall target="check_source_xml" />
<antcall target="hdoc_structure" />
<antcall target="fusion_xml" />
<antcall target="copy_ressources"/>
<antcall target="content_xml" />
<antcall target="zip" />
<for param="filename">
<path>
<fileset dir="./input" includes="*.scar"/>
</path>
<sequential>
<var name="newFileName" unset="true"/>
<basename property="newFileName" file="@{filename}"/>
<antcall target="clean" />
<antcall target="unzip_scar">
<param name="file" value="${newFileName}"/>
</antcall>
<antcall target="check_source_xml" />
<antcall target="hdoc_structure" />
<antcall target="fusion_xml" />
<antcall target="copy_ressources"/>
<antcall target="content_xml" />
<antcall target="zip">
<param name="file" value="${newFileName}"/>
</antcall>
</sequential>
</for>
<antcall target="clean" />
</target>
<!-- Clean : delete old files -->
<target name="clean">
<!-- create folders (to be sure) -->
<mkdir dir="${UnzipSourcePath}"/>
<mkdir dir="${TmpPath}"/>
<mkdir dir="${HdocPath}"/>
<touch file="get_ressources.ant"/>
<!-- delete folders -->
<delete dir="${UnzipSourcePath}"/>
<delete dir="${TmpPath}"/>
...
...
@@ -63,11 +78,7 @@
<!-- Unzip scar source file -->
<target name="unzip_scar">
<!-- get scar file path -->
<fileset id="fileset_scar" dir="input" casesensitive="yes">
<include name="*.scar"/>
</fileset>
<pathconvert property="scar.path" pathsep="" refid="fileset_scar" />
<unzip src="${scar.path}" dest="./${UnzipSourcePath}"/>
<unzip src="${ScarPath}/${file}" dest="./${UnzipSourcePath}"/>
</target>
<!-- Create the hdoc structure -->
...
...
@@ -120,6 +131,6 @@
<!-- Zip Hdoc -->
<target name="zip">
<zip destfile="${
ZipPath}
" basedir="${HdocPath}"/>
<zip destfile="${
OutputPath}/${file}.hdoc
" basedir="${HdocPath}"/>
</target>
</project>
\ No newline at end of file
opale_to_neo4j/xsl/convert.xsl
deleted
100644 → 0
View file @
00cab33c
Write
Preview
Supports
Markdown
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