|
@@ -1,250 +0,0 @@
|
|
|
-<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
-<project basedir="." name="PRINT_TEMPLATE" default="buildpdf_recursed" >
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <!-- Przykładowe wyzwolenie z bash :
|
|
|
|
|
- cat input.xml | /Library/Server/Web/Data/Sites/Default/SE/stuff/dita-ot-2.3.3/bin/ant -buildfile ild__IN7_DZIENNIK_KORESP.xml
|
|
|
|
|
- na output mamy pdf'a
|
|
|
|
|
- -->
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <!-- https://biuro.biall-net.pl/SE/version-git/index.php?_route=UrlAction_Ant&_task=ant&path=default_db.in7_dziennik_koresp/test-druk&namespace=p5_default_db:IN7_DZIENNIK_KORESP&featureID=59682 -->
|
|
|
|
|
- <!-- default procesy5 sample template is file:/SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-get-wfs-xml/build.xml-->
|
|
|
|
|
- <!-- sample URL which call this exact variables in this ANT build -->
|
|
|
|
|
- <!-- przykladowy URL ktory przekazuje parametry do tego ANT -->
|
|
|
|
|
- <!--https://biuro.biall-net.pl/SE/version-git/index.php?_route=UrlAction_Ant&_task=ant&
|
|
|
|
|
- path=${default_db.in7_dziennik_koresp/test-get-wfs-xml} - this is the place to keep ant build (directory name with build.xml)
|
|
|
|
|
- &namespace=p5_default_db:Rozdzielcza_test_bzyk_PE&featureID=123 - this is setting the
|
|
|
|
|
- <property name="url" value="${url}"/> - to point what is record/table to download
|
|
|
|
|
- <property name="uuid" value="${uuid}"/> it is automatically also set to enable uinque transaction and to allow to save data with user
|
|
|
|
|
- <property name="passwordBase64Basic" value="${passwordBase64Basic}"/> - this is also set - to enable communicate with API -
|
|
|
|
|
- <property name="DwebRootUrl" value="${$webRootUrl}"/> - this is the place where script is localized to easyli to target user GUI by href to generated output
|
|
|
|
|
- />
|
|
|
|
|
- -->
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <!---DpasswordBase64Basic="xxxx=="
|
|
|
|
|
- -DtypeName="p5_default_db:IN7_DZIENNIK_KORESP"
|
|
|
|
|
- -Dxpath=ID -Dxpath_value=1000
|
|
|
|
|
- -Duuid=1 -DwebRootUrl=somePathDir-->
|
|
|
|
|
- <property name="temp" value="temp"/> <!-- temp files-->
|
|
|
|
|
- <property name="out" value="out"/> <!-- output ready files like pdf -->
|
|
|
|
|
-
|
|
|
|
|
- <property name="uuid" value="${uuid}"/> <!--TODO-->
|
|
|
|
|
- <property name="passwordBase64Basic" value="${passwordBase64Basic}"/>
|
|
|
|
|
- <property name="url" value="${url}"/>
|
|
|
|
|
- <property name="webRootUrl" value="${$webRootUrl}"/>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <property name="api_url" value="https://biuro.biall-net.pl/SE/version-git/wfs-data.php"/>
|
|
|
|
|
- <property name="namespace_prefix" value="p5_default_db"/> <!-- ex: p5_default_db to complete after p5_default_db:IN7_DZIENNIK_KORESP -->
|
|
|
|
|
- <property name="typeName" value="${typeName}"/> <!-- to be set initially ex: p5_default_db:IN7_DZIENNIK_KORESP - be careful not to give it in apostrophs like 'p5_default_db:IN7_DZIENNIK_KORESP' - it wont work! -->
|
|
|
|
|
- <property name="xpath" value="${xpath}"/> <!-- to be set initially like as key to search ID -->
|
|
|
|
|
- <property name="xpath_value" value="${xpath_value}"/> <!-- to be set initially like 1000 (to search ID=1000, if ID we get by featureID -->
|
|
|
|
|
-
|
|
|
|
|
- <!-- variables to first transform of doc for then get related features -->
|
|
|
|
|
- <property name="default_db_xml_cache.public" value="../../../default_db_xml_cache.public"/> <!-- katalog z xsl z projektu src-xmlschema.git -->
|
|
|
|
|
- <property name="build_recurse_ant.xsl" value="${default_db_xml_cache.public}/build_recurse_ant.xsl"/>
|
|
|
|
|
- <property name="build_recurse_ant_merge_dita_from_temp.xsl" value="${default_db_xml_cache.public}/build_recurse_ant_merge_dita_from_temp.xsl"/>
|
|
|
|
|
- <property name="builds_to_ant.xsl" value="${default_db_xml_cache.public}/builds_to_ant.xsl"/>
|
|
|
|
|
- <property name="main_build_recurse_ant.dita" value="main_build_recurse_ant.dita"/>
|
|
|
|
|
- <property name="main_build_recurse_ant.dita_with_id" value="${temp}/${main_build_recurse_ant.dita}.with_id.xml"/>
|
|
|
|
|
- <property name="main_build_recurse_ant.dita_with_id.xsl" value="${default_db_xml_cache.public}/main_build_recurse_ant.dita_with_id.xsl"/>
|
|
|
|
|
- <!--<tempfile property="uuid" deleteonexit="yes"/>-->
|
|
|
|
|
- <tempfile property="out_task.dita" deleteonexit="no" destdir="temp"/>
|
|
|
|
|
- <tempfile property="out_task.dita.final" deleteonexit="no" destdir="temp"/>
|
|
|
|
|
- <!--<tempfile property="wfs_output" deleteonexit="no" destdir="temp" suffix=".xml" />-->
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <target name="install_folders">
|
|
|
|
|
- <mkdir dir="${temp}"/>
|
|
|
|
|
- <mkdir dir="${out}"/>
|
|
|
|
|
- <chmod dir="${temp}" perm="ugo+rwx"/>
|
|
|
|
|
- <chmod dir="${out}" perm="ugo+rwx"/>
|
|
|
|
|
- </target>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <target name="main_build_recurse_ant.dita_with_id">
|
|
|
|
|
- <xslt basedir="./" style="${main_build_recurse_ant.dita_with_id.xsl}" in="${main_build_recurse_ant.dita}" destdir="./" out="${main_build_recurse_ant.dita_with_id}" >
|
|
|
|
|
- <factory name="net.sf.saxon.TransformerFactoryImpl">
|
|
|
|
|
- <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
|
|
|
|
|
- </factory>
|
|
|
|
|
- <classpath location="/opt/local/share/java/saxon9he.jar"/>
|
|
|
|
|
- </xslt>
|
|
|
|
|
- </target>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <target name="clean_temp_dir" description="URL_TASK Target clean_temp_dir">
|
|
|
|
|
- <delete>
|
|
|
|
|
- <fileset dir="${temp}"/>
|
|
|
|
|
- </delete>
|
|
|
|
|
- </target>
|
|
|
|
|
-
|
|
|
|
|
- <!-- wygenerowanie ant builda do sciagniecia niezbednego elementu na podstawie template main.dita i tam zagniezdzonego RelatedFeature-->
|
|
|
|
|
- <target name="build_recurse_ant.xml" depends="main_build_recurse_ant.dita_with_id">
|
|
|
|
|
- <!-- build do wytworzenia pierwszego przetworzenia zagniezdzen -->
|
|
|
|
|
-
|
|
|
|
|
- <record name="${temp}/ant.log" loglevel="verbose" append="true"/>
|
|
|
|
|
- <property name="loop_xpath" value="root"/>
|
|
|
|
|
- <property name="build_recurse_ant.xml" value="${temp}/${uuid}.build_${loop_xpath}.xml"/>
|
|
|
|
|
- <!--<delete file="${build_recurse_ant.xml}"/>-->
|
|
|
|
|
- <xslt basedir="./" style="${build_recurse_ant.xsl}" in="${main_build_recurse_ant.dita_with_id}" destdir="./" out="${build_recurse_ant.xml}" >
|
|
|
|
|
- <factory name="net.sf.saxon.TransformerFactoryImpl">
|
|
|
|
|
- <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
|
|
|
|
|
- </factory>
|
|
|
|
|
- <classpath location="/opt/local/share/java/saxon9he.jar"/>
|
|
|
|
|
-
|
|
|
|
|
- <param name="build_recurse_ant.xsl" expression="${build_recurse_ant.xsl}"/>
|
|
|
|
|
- <param name="passwordBase64Basic" expression="${passwordBase64Basic}"/>
|
|
|
|
|
- <param name="url" expression="${url}" />
|
|
|
|
|
- <param name="webRootUrl" expression="${webRootUrl}" />
|
|
|
|
|
- <param name="main_build_recurse_ant.dita" expression="${main_build_recurse_ant.dita_with_id}"/>
|
|
|
|
|
- <param name="uuid" expression="${uuid}"/>
|
|
|
|
|
-
|
|
|
|
|
- <!--<param name="out_task.dita" expression="${out_task.dita}"/>-->
|
|
|
|
|
- <!--<param name="wfs_output" expression=""/>-->
|
|
|
|
|
-
|
|
|
|
|
- <param name="api_url" expression="${api_url}"/>
|
|
|
|
|
- <!--<param name="namespace_prefix" expression="${namespace_prefix}"/>-->
|
|
|
|
|
- <param name="typeName" expression="${typeName}"/>
|
|
|
|
|
- <param name="xpath" expression="${xpath}"/> <!-- to be set initially like as key to search ID -->
|
|
|
|
|
- <param name="xpath_value" expression="${xpath_value}"/> <!-- to be set initially like 1000 (to search ID=1000, if ID we get by featureID -->
|
|
|
|
|
- <param name="loop_xpath" expression="root"/><!-- xpath sciezki przetwarzania xmla -->
|
|
|
|
|
- <param name="loop_xpath_save" expression="${loop_xpath}"/>
|
|
|
|
|
- <param name="current_leaf.dita" expression="${main_build_recurse_ant.dita_with_id}"/>
|
|
|
|
|
- <param name="basedir" expression="${basedir}"/>
|
|
|
|
|
- <param name="build_recurse_ant.xsl" expression="${build_recurse_ant.xsl}"/>
|
|
|
|
|
- <param name="temp" expression="${temp}"/>
|
|
|
|
|
- <param name="builds_to_ant.xsl" expression="${builds_to_ant.xsl}"/>
|
|
|
|
|
- </xslt>
|
|
|
|
|
- <!--<import file="${build_recurse_ant.xml}"/>-->
|
|
|
|
|
- <ant antfile="${build_recurse_ant.xml}" dir="."/>
|
|
|
|
|
- <!-- pozbierac wszystkie do kupy xmle -->
|
|
|
|
|
- </target>
|
|
|
|
|
-
|
|
|
|
|
- <target name="build_recurse_ant_merge_dita_from_temp.xsl" depends="build_recurse_ant.xml" description="z plikow temp/$uuid.* buduje $out_task.dita.final ">
|
|
|
|
|
- <xslt basedir="./" style="${build_recurse_ant_merge_dita_from_temp.xsl}" in="${main_build_recurse_ant.dita_with_id}" destdir="./" out="${out_task.dita.final}" >
|
|
|
|
|
- <factory name="net.sf.saxon.TransformerFactoryImpl">
|
|
|
|
|
- <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
|
|
|
|
|
- </factory>
|
|
|
|
|
- <classpath location="/opt/local/share/java/saxon9he.jar"/>
|
|
|
|
|
- <!--<param name="webRootUrl" expression="${webRootUrl}" />-->
|
|
|
|
|
- <!--<param name="main_build_recurse_ant.dita" expression="${main_build_recurse_ant.dita}"/>-->
|
|
|
|
|
- <param name="uuid" expression="${uuid}"/>
|
|
|
|
|
- <param name="basedir" expression="${basedir}"/>
|
|
|
|
|
- <param name="temp" expression="${temp}"/>
|
|
|
|
|
- </xslt>
|
|
|
|
|
- <echo> zapisalem plik gotowy do utworzenia dita do ${out_task.dita}. </echo>
|
|
|
|
|
- </target>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <!--<target name="get_related_feature">
|
|
|
|
|
- <exec executable="curl" output="${wfs_output}" errorproperty="wfs_error" resultproperty="wfs_result">
|
|
|
|
|
- <arg line="-H 'Authorization: Basic ${passwordBase64Basic}' ${url}"/>
|
|
|
|
|
- </exec>
|
|
|
|
|
- <echo message="curl -H 'Authorization: Basic ${passwordBase64Basic}' '${url}'"/>
|
|
|
|
|
-
|
|
|
|
|
- <echo message="ERROR__START"/>
|
|
|
|
|
- <echo message="${wfs_error}"/>
|
|
|
|
|
- <echo> gues path of pdf is </echo>
|
|
|
|
|
- <exec executable="bash" dir="." outputproperty="url_of_current_script">
|
|
|
|
|
- <arg value="-c"/>
|
|
|
|
|
- <arg value="echo "${url}" |sed 's/[a-zA-Z0-9]*.php.*//'"/>
|
|
|
|
|
- </exec>
|
|
|
|
|
- <echo message="ERROR__END"/>
|
|
|
|
|
-
|
|
|
|
|
- </target>-->
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <target name="buildpdf_recursed" depends="build_recurse_ant_merge_dita_from_temp.xsl">
|
|
|
|
|
-
|
|
|
|
|
- <property name="dita.dir" location="/Library/Server/Web/Data/Sites/Default/SE/stuff/dita-ot-2.3.3/bin/dita"/>
|
|
|
|
|
- <exec executable="${dita.dir}" dir=".">
|
|
|
|
|
- <arg value="-i"/>
|
|
|
|
|
- <arg value="${out_task.dita.final}" />
|
|
|
|
|
- <!-- <arg value="-t" />
|
|
|
|
|
- <arg value="temp" />-->
|
|
|
|
|
- <arg value="-f" />
|
|
|
|
|
- <arg value="pdf"/>
|
|
|
|
|
- <arg value="-o"/>
|
|
|
|
|
- <arg value="out"/>
|
|
|
|
|
- </exec>
|
|
|
|
|
- <exec executable="bash" dir="." outputproperty="out_task_file">
|
|
|
|
|
- <arg value="-c"/>
|
|
|
|
|
- <arg value="echo ${out_task.dita.final} |sed 's/^.*\///'"/>
|
|
|
|
|
- </exec>
|
|
|
|
|
- <echo message="OUTPUT__START"/>
|
|
|
|
|
- <!--<echo> url = ${url}
|
|
|
|
|
- </echo>-->
|
|
|
|
|
- <!--<echo> passwordBase64Basic = ${passwordBase64Basic}
|
|
|
|
|
- </echo>-->
|
|
|
|
|
- <!--<echo> $webRootUrl = ${webRootUrl}
|
|
|
|
|
- </echo>-->
|
|
|
|
|
- <!--<echo> $wfs_output = ${wfs_output}
|
|
|
|
|
- </echo>-->
|
|
|
|
|
- <echo>
|
|
|
|
|
- <br>Wygenerowano druk pdf - sciagnij go <a href="${webRootUrl}/out/${out_task_file}.pdf"> "${webRootUrl}/out/${out_task_file}.pdf</a></br>
|
|
|
|
|
- </echo>
|
|
|
|
|
- <echo>
|
|
|
|
|
- <br>Dodaj do korespondencji (W przygotowaniu)</br>
|
|
|
|
|
- </echo>
|
|
|
|
|
- <echo>
|
|
|
|
|
- <br>Wyślij do adresatów emailem (W przygotowaniu)</br>
|
|
|
|
|
- </echo>
|
|
|
|
|
- <echo>
|
|
|
|
|
- <br>Umieść swój podpis graficzny (W przygotowaniu)</br>
|
|
|
|
|
- </echo>
|
|
|
|
|
- <echo message="OUTPUT__END"/>
|
|
|
|
|
- </target>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <!--<target name="buildpdf" depends="get_related_feature">
|
|
|
|
|
- <xslt basedir="./" style="IN7_DZIENNIK_KORESP.xsl" in="${wfs_output}" destdir="./" out="${out_task.dita.final}" >
|
|
|
|
|
- <factory name="net.sf.saxon.TransformerFactoryImpl">
|
|
|
|
|
- <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
|
|
|
|
|
- <!-\-<attribute name="http://saxon.sf.net/feature/initialMode" value="PROCES_INCLUDE"/>-\->
|
|
|
|
|
- <!-\-<attribute name="http://saxon.sf.net/feature/initialTemplate" value="Types__x3A__xlsx__x3A__main"/>-\->
|
|
|
|
|
- </factory>
|
|
|
|
|
- <classpath location="/opt/local/share/java/saxon9he.jar"/>
|
|
|
|
|
- <param name="dita_task_template_file_param" expression="main.dita"/>
|
|
|
|
|
- </xslt>
|
|
|
|
|
- <property name="dita.dir" location="/Library/Server/Web/Data/Sites/Default/SE/stuff/dita-ot-2.3.3/bin/dita"/>
|
|
|
|
|
- <exec executable="${dita.dir}" dir=".">
|
|
|
|
|
- <arg value="-i"/>
|
|
|
|
|
- <arg value="${out_task.dita}" />
|
|
|
|
|
- <arg value="-f" />
|
|
|
|
|
- <arg value="pdf"/>
|
|
|
|
|
- <arg value="-o"/>
|
|
|
|
|
- <arg value="out"/>
|
|
|
|
|
- </exec>
|
|
|
|
|
- <exec executable="bash" dir="." outputproperty="out_task_file">
|
|
|
|
|
- <arg value="-c"/>
|
|
|
|
|
- <arg value="echo ${out_task.dita} |sed 's/^.*\///'"/>
|
|
|
|
|
- </exec>
|
|
|
|
|
- <echo message="OUTPUT__START"/>
|
|
|
|
|
- <!-\-<echo> url = ${url}
|
|
|
|
|
- </echo>-\->
|
|
|
|
|
- <!-\-<echo> passwordBase64Basic = ${passwordBase64Basic}
|
|
|
|
|
- </echo>-\->
|
|
|
|
|
- <!-\-<echo> $webRootUrl = ${webRootUrl}
|
|
|
|
|
- </echo>-\->
|
|
|
|
|
- <!-\-<echo> $wfs_output = ${wfs_output}
|
|
|
|
|
- </echo>-\->
|
|
|
|
|
- <echo>
|
|
|
|
|
- <br>Wygenerowano druk pdf - sciagnij go <a href="${webRootUrl}/out/${out_task_file}.pdf"> "${webRootUrl}/out/${out_task_file}.pdf</a></br>
|
|
|
|
|
- </echo>
|
|
|
|
|
- <echo>
|
|
|
|
|
- <br>Dodaj do korespondencji (W przygotowaniu)</br>
|
|
|
|
|
- </echo>
|
|
|
|
|
- <echo>
|
|
|
|
|
- <br>Wyślij do adresatów emailem (W przygotowaniu)</br>
|
|
|
|
|
- </echo>
|
|
|
|
|
- <echo>
|
|
|
|
|
- <br>Umieść swój podpis graficzny (W przygotowaniu)</br>
|
|
|
|
|
- </echo>
|
|
|
|
|
- <echo message="OUTPUT__END"/>
|
|
|
|
|
- </target>-->
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-</project>
|
|
|