@tasks.register<EOL>def config_to_equation(poi=None):
from . import utils<EOL>container_dir, product_name = tasks.get_poi_tuple(poi=poi)<EOL>info_object = utils.get_feature_ide_paths(container_dir, product_name)<EOL>feature_list = list()<EOL>try:<EOL><INDENT>print('<STR_LIT>', info_object.config_file_path)<EOL>with open(info_object.config_file_path, '<STR_LIT:r>') as config_file:<EOL><INDENT>config_file = config_file.readlines()<EOL>for line in config_file:<EOL><INDENT>if len(line.split('<STR_LIT>')) <= <NUM_LIT:2>:<EOL><INDENT>line = line<EOL><DEDENT>else:<EOL><INDENT>line = line.replace('<STR_LIT>', '<STR_LIT:.>')<EOL><DEDENT>if line.startswith('<STR_LIT>'):<EOL><INDENT>line = '<STR_LIT>'<EOL><DEDENT>feature_list.append(line)<EOL><DEDENT><DEDENT><DEDENT>except IOError:<EOL><INDENT>print('<STR_LIT>'.format(info_object.config_file_path))<EOL><DEDENT>feature_list = tasks.get_ordered_feature_list(info_object, feature_list)<EOL>try:<EOL><INDENT>with open(info_object.equation_file_path, '<STR_LIT:w>') as eq_file:<EOL><INDENT>eq_file.writelines(feature_list)<EOL><DEDENT>print('<STR_LIT>')<EOL><DEDENT>except IOError:<EOL><INDENT>print('<STR_LIT>')<EOL><DEDENT>tasks.validate_product_equation()<EOL>
Generates a product.equation file for the given product name.
It generates it from the <product_name>.config file in the products folder.
For that you need to have your project imported to featureIDE and set the correct settings.