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
93d733a9
Commit
93d733a9
authored
Dec 07, 2015
by
Jean Vintache
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ant build processes only one file, which must be located in the input folder and named pad.html
parent
02bb24fa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
29 deletions
+39
-29
etherpad_to_hdoc/antce/build.properties
etherpad_to_hdoc/antce/build.properties
+3
-5
etherpad_to_hdoc/antce/myantce.ant
etherpad_to_hdoc/antce/myantce.ant
+28
-24
etherpad_to_hdoc/antce/xsl/html2xhtml.xsl
etherpad_to_hdoc/antce/xsl/html2xhtml.xsl
+8
-0
No files found.
etherpad_to_hdoc/antce/build.properties
View file @
93d733a9
emplacement_hdoc
=
./to_zip
rootfile
=
./content.xml
output_xml
=
./to_zip/content.xml
in
=
${basedir}/input
out
=
${basedir}/output
tmp
=
${basedir}/tmp
xsl
=
${basedir}/xsl
lib
=
${basedir}/lib
log
=
${basedir}/log
\ No newline at end of file
log
=
${basedir}/log
rootfilename
=
content.xml
\ No newline at end of file
etherpad_to_hdoc/antce/myantce.ant
View file @
93d733a9
...
...
@@ -2,46 +2,50 @@
<project
basedir=
"."
name=
"myantce"
default=
"main"
>
<property
file=
"build.properties"
/>
<delete
dir=
"${tmp}"
failonerror=
"false"
/>
<mkdir
dir=
"${tmp}"
/>
<delete
dir=
"${out}"
failonerror=
"false"
/>
<mkdir
dir=
"${out}"
/>
<delete
dir=
"${log}"
failonerror=
"false"
/>
<mkdir
dir=
"${log}"
/>
<target
name=
"start"
>
<delete
dir=
"${tmp}"
failonerror=
"false"
/>
<mkdir
dir=
"${tmp}"
/>
<delete
dir=
"${out}"
failonerror=
"false"
/>
<mkdir
dir=
"${out}"
/>
<delete
dir=
"${log}"
failonerror=
"false"
/>
<mkdir
dir=
"${log}"
/>
</target>
<target
name=
"clean-tmp"
>
<delete
dir=
"${tmp}"
failonerror=
"false"
/>
<mkdir
dir=
"${tmp}"
/>
</target>
<!-- Apply Xslt -->
<target
name=
"tranformation"
>
<xslt
in=
"${xsl}/etherpad2hdoc.xsl"
out=
"${out}/etherpad.xml"
style=
"${xsl}/etherpad2hdoc.xsl"
/>
<target
name=
"apply-xslt"
>
<xslt
in=
"${in}/pad.html"
out=
"${tmp}/tmpPad.xhtml"
style=
"${xsl}/html2xhtml.xsl"
/>
<xslt
in=
"${tmp}/tmpPad.html"
out=
"${tmp}/content.xml"
style=
"${xsl}/xhtml2hdoc.xsl"
/>
</target>
<!-- Builds Hdoc structure -->
<target
name=
"construct_hdoc"
>
<delete
dir=
"${emplacement_hdoc}"
failonerror=
"false"
/>
<mkdir
dir=
"${emplacement_hdoc}"
/>
<mkdir
dir=
"${emplacement_hdoc}/META-INF"
/>
<touch
file=
"${emplacement_hdoc}/META-INF/container.xml"
/>
<touch
file=
"${emplacement_hdoc}/mimetype"
/>
<echo
message=
"application/x-hdoc+zip"
file=
"${emplacement_hdoc}/mimetype"
/>
</target>
<!-- Fill Hdoc container -->
<target
name=
"fill_container"
depends=
"construct_hdoc"
>
<echoxml
file=
"${emplacement_hdoc}/META-INF/container.xml"
>
<mkdir
dir=
"${tmp}/META-INF"
/>
<!-- container -->
<touch
file=
"${tmp}/META-INF/container.xml"
/>
<echoxml
file=
"${tmp}/META-INF/container.xml"
>
<container
version=
"1.0"
>
<rootfiles>
<rootfile
full-path=
"${rootfile}"
media-type=
"text/xml"
/>
<rootfile
full-path=
"${rootfile
name
}"
media-type=
"text/xml"
/>
</rootfiles>
</container>
</echoxml>
<!-- mimetype -->
<touch
file=
"${tmp}/mimetype"
/>
<echo
message=
"application/x-hdoc+zip"
file=
"${tmp}/mimetype"
/>
</target>
<!-- Zip Hdoc container -->
<target
name=
"zip"
>
<zip
basedir=
"${
emplacement_hdoc}"
destfile=
"outputHdoc
.hdoc"
/>
<zip
basedir=
"${
tmp}"
destfile=
"${out}/output
.hdoc"
/>
</target>
<target
name=
"main"
depends=
"tranformation,fill_container,zip"
>
</target>
<target
name=
"main"
depends=
"start,apply-xslt,construct_hdoc,zip"
/>
</project>
\ No newline at end of file
etherpad_to_hdoc/antce/xsl/html2xhtml.xsl
View file @
93d733a9
...
...
@@ -4,4 +4,12 @@
exclude-result-prefixes=
"xs"
version=
"2.0"
>
<xsl:output
method=
"xml"
indent=
"yes"
/>
<!-- identity -->
<xsl:template
match=
"@*|node()"
>
<xsl:copy>
<xsl:apply-templates
select=
"@*|node()"
/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
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