<commit_before><!--
  Ant build file for curn

  $Id$
  ===========================================================================
  This software is released under a Berkeley-style license:

  Copyright (c) 2004 <NAME>. All rights reserved.

  Redistribution and use in source and binary forms are permitted provided
  that: (1) source distributions retain this entire copyright notice and
  comment; and (2) modifications made to the software are prominently
  mentioned, and a copy of the original software (or a pointer to its
  location) are included. The name of the author may not be used to endorse
  or promote products derived from this software without specific prior
  written permission.

  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

  Effectively, this means you can do what you want with the software except
  remove this notice or take advantage of the author's name. If you modify
  the software and redistribute your modified version, you must indicate that
  your version is a modification of the original, and you must provide either
  a pointer to or a copy of the original.

-->

<project name="curn" default="curn" basedir=".">

  <description>
This Ant build file builds the "curn" (Customizable Utilitarian RSS Notifier)
tool and its associated libraries. It can also be used to build binary,
source and documentation packages.
  </description>

  <!--
  ***************************************************************************
				Properties
  ***************************************************************************
  -->

  <!-- set global properties for this build -->

  <property name="build" location="classes"/>
  <property name="pkg.path" value="org/clapper/curn"/>
  <property name="src.top" location="src"/>
  <property name="src.dir" location="${src.top}/${pkg.path}"/>
  <property name="dist"  location="dist"/>
  <property name="build.compiler" value="jikes"/>
  <property name="build.compiler.emacs" value="true"/>
  <property name="build.info.file" 
            value="${build}/${pkg.path}/BuildInfoBundle.properties"/>
  <property name="compile.listfiles" value="no"/>
  <property name="code_jar_name" value="curn"/>
  <property name="code_jar_file" value="${code_jar_name}.jar"/>
  <property name="code_jar_dir" value="${dist}/lib"/>
  <property name="code_jar_path" value="${code_jar_dir}/${code_jar_file}"/>
  <property name="docs_top_dir" value="docs"/>
  <property name="javadocs_top_dir" value="${dist}/docs"/>
  <property name="javadocs_api_dir" value="${javadocs_top_dir}/api"/>
  <property name="zip_dir_prefix" value="curn/"/>
  <property name="release_dir" value="${dist}/release"/>

  <!--
  ***************************************************************************
			    Paths and Patterns
  ***************************************************************************
  -->

  <path id="project.class.path">
    <pathelement location="lib/"/>
    <pathelement path="${java.class.path}/"/>
    <pathelement path="classes/"/>
  </path>

  <patternset id="main.sources">
    <include name="*.java"/>
    <exclude name="parser/*/*.java"/>
    <exclude name="parser/*.java"/>
  </patternset>

  <patternset id="parser.main">
    <include name="parser/*.java"/>
    <exclude name="parser/*/*.java"/>
    <exclude name="parser/tester.java"/>
  </patternset>

  <patternset id="parser.builtin">
    <include name="parser/minirss/*.java"/>
  </patternset>

  <patternset id="parser.informa">
    <include name="parser/informa/*.java"/>
  </patternset>

  <patternset id="parser.testers">
    <include name="parser/tester.java"/>
  </patternset>

  <patternset id="htmloutput">
    <include name="htmloutput/*.java"/>
  </patternset>

  <patternset id="email">
    <include name="email/*.java"/>
  </patternset>

  <!--
  ***************************************************************************
			  Initialization Targets
  ***************************************************************************
  -->

  <target name="init">
    <!-- Create the time stamp -->
    <tstamp>
      <format property="build.date" pattern="dd MMMM, yyyy HH:mm:ss z"
              locale="en"/>
    </tstamp>
    <!-- Create the build directory structure used by compile -->
    <mkdir dir="${build}"/>
    <depend srcdir="${src.dir}" destdir="${build}"/>
  </target>

  <!--
  ***************************************************************************
			       Code Targets
  ***************************************************************************
  -->

  <target name="all" depends="curn"/>

  <target name="curn" 
          depends="main,parser.builtin,parser.informa,htmloutput,email,-build.info,parser.testers"
          description="Compiles the source"/>

  <target name="parser.main" depends="init">
    <!-- Compile the java code from . into ${build} -->
    <javac srcdir="${src.dir}"
           depend="true"
           listfiles="${compile.listfiles}"
           destdir="${build}">
      <classpath refid="project.class.path"/>
      <patternset refid="parser.main"/>
    </javac>
  </target>

  <target name="main" depends="bundles,parser.main">
    <!-- Compile the java code from . into ${build} -->
    <javac srcdir="${src.dir}"
           depend="true"
           listfiles="${compile.listfiles}"
           destdir="${build}">
      <classpath refid="project.class.path"/>
      <patternset refid="main.sources"/>
    </javac>
  </target>

  <target name="bundles">
    <copy todir="${build}">
      <fileset dir="${src.top}">
        <include name="**/*.properties"/>
      </fileset>
    </copy>
  </target>

  <target name="parser.builtin" depends="parser.main">
    <javac srcdir="${src.dir}"
           depend="true"
           listfiles="${compile.listfiles}"
           destdir="${build}">
      <classpath refid="project.class.path"/>
      <patternset refid="parser.builtin"/>
    </javac>
  </target>

  <target name="-check.informa.exists">
    <available classname="de.nava.informa.parsers.FeedParser"
               property="informa.exists" value="true"/>
  </target><commit_msg>Added new org.clapper.curn.util package to build, to resolve some circular build dependencies.<commit_after><!--
  Ant build file for curn

  $Id$
  ===========================================================================
  This software is released under a Berkeley-style license:

  Copyright (c) 2004 <NAME>. All rights reserved.

  Redistribution and use in source and binary forms are permitted provided
  that: (1) source distributions retain this entire copyright notice and
  comment; and (2) modifications made to the software are prominently
  mentioned, and a copy of the original software (or a pointer to its
  location) are included. The name of the author may not be used to endorse
  or promote products derived from this software without specific prior
  written permission.

  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

  Effectively, this means you can do what you want with the software except
  remove this notice or take advantage of the author's name. If you modify
  the software and redistribute your modified version, you must indicate that
  your version is a modification of the original, and you must provide either
  a pointer to or a copy of the original.

