<commit_before>#!/usr/bin/env python3
# encoding: utf-8
# @author <NAME> <<EMAIL>>
# @company hamcos IT Service GmbH http://www.hamcos.de
# @license AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, version 3 of the
# License.
#
# This program 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
#
# Rewrite of
# http://git.mathias-kettner.de/git/?p=check_mk.git;a=blob;f=doc/treasures/wato_import.py
# to allow more flexibility and have a nicer code base.

"""
Read CSV host list and create the hosts in Check_MK WATO.
"""

__version__ = '0.7'

# modules {{{
# std {{{
import os
import logging
import csv
import re
# }}}
# }}}


class CsvToCheckMkConverter:
    CMK_TAG_SEPARATOR = '|'
    DEFAULT_HOST_TAGS = CMK_TAG_SEPARATOR.join(('wato', '/" + FOLDER_PATH + "/'))
    KEYS_IN_HOST_ATTRIBUTES = [
        'alias',
        'ipaddress'
    ]<commit_msg>Added credits to original author.<commit_after>#!/usr/bin/env python3
# encoding: utf-8
# @author <NAME> <<EMAIL>>
# @company hamcos IT Service GmbH http://www.hamcos.de
# @license AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, version 3 of the
# License.
#
# This program 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
#
# Rewrite of
# http://git.mathias-kettner.de/git/?p=check_mk.git;a=blob;f=doc/treasures/wato_import.py
# to allow more flexibility and have a nicer code base.
# Author: <NAME> <EMAIL>, GPLv2
#

"""
Read CSV host list and create the hosts in Check_MK WATO.
"""

__version__ = '0.7'

# modules {{{
# std {{{
import os
import logging
import csv
import re
# }}}
# }}}


class CsvToCheckMkConverter:
    CMK_TAG_SEPARATOR = '|'
    DEFAULT_HOST_TAGS = CMK_TAG_SEPARATOR.join(('wato', '/" + FOLDER_PATH + "/'))
    KEYS_IN_HOST_ATTRIBUTES = [
        'alias',
        'ipaddress'
    ]
{'fraction_non_alphanumeric': 0.11258041458184417, 'fraction_numerical': 0.006075768406004289, 'mean_word_length': 3.8763066202090593, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 4, 'lorem ipsum': 0, 'www.': 6, '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': '2458972', 'n_tokens_mistral': 926, 'n_tokens_neox': 899, 'n_words': 318}