コード例 #1
0
ファイル: command.py プロジェクト: okfn/ckanext-ngds
    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
ファイル: contribute.py プロジェクト: okfn/ckanext-ngds
    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
ファイル: contribute.py プロジェクト: okfn/ckanext-ngds
    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....."