Pages: 1
Print
Author Topic: How to get specific sources  (Read 1732 times)
rja
Member

Posts: 1


« on: June 12, 2012, 07:58:18 AM »

Hey,

All my sources are located in one map. But when I publish a ditamap, I only want to have the sources from that ditamap in the output directory. I have seen that this is possible with images in the imagelist.

Part of my code is displayed below (build_preprocess)

<target name="test-sources">
    <dirname property="dita.input.filename.dir" file="${args.input}"/>
    <property name="sourcesdir-basename" value="sources"/>
    <property name="sources.input.dir" value="${dita.input.filename.dir}${file.separator}${sourcesdir-basename}"/>
    <available file="${sources.input.dir}" type="dir" property="sourcesdir-available"/>
    <echo>target test-sources, args.input=${args.input}, dita.input.filename.dir=${dita.input.filename.dir}, sources.input.dir=${sources.input.dir}, sourcesdir-available=${sourcesdir-available}</echo>
  </target>
 
  <target name="copy-sources" if="sourcesdir-available">
    <echo>Copying files from directory sources...</echo>
    <copy todir="${output.dir}${file.separator}${sourcesdir-basename}" overwrite="true" verbose="true">
      <fileset dir="${sources.input.dir}" includes="**/*" casesensitive="no"/>
    </copy>
  </target>
 
 <target name="copy-files"
    depends="copy-sources, debug-filter,copy-image, copy-html, copy-flag, copy-subsidiary, copy-generated-files">
  </target>

<target name="copy-image" unless="noImagelist"
    description="Copy image files">
    <copy todir="${output.dir}">
      <fileset dir="${user.input.dir}" includes="${imagelist}" casesensitive="no"/>
    </copy>
  </target>

I see in the dita.list file that the copytosourcelist= is not filled in. Probably this is part of the solution.

Who can help me?

Rick
Logged
Pages: 1
Print
Jump to:  

email us