<commit_before>#!/usr/bin/env python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.


"""Generate Doxygen documentation."""


import datetime
import os
import shutil
import subprocess
import sys

from common.skia import global_constants


DOXYFILE_BASENAME = 'Doxyfile'  # must match name of Doxyfile in skia root
DOXYGEN_BINARY = 'doxygen'
WORKDIR = os.path.join(os.pardir, 'doxygen_workdir')
DOXYGEN_CONFIG_DIR = os.path.join(WORKDIR, 'doxygen-config')
DOXYGEN_WORKING_DIR = os.path.join(WORKDIR, 'doxygen')
DOXYGEN_GS_PATH = '/'.join(['gs:/', global_constants.GS_GM_BUCKET,
                            'doxygen', 'doxygen'])

IFRAME_FOOTER_TEMPLATE = """
<html><body><address style="text-align: right;"><small>
Generated at %s for skia
by <a href="http://www.doxygen.org/index.html">doxygen</a>
%s </small></address></body></html>
"""


def recreate_dir(path):
  """Delete and recreate the directory."""
  try:
    shutil.rmtree(path)
  except OSError:
    if os.path.exists(path):
      raise Exception('Could not remove %s' % path)
  os.makedirs(path)<commit_msg>Skia: fix doxygen upload path<commit_after>#!/usr/bin/env python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.


"""Generate Doxygen documentation."""


import datetime
import os
import shutil
import subprocess
import sys

from common.skia import global_constants


DOXYFILE_BASENAME = 'Doxyfile'  # must match name of Doxyfile in skia root
DOXYGEN_BINARY = 'doxygen'
WORKDIR = os.path.join(os.pardir, 'doxygen_workdir')
DOXYGEN_CONFIG_DIR = os.path.join(WORKDIR, 'doxygen-config')
DOXYGEN_WORKING_DIR = os.path.join(WORKDIR, 'doxygen')
DOXYGEN_GS_PATH = '/'.join(['gs:/', global_constants.GS_GM_BUCKET, 'doxygen'])

IFRAME_FOOTER_TEMPLATE = """
<html><body><address style="text-align: right;"><small>
Generated at %s for skia
by <a href="http://www.doxygen.org/index.html">doxygen</a>
%s </small></address></body></html>
"""


def recreate_dir(path):
  """Delete and recreate the directory."""
  try:
    shutil.rmtree(path)
  except OSError:
    if os.path.exists(path):
      raise Exception('Could not remove %s' % path)
  os.makedirs(path)
{'fraction_non_alphanumeric': 0.13230900554844216, 'fraction_numerical': 0.0034144259496372174, 'mean_word_length': 4.689320388349515, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4760317', 'n_tokens_mistral': 834, 'n_tokens_neox': 784, 'n_words': 214}