-->

<project name="curn" default="curn" basedir=".">

  <description>
This Ant build file builds the "curn" (Customizable Utilitarian RSS Notifier)
tool and its associated libraries. It can also be used to build binary,
source and documentation packages.
  </description>

  <!--
  ***************************************************************************
				Properties
  ***************************************************************************
  -->

  <!-- set global properties for this build -->

  <property name="build" location="classes"/>
  <property name="pkg.path" value="org/clapper/curn"/>
  <property name="src.top" location="src"/>
  <property name="src.dir" location="${src.top}/${pkg.path}"/>
  <property name="dist"  location="dist"/>
  <property name="build.compiler" value="jikes"/>
  <property name="build.compiler.emacs" value="true"/>
  <property name="build.info.file" 
            value="${build}/${pkg.path}/BuildInfoBundle.properties"/>
  <property name="compile.listfiles" value="no"/>
  <property name="code_jar_name" value="curn"/>
  <property name="code_jar_file" value="${code_jar_name}.jar"/>
  <property name="code_jar_dir" value="${dist}/lib"/>
  <property name="code_jar_path" value="${code_jar_dir}/${code_jar_file}"/>
  <property name="docs_top_dir" value="docs"/>
  <property name="javadocs_top_dir" value="${dist}/docs"/>
  <property name="javadocs_api_dir" value="${javadocs_top_dir}/api"/>
  <property name="zip_dir_prefix" value="curn/"/>
  <property name="release_dir" value="${dist}/release"/>

  <!--
  ***************************************************************************
			    Paths and Patterns
  ***************************************************************************
  -->

  <path id="project.class.path">
    <pathelement location="lib/"/>
    <pathelement path="${java.class.path}/"/>
    <pathelement path="classes/"/>
  </path>

  <patternset id="main.sources">
    <include name="*.java"/>
    <exclude name="parser/*/*.java"/>
    <exclude name="parser/*.java"/>
  </patternset>

  <patternset id="util">
    <include name="util/*.java"/>
  </patternset>

  <patternset id="parser.main">
    <include name="parser/*.java"/>
    <exclude name="parser/*/*.java"/>
    <exclude name="parser/tester.java"/>
  </patternset>

  <patternset id="parser.builtin">
    <include name="parser/minirss/*.java"/>
  </patternset>

  <patternset id="parser.informa">
    <include name="parser/informa/*.java"/>
  </patternset>

  <patternset id="parser.testers">
    <include name="parser/tester.java"/>
  </patternset>

  <patternset id="htmloutput">
    <include name="htmloutput/*.java"/>
  </patternset>

  <patternset id="email">
    <include name="email/*.java"/>
  </patternset>

  <!--
  ***************************************************************************
			  Initialization Targets
  ***************************************************************************
  -->

  <target name="init">
    <!-- Create the time stamp -->
    <tstamp>
      <format property="build.date" pattern="dd MMMM, yyyy HH:mm:ss z"
              locale="en"/>
    </tstamp>
    <!-- Create the build directory structure used by compile -->
    <mkdir dir="${build}"/>
    <depend srcdir="${src.dir}" destdir="${build}"/>
  </target>

  <!--
  ***************************************************************************
			       Code Targets
  ***************************************************************************
  -->

  <target name="all" depends="curn"/>

  <target name="curn" 
          depends="main,parser.builtin,parser.informa,htmloutput,email,-build.info,parser.testers"
          description="Compiles the source"/>

  <target name="util" depends="init">
    <javac srcdir="${src.dir}"
           depend="true"
           listfiles="${compile.listfiles}"
           destdir="${build}">
      <classpath refid="project.class.path"/>
      <patternset refid="util"/>
    </javac>
  </target>

  <target name="parser.main" depends="util">
    <javac srcdir="${src.dir}"
           depend="true"
           listfiles="${compile.listfiles}"
           destdir="${build}">
      <classpath refid="project.class.path"/>
      <patternset refid="parser.main"/>
    </javac>
  </target>

  <target name="main" depends="bundles,parser.main">
    <javac srcdir="${src.dir}"
           depend="true"
           listfiles="${compile.listfiles}"
           destdir="${build}">
      <classpath refid="project.class.path"/>
      <patternset refid="main.sources"/>
    </javac>
  </target>

  <target name="bundles">
    <copy todir="${build}">
      <fileset dir="${src.top}">
        <include name="**/*.properties"/>
      </fileset>
    </copy>
  </target>

  <target name="parser.builtin" depends="parser.main">
    <javac srcdir="${src.dir}"
           depend="true"
           listfiles="${compile.listfiles}"
           destdir="${build}">
      <classpath refid="project.class.path"/>
      <patternset refid="parser.builtin"/>
    </javac>
  </target>

  <target name="-check.informa.exists">
    <available classname="de.nava.informa.parsers.FeedParser"
               property="informa.exists" value="true"/>
  </target>
{'fraction_non_alphanumeric': 0.24833372539794557, 'fraction_numerical': 0.0009409550693954364, 'mean_word_length': 3.871657754010695, 'pattern_counts': {'":': 0, '<': 208, '<?xml version=': 0, '>': 208, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2031174', 'n_tokens_mistral': 3590, 'n_tokens_neox': 3407, 'n_words': 905}