WAKAYAMA shirou avatar WAKAYAMA shirou committed c0cfb38

change dipus server url setting in the conf.py to dipus_server_url.

THIS COMMIT BREAKS COMPATIBILITY.

Comments (0)

Files changed (2)

 
   ::
 
-     #dipus_host_url = "http://192.0.2.20"
+     #dipus_server_url = "http://192.0.2.20"
      #  url of dipus server
      #  Default is "http://localhost:9876" 
      

src/dipus/dipusbuilder.py

             'password': conf['password']
             })
 
-        url = conf['host_url'] + '/' + conf['_index']
+        url = conf['server_url'] + '/' + conf['_index']
         ret = urllib.urlopen(url, params).read()
 
         result = simplejson.loads(ret)
     format = 'search'
     out_suffix = ''
 
-    def output_templates(self, host_url, _index):
-        host_url = host_url.rstrip("/")
+    def output_templates(self, server_url, _index):
+        server_url = server_url.rstrip("/")
         _index = _index.rstrip("/")
         
-        dipus_url = "/".join([host_url, _index, "_search"])
+        dipus_url = "/".join([server_url, _index, "_search"])
 
         # TODO: fix if multiple html_static_path
         # TODO: should check files exist?
 
     def prepare_writing(self, docnames):
         self.writer = DipusWriter(self)
-        if self.config.dipus_host_url is None:
-            self.config.dipus_host_url = "http://{0}:{1}".format(
+        if self.config.dipus_server_url is None:
+            self.config.dipus_server_url = "http://{0}:{1}".format(
                 DEFAULT_HOST, DEFAULT_PORT)
         if self.config.dipus_index is None:
             # if dipus_index is not set, use project name
             self.config.dipus_index = urllib.quote(self.config.project)
 
-        self.output_templates(self.config.dipus_host_url,
+        self.output_templates(self.config.dipus_server_url,
                               self.config.dipus_index)
 
     def write_doc(self, docname, doctree):
         conf = {
-            'host_url': self.config.dipus_host_url,
+            'server_url': self.config.dipus_server_url,
             '_index': self.config.dipus_index,
             'password': self.config.dipus_password
             }
 
 
 def setup(app):
-    app.add_config_value('dipus_host_url', None, '')
+    app.add_config_value('dipus_server_url', None, '')
     app.add_config_value('dipus_index', None, '')
     app.add_config_value('dipus_password', None, '')
     app.add_builder(DipusBuilder)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.