<commit_before>## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later version.
##
## Invenio is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.

"""Invenio Submission Web Interface config file."""

__revision__ = "$Id$"

import re

## test:
test = "FALSE"

## CC all action confirmation mails to administrator? (0 == NO; 1 == YES)
CFG_WEBSUBMIT_COPY_MAILS_TO_ADMIN = 0

## During submission, warn user if she is going to leave the
## submission by following some link on the page?
## Does not work with Opera and Konqueror.
## This requires all submission functions to set Javascript variable
## 'user_must_confirm_before_leaving_page' to 'false' before
## programmatically submitting a form , or else users will be asked
## confirmation after each submission step.
## (0 == NO; 1 == YES)
CFG_WEBSUBMIT_CHECK_USER_LEAVES_SUBMISSION = 0

## List of keywords/format parameters that should not write by default
## corresponding files in submission directory (`curdir').  Some other
## filenames not included here are reserved too, such as those
## containing non-alphanumeric chars (excepted underscores '_'), for
## eg all names containing a dot ('bibdocactions.log',
## 'performed_actions.log', etc.)
CFG_RESERVED_SUBMISSION_FILENAMES = ['SuE',
                                     'files',
                                     'lastuploadedfile',
                                     'curdir',
                                     'function_log',
                                     'SN',
                                     'ln']

## CFG_WEBSUBMIT_BEST_FORMATS_TO_EXTRACT_TEXT_FROM -- a comma-separated
## list of document extensions in decrescent order of preference
## to suggest what is considered the best format to extract text from.
CFG_WEBSUBMIT_BEST_FORMATS_TO_EXTRACT_TEXT_FROM = ('txt', 'html', 'xml', 'odt', 'doc', 'docx', 'djvu', 'pdf', 'ps', 'ps.gz')

## CFG_WEBSUBMIT_DESIRED_CONVERSIONS -- a dictionary having as keys
## a format and as values the corresponding list of desired converted
## formats.
CFG_WEBSUBMIT_DESIRED_CONVERSIONS = {
    'pdf' : ('ps.gz', 'pdf;pdfa'),
    'ps.gz' : ('pdf;pdfa', ),
    'djvu' : ('ps.gz', 'pdf'),
    'sxw': ('doc', 'odt', 'pdf;pdfa', 'ps.gz'),
    'docx' : ('doc', 'odt', 'pdf;pdfa', 'ps.gz'),
    'doc' : ('odt', 'pdf;pdfa', 'ps.gz', 'docx'),
    'rtf' : ('pdf;pdfa', 'odt', 'ps.gz'),
    'odt' : ('pdf;pdfa', 'doc', 'ps.gz'),
    'pptx' : ('ppt', 'odp', 'pdf;pdfa', 'ps.gz'),
    'ppt' : ('odp', 'pdf;pdfa', 'ps.gz', 'pptx'),
    'sxi': ('odp', 'pdf;pdfa', 'ps.gz'),
    'odp' : ('pdf;pdfa', 'ppt', 'ps.gz'),
    'xlsx' : ('xls', 'ods', 'csv'),
    'xls' : ('ods', 'csv'),
    'ods' : ('xls', 'xlsx', 'csv'),
    'sxc': ('xls', 'xlsx', 'csv'),
    'tiff' : ('pdf;pdfa', 'ps.gz'),
    'tif' : ('pdf;pdfa', 'ps.gz')
}

## CFG_WEBSUBMIT_ICON_SUBFORMAT_RE -- a subformat is an Invenio concept to give
## file formats more semantic. For example "foo.gif;icon" has ".gif;icon"
## 'format', ".gif" 'superformat' and "icon" 'subformat'. That means that this
## particular format/instance of the "foo" document, not only is a ".gif" but
## is in the shape of an "icon", i.e. most probably it will be low-resolution.
## This configuration variable let the administrator to decide which implicit
## convention will be used to know which formats will be meant to be used
## as an icon.
CFG_WEBSUBMIT_ICON_SUBFORMAT_RE = re.compile(r"icon.*")

## CFG_WEBSUBMIT_DEFAULT_ICON_SUBFORMAT -- this is the default subformat used
## when creating new icons.
CFG_WEBSUBMIT_DEFAULT_ICON_SUBFORMAT = "icon"

## Prefix for video uploads, Garbage Collector<commit_msg>WebSubmit: do not create .ps.gz formats<commit_after>## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later version.
##
## Invenio is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.

