예제 #1
0
    def command(self):
        self._load_config()
        cmd = self.args[0]
        if cmd == "import":
            from ckanext.ngds.importer.importer import BulkUploader

            bulkLoader = BulkUploader()
            bulkLoader.execute_bulk_upload()
        elif cmd == "doc-index":
            from ckanext.ngds.ngdsui.misc.helpers import process_resource_docs_to_index

            process_resource_docs_to_index()
        elif cmd == "compile_client_scripts":
            from ckanext.ngds.lib.compile_client_scripts.script_compiler import ScriptCompiler
            import ckanext.ngds.ngdsui as uimodule

            print ScriptCompiler
            uipath = os.path.dirname(os.path.abspath(uimodule.__file__))
            sc = ScriptCompiler(uipath)
            sc.compile_less()
            sc.minify_js()

        elif cmd == "create_ngds_org":
            from ckanext.ngds.lib.customize.customize import Customize
            cust = Customize()
            cust.customize()
        else:
            print "Command %s not recognized" % cmd
예제 #2
0
    def execute_fulltext_indexer(self):
        """
        Executes the fulltext indexer to index documents that were uploaded since the last indexer run.
        """
        process_resource_docs_to_index()

        return "Full text indexer is executed successfully. Have fun with searching through documents....."
예제 #3
0
    def execute_fulltext_indexer(self):
        """
        Executes the fulltext indexer to index documents that were uploaded since the last indexer run.
        """
        process_resource_docs_to_index()

        return "Full text indexer is executed successfully. Have fun with searching through documents....."