<commit_before># USAGE: perl utils/static_content/doxygen/build.pl [--dir root directory of server] [--apis comma-separated list of apis]

use strict;

use Cwd;
use Getopt::Long;
use File::Basename;

Getopt::Long::Configure('bundling');

my $root = getcwd();
my @apis;

my $flag = GetOptions(
  'dir=s',  \$root,
  'apis=s', \@apis,
);

my $filter_dir = "$root/ensembl/misc-scripts/doxygen_filter/";

my $dir   = "$root/utils/static_content/doxygen";
my $html  = "$root/htdocs/info/docs/Doxygen";
my $edocs = $apis[0] eq 'edocs' || !scalar @apis;

@apis = split /,/, join ',', @apis;
@apis = qw(core hive compara analysis external functgenomics pipeline variation) unless scalar @apis; # core and hive must always be first in order to generate links

unshift @INC, "$root/conf", $root;
require SiteDefs;

if ($apis[0] ne 'edocs') {
  my %config_by_api = (
    core => {
      PROJECT_NAME     => 'Ensembl',
      INPUT            => "$root/ensembl/modules/",
      EXCLUDE          => "$root/modules/t $root/ensembl/misc-scripts/",
      STRIP_FROM_PATH  => "$root/ensembl/modules/",
      TAGFILES         => '',
      GENERATE_TAGFILE => 'ensembl.tag'
    },
    compara => {
      STRIP_FROM_PATH => "$root/ensembl-compara/modules/",
      TAGFILES        => "ensembl.tag=../core-api/ \\ \n                         hive.tag=../hive-api/",
    },
    external => {
      STRIP_FROM_PATH => "$root/ensembl-external/modules/Bio/",
    },
    functgenomics => {
      PROJECT_NAME     => '"Ensembl FuncGen"',
      PROJECT_BRIEF    => '"EnsEMBL FuncGen API reference"',
      OUTPUT_DIRECTORY => "$html/funcgen-api",
      STRIP_FROM_PATH  => "$root/ensembl-functgenomics/modules/Bio/",
    },
    ensemblgenomes => {
      PROJECT_NAME     => '"Ensembl Genomes"',
      PROJECT_BRIEF    => '"EnsEMBL Genomes API reference"',
      INPUT            => "$root/ensemblgenomes-api/modules/",
      EXCLUDE          => "$root/ensemblgenomes-api/t $root/ensemblgenomes-api/misc-scripts",
      STRIP_FROM_PATH  => "$root/ensemblgenomes-api/modules/",
      TAGFILES         => '',
    },
  );

  my %config_template = (
    PROJECT_NUMBER    => $SiteDefs::VERSION,
    PROJECT_NAME      => '"Ensembl %s"',
    PROJECT_BRIEF     => '"EnsEMBL %s API reference"',
    OUTPUT_DIRECTORY  => "$html/%s-api",
    STRIP_FROM_PATH   => "$root/ensembl-%s/modules/Bio/EnsEMBL/",
    INPUT             => "$root/ensembl-%s/modules/",
    EXCLUDE           => '',<commit_msg>use ENSEMBL_VERSION rather than VERSION<commit_after># USAGE: perl utils/static_content/doxygen/build.pl [--dir root directory of server] [--apis comma-separated list of apis]

use strict;

use Cwd;
use Getopt::Long;
use File::Basename;

Getopt::Long::Configure('bundling');

my $root = getcwd();
my @apis;

my $flag = GetOptions(
  'dir=s',  \$root,
  'apis=s', \@apis,
);

my $filter_dir = "$root/ensembl/misc-scripts/doxygen_filter/";

my $dir   = "$root/utils/static_content/doxygen";
my $html  = "$root/htdocs/info/docs/Doxygen";
my $edocs = $apis[0] eq 'edocs' || !scalar @apis;

@apis = split /,/, join ',', @apis;
@apis = qw(core hive compara analysis external functgenomics pipeline variation) unless scalar @apis; # core and hive must always be first in order to generate links

unshift @INC, "$root/conf", $root;
require SiteDefs;

if ($apis[0] ne 'edocs') {
  my %config_by_api = (
    core => {
      PROJECT_NAME     => 'Ensembl',
      INPUT            => "$root/ensembl/modules/",
      EXCLUDE          => "$root/modules/t $root/ensembl/misc-scripts/",
      STRIP_FROM_PATH  => "$root/ensembl/modules/",
      TAGFILES         => '',
      GENERATE_TAGFILE => 'ensembl.tag'
    },
    compara => {
      STRIP_FROM_PATH => "$root/ensembl-compara/modules/",
      TAGFILES        => "ensembl.tag=../core-api/ \\ \n                         hive.tag=../hive-api/",
    },
    external => {
      STRIP_FROM_PATH => "$root/ensembl-external/modules/Bio/",
    },
    functgenomics => {
      PROJECT_NAME     => '"Ensembl FuncGen"',
      PROJECT_BRIEF    => '"EnsEMBL FuncGen API reference"',
      OUTPUT_DIRECTORY => "$html/funcgen-api",
      STRIP_FROM_PATH  => "$root/ensembl-functgenomics/modules/Bio/",
    },
    ensemblgenomes => {
      PROJECT_NAME     => '"Ensembl Genomes"',
      PROJECT_BRIEF    => '"EnsEMBL Genomes API reference"',
      INPUT            => "$root/ensemblgenomes-api/modules/",
      EXCLUDE          => "$root/ensemblgenomes-api/t $root/ensemblgenomes-api/misc-scripts",
      STRIP_FROM_PATH  => "$root/ensemblgenomes-api/modules/",
      TAGFILES         => '',
    },
  );

  my %config_template = (
    PROJECT_NUMBER    => $SiteDefs::ENSEMBL_VERSION,
    PROJECT_NAME      => '"Ensembl %s"',
    PROJECT_BRIEF     => '"EnsEMBL %s API reference"',
    OUTPUT_DIRECTORY  => "$html/%s-api",
    STRIP_FROM_PATH   => "$root/ensembl-%s/modules/Bio/EnsEMBL/",
    INPUT             => "$root/ensembl-%s/modules/",
    EXCLUDE           => '',
{'fraction_non_alphanumeric': 0.16498180347755761, 'fraction_numerical': 0.0008087343307723412, 'mean_word_length': 2.6509225092250923, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 65, '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': '1442247', 'n_tokens_mistral': 1829, 'n_tokens_neox': 1750, 'n_words': 330}