a.binder 9 лет назад
Родитель
Сommit
7bacfa749b

+ 21 - 27
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-druk/build.xml

@@ -1,63 +1,54 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project basedir="." name="PRINT_TEMPLATE" default="buildpdf">
+    
+    
+    
     <!-- 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      
+    />
     -->
-
+    
+    
+ 
     <property name="uuid" value="${uuid}"/>
     <property name="passwordBase64Basic" value="${passwordBase64Basic}"/>
     <property name="url" value="${url}"/>
-    
+    <property name="DwebRootUrl" value="${$webRootUrl}"/>
     
     
     <tempfile property="out_task.dita" deleteonexit="no"  destdir="temp"/>
     <tempfile property="wfs_output" deleteonexit="no"  destdir="temp"  />
 
-
-    <!--<if>
-        <available file="${INPUT}" type="file" />
-    </if>-->
-
-
-     <target name="get_related_feature">
+    <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="RESULT__START"/>
-        <echo message="${wfs_result}"/>
-        <echo message="RESULT__END"/>-->
         
         <echo message="ERROR__START"/>
         <echo message="${wfs_error}"/>
         
-         
-         <echo> gues path of pdf is </echo>
-         <exec  executable="bash" dir="." outputproperty="url_of_current_script">
+        <echo> gues path of pdf is </echo>
+        <exec  executable="bash" dir="." outputproperty="url_of_current_script">
              <arg value="-c"/>
              <arg value="echo &quot;${url}&quot; |sed 's/[a-zA-Z0-9]*.php.*//'"/>
-         </exec>
-         <echo message="ERROR__END"/>
-        
-        
-        
-        <!--<echo file="${wfs_output}" output="${wfs_output}"/>-->
-        
+        </exec>
+        <echo message="ERROR__END"/>
     </target>
 
 
@@ -101,6 +92,9 @@
         <echo message="OUTPUT__START"/>        
         <echo> url = ${url} 
         </echo>
+        <echo>
+            &lt;br&gt;Wygenerowano druk pdf - sciagnij go &lt;a href=&quot;${$webRootUrl}/out/${out_task_file}.pdf&quot;&gt; out/${out_task_file}.pdf&lt;/a&gt;&lt;/br&gt; 
+        </echo>
         <echo>
             &lt;br&gt;Wygenerowano druk pdf - sciagnij go &lt;a href=&quot;https://biuro.biall-net.pl/SE/version-git/schema/ant-url_action/default_db.in7_dziennik_koresp/test-druk/out/${out_task_file}.pdf&quot;&gt; out/${out_task_file}.pdf&lt;/a&gt;&lt;/br&gt; 
         </echo>