Don't group items in HTTP API reference. We're cares about every resource.
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/a14a4323 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/a14a4323 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/a14a4323 Branch: refs/heads/1781-reorganize-and-improve-docs Commit: a14a43239bf07c01bd6ffc66becc0569e124408a Parents: 5cc9f67 Author: Alexander Shorin <[email protected]> Authored: Wed Aug 14 22:06:11 2013 +0400 Committer: Alexander Shorin <[email protected]> Committed: Fri Sep 27 21:59:44 2013 +0400 ---------------------------------------------------------------------- share/doc/ext/httpdomain.py | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/a14a4323/share/doc/ext/httpdomain.py ---------------------------------------------------------------------- diff --git a/share/doc/ext/httpdomain.py b/share/doc/ext/httpdomain.py index f2051f4..255e85a 100644 --- a/share/doc/ext/httpdomain.py +++ b/share/doc/ext/httpdomain.py @@ -437,21 +437,6 @@ class HTTPIndex(Index): localname = 'CouchDB HTTP API Reference' shortname = 'api' - def __init__(self, *args, **kwargs): - super(HTTPIndex, self).__init__(*args, **kwargs) - - self.ignore = [ - [l for l in x.split('/') if l] - for x in self.domain.env.config['http_index_ignore_prefixes']] - self.ignore.sort(key=lambda x: -len(x)) - - def grouping_prefix(self, path): - letters = [x for x in path.split('/') if x] - for prefix in self.ignore: - if letters[:len(prefix)] == prefix: - return '/' + '/'.join(letters[:len(prefix) + 1]) - return '/%s' % (letters[0] if letters else '',) - def generate(self, docnames=None): content = {} items = ((method, path, info) @@ -459,7 +444,7 @@ class HTTPIndex(Index): for path, info in routes.items()) items = sorted(items, key=lambda item: item[1]) for method, path, info in items: - entries = content.setdefault(self.grouping_prefix(path), []) + entries = content.setdefault(path, []) entries.append([ method.upper() + ' ' + path, 0, info[0], http_resource_anchor(method, path), '', '', info[1] @@ -633,4 +618,3 @@ def setup(app): get_lexer_by_name('http') except ClassNotFound: app.add_lexer('http', HTTPLexer()) - app.add_config_value('http_index_ignore_prefixes', [], None)