"""Invenio Submission Web Interface config file."""

__revision__ = "$Id$"

import re

## test:
test = "FALSE"

## CC all action confirmation mails to administrator? (0 == NO; 1 == YES)
CFG_WEBSUBMIT_COPY_MAILS_TO_ADMIN = 0

## During submission, warn user if she is going to leave the
## submission by following some link on the page?
## Does not work with Opera and Konqueror.
## This requires all submission functions to set Javascript variable
## 'user_must_confirm_before_leaving_page' to 'false' before
## programmatically submitting a form , or else users will be asked
## confirmation after each submission step.
## (0 == NO; 1 == YES)
CFG_WEBSUBMIT_CHECK_USER_LEAVES_SUBMISSION = 0

## List of keywords/format parameters that should not write by default
## corresponding files in submission directory (`curdir').  Some other
## filenames not included here are reserved too, such as those
## containing non-alphanumeric chars (excepted underscores '_'), for
## eg all names containing a dot ('bibdocactions.log',
## 'performed_actions.log', etc.)
CFG_RESERVED_SUBMISSION_FILENAMES = ['SuE',
                                     'files',
                                     'lastuploadedfile',
                                     'curdir',
                                     'function_log',
                                     'SN',
                                     'ln']

## CFG_WEBSUBMIT_BEST_FORMATS_TO_EXTRACT_TEXT_FROM -- a comma-separated
## list of document extensions in decrescent order of preference
## to suggest what is considered the best format to extract text from.
CFG_WEBSUBMIT_BEST_FORMATS_TO_EXTRACT_TEXT_FROM = ('txt', 'html', 'xml', 'odt', 'doc', 'docx', 'djvu', 'pdf', 'ps', 'ps.gz')

## CFG_WEBSUBMIT_DESIRED_CONVERSIONS -- a dictionary having as keys
## a format and as values the corresponding list of desired converted
## formats.
CFG_WEBSUBMIT_DESIRED_CONVERSIONS = {
    'pdf' : ('pdf;pdfa', ),
    'ps.gz' : ('pdf;pdfa', ),
    'djvu' : ('pdf', ),
    'sxw': ('doc', 'odt', 'pdf;pdfa', ),
    'docx' : ('doc', 'odt', 'pdf;pdfa', ),
    'doc' : ('odt', 'pdf;pdfa', 'docx'),
    'rtf' : ('pdf;pdfa', 'odt', ),
    'odt' : ('pdf;pdfa', 'doc', ),
    'pptx' : ('ppt', 'odp', 'pdf;pdfa', ),
    'ppt' : ('odp', 'pdf;pdfa', 'pptx'),
    'sxi': ('odp', 'pdf;pdfa', ),
    'odp' : ('pdf;pdfa', 'ppt', ),
    'xlsx' : ('xls', 'ods', 'csv'),
    'xls' : ('ods', 'csv'),
    'ods' : ('xls', 'xlsx', 'csv'),
    'sxc': ('xls', 'xlsx', 'csv'),
    'tiff' : ('pdf;pdfa', ),
    'tif' : ('pdf;pdfa', ),
}

## CFG_WEBSUBMIT_ICON_SUBFORMAT_RE -- a subformat is an Invenio concept to give
## file formats more semantic. For example "foo.gif;icon" has ".gif;icon"
## 'format', ".gif" 'superformat' and "icon" 'subformat'. That means that this
## particular format/instance of the "foo" document, not only is a ".gif" but
## is in the shape of an "icon", i.e. most probably it will be low-resolution.
## This configuration variable let the administrator to decide which implicit
## convention will be used to know which formats will be meant to be used
## as an icon.
CFG_WEBSUBMIT_ICON_SUBFORMAT_RE = re.compile(r"icon.*")

## CFG_WEBSUBMIT_DEFAULT_ICON_SUBFORMAT -- this is the default subformat used
## when creating new icons.
CFG_WEBSUBMIT_DEFAULT_ICON_SUBFORMAT = "icon"

## Prefix for video uploads, Garbage Collector
{'fraction_non_alphanumeric': 0.1354633341193115, 'fraction_numerical': 0.012497052581938221, 'mean_word_length': 3.519445924347363, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6876069', 'n_tokens_mistral': 2845, 'n_tokens_neox': 2672, 'n_words': 973}