Example #1
0
import os
import json

import NimLime
import sublime_plugin

PACKAGE_DIR = os.path.dirname(os.path.abspath(__file__))
NimLime.add_module(__name__)


class ListModulesCommand(sublime_plugin.WindowCommand):
    """
    Display list of all modules and their descriptions
    """
    path = "/Documentation/modules/module_index.json"

    def on_item(self, picked):
        # TODO - Open the file at that point
        pass

    def on_done(self, picked):
        if picked < 0:
            return

        item = self.items[picked]
        module = item[0]
        mod_path = PACKAGE_DIR + "/Documentation/modules/" + module + ".json"

        mod_items = []
        with open(mod_path) as json_data:
            data = json.load(json_data)
Example #2
0
import os
import json

import NimLime
import sublime_plugin


PACKAGE_DIR = os.path.dirname(os.path.abspath(__file__))
NimLime.add_module(__name__)


class ListModulesCommand(sublime_plugin.WindowCommand):
    """
    Display list of all modules and their descriptions
    """
    path = "/Documentation/modules/module_index.json"

    def on_item(self, picked):
        # TODO - Open the file at that point
        pass

    def on_done(self, picked):
        if picked < 0:
            return

        item = self.items[picked]
        module = item[0]
        mod_path = PACKAGE_DIR + "/Documentation/modules/" + module + ".json"

        mod_items = []
        with open(mod_path) as json_data: