def on_activated(self, view): """ Set the current version of Deviot Arguments: view {ST object} -- Sublime Text Object """ PlatformioCLI(view, command=False).checkInitFile() Tools.setStatus(view) Tools.userPreferencesStatus(view)
def on_activated(self, view): """ Set the current version of Deviot Arguments: view {ST object} -- Sublime Text Object """ PlatformioCLI(view, command=False).checkInitFile() Tools.setStatus(view) Tools.userPreferencesStatus(view)
def getAPIBoards(self): ''' Get the list of boards from platformIO API using CLI. To know more info about platformIO visit: http://www.platformio.org/ Returns: {json object} -- list with all boards in a JSON format ''' window = sublime.active_window() view = window.active_view() Tools.setStatus(view, _('updating_board_list')) boards = [] Run = CommandsPy() command = ['boards', '--json-output'] boards = Run.runCommand(command, setReturn=True) Tools.setStatus(view, _('Done'), erase_time=4000) return boards
def getAPIBoards(self): ''' Get the list of boards from platformIO API using CLI. To know more info about platformIO visit: http://www.platformio.org/ Returns: {json object} -- list with all boards in a JSON format ''' window = sublime.active_window() view = window.active_view() Tools.setStatus(view, _('updating_board_list')) boards = [] Run = CommandsPy() command = ['boards', '--json-output'] boards = Run.runCommand(command, setReturn=True) Tools.setStatus(view, _('Done'), erase_time=4000) return boards
def saveAPIBoards(self, update_method=False, install=False): ''' Save the JSON object in a specific JSON file ''' try: from .Menu import Menu except: from libs.Menu import Menu window = sublime.active_window() view = window.active_view() Tools.setStatus(view, _('updating_board_list')) # console if (not install): console_name = 'Deviot|GetBoards' + str(time.time()) console = Console(window, name=console_name) new_console = True # Queue for the user console message_queue = MessageQueue(console) message_queue.startPrint() message_queue.put("[Deviot {0}]\n", version) message_queue.put("download_board_list") boards = self.getAPIBoards() self.Menu.saveTemplateMenu(data=boards, file_name='platformio_boards.json', user_path=True) self.saveEnvironmentFile() Menu().createMainMenu() if (not install): message_queue.put("list_updated")
def saveAPIBoards(self, update_method=False, install=False): ''' Save the JSON object in a specific JSON file ''' try: from .Menu import Menu except: from libs.Menu import Menu window = sublime.active_window() view = window.active_view() Tools.setStatus(view, _('updating_board_list')) # console if (not install): console_name = 'Deviot|GetBoards' + str(time.time()) console = Console(window, name=console_name) new_console = True # Queue for the user console message_queue = MessageQueue(console) message_queue.startPrint() message_queue.put("[Deviot {0}]\n", version) message_queue.put("download_board_list") boards = self.getAPIBoards() self.Menu.saveTemplateMenu( data=boards, file_name='platformio_boards.json', user_path=True) self.saveEnvironmentFile() Menu().createMainMenu() if(not install): message_queue.put("list_updated")
def run(self, edit, text, erase_time): Tools.setStatus(self.view, text, erase_time)
def run(self, edit, text, erase_time): Tools.setStatus(self.view, text, erase_time)