-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
44 lines (32 loc) · 1.48 KB
/
build.xml
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
<project name="all" default="convert">
<property environment="env" />
<property name="input.file" value="ics.html" />
<property name="temp.file" value="ics.xml" />
<property name="output.file" value="ics.csv" />
<target name="convert" >
<copy file="${input.file}" tofile="${temp.file}" />
<replaceregexp file="${temp.file}" replace="">
<regexp pattern="<!DOCTYPE (.*)>"/>
</replaceregexp>
<replaceregexp file="${temp.file}" replace="<html>">
<regexp pattern="<html(.*)>"/>
</replaceregexp>
<replaceregexp file="${temp.file}" replace="" byline="false">
<regexp pattern="<head>(.*)</head>"/>
</replaceregexp>
<replace file="${temp.file}" token="<br>" value="<br/>" />
<replace file="${temp.file}" token="&nbsp;" value=" " />
<replace file="${temp.file}" token="&euml;" value="e" />
<replace file="${temp.file}" token="&iuml;" value="i" />
<replace file="${temp.file}" token="&oacute;" value="o" />
<replace file="${temp.file}" token="<hr>" value="<hr/>" />
<replaceregexp file="${temp.file}" match="<td>(.*)&(.*)" replace="<td>\1&amp;\2" byline="true" />
<xslt in="${temp.file}" out="${output.file}"
style="icscards.xsl" force="true" />
<concat destfile="ics.txt" append="true">
<filelist dir="." files="${output.file}"/>
</concat>
<delete file="${temp.file}" />
<delete file="${output.file}" />
</target>
</project>