<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals

import os

from . import paths
from .file import File
from ..platformio.pio_bridge import PioBridge

class MenuFiles(PioBridge):
    def __init__(self):
        super(MenuFiles, self).__init__()
        self.create_main_menu()

    def get_template_menu(self, file_name):
        """Template Menu
        
        Get a JSON template file and return it.
        To this option works, the file must be located
        in the Deviot/presets folder
        
        Arguments:
            file_name {str} -- name of the file
        
        Returns:
            json -- data of the file
        """
        file_path = paths.getPresetFile(file_name)
        preset_file = File(file_path)
        preset_data = preset_file.read_json()
        
        return preset_data

    def create_sublime_menu(self, data, menu_name, path):
        """Sublime Menu
        <commit_msg>Deleted call to create the main menu from the construct<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals

import os

from . import paths
from .file import File
from ..platformio.pio_bridge import PioBridge

class MenuFiles(PioBridge):
    def __init__(self):
        super(MenuFiles, self).__init__()

    def get_template_menu(self, file_name):
        """Template Menu
        
        Get a JSON template file and return it.
        To this option works, the file must be located
        in the Deviot/presets folder
        
        Arguments:
            file_name {str} -- name of the file
        
        Returns:
            json -- data of the file
        """
        file_path = paths.getPresetFile(file_name)
        preset_file = File(file_path)
        preset_data = preset_file.read_json()
        
        return preset_data

    def create_sublime_menu(self, data, menu_name, path):
        """Sublime Menu
        
{'fraction_non_alphanumeric': 0.0703125, 'fraction_numerical': 0.0009191176470588235, 'mean_word_length': 2.3492307692307692, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4002759', 'n_tokens_mistral': 628, 'n_tokens_neox': 616, 'n_words': 196}