Пример #1
0
def get_structure_dictionary_from_file(structure_file):
    """Returns a structure as a dictionary from the given file.
    """
    properties = property_reader.make_dictionary(structure_file)
    properties = {key: processor_utils.adjust_property_value(properties[key])
                  for key in properties.keys()}
    return properties
Пример #2
0
def get_translator_dictionary_from_file(translator_file):
    """Returns a translator as a dictionary from the given file.
    """
    properties = property_reader.make_dictionary(translator_file)
    properties = {key: processor_utils.adjust_property_value(properties[key]) for key in properties.keys()}
    properties["translator_file"] = translator_file
    return properties
Пример #3
0
def file_to_properties(extension, rel_exec_path=None, rel_property_path=None):
    current_path = os.path.dirname(os.path.realpath(__file__))
    setup_file = current_path.replace(rel_exec_path, rel_property_path)
    setup_file += extension
    properties = property_reader.make_dictionary(setup_file)
    return properties
Пример #4
0
def get_dictionary_by_profile(path, full_path=False):
    if not full_path:
        path = replace_relative_path(path, '/src/main/dao/filesystem',
                                     '/properties/profiles/')
    return property_reader.make_dictionary(path)