allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [1/3] git commit: [#7199] ticket:555 fixed help, and prefix for sitemap script
Date Thu, 27 Mar 2014 16:19:46 GMT
Repository: allura
Updated Branches:
  refs/heads/master ac7bf9822 -> b82eb5ee3


[#7199] ticket:555 fixed help, and prefix for  sitemap script


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/b82eb5ee
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/b82eb5ee
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/b82eb5ee

Branch: refs/heads/master
Commit: b82eb5ee3fe8392a2f5b8f8f0cbd8b71e57408be
Parents: 0c5a5fd
Author: Yuriy Arhipov <yuriyarhipovua@yandex.ru>
Authored: Wed Mar 12 01:06:05 2014 +0400
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Thu Mar 27 16:15:58 2014 +0000

----------------------------------------------------------------------
 scripts/create-allura-sitemap.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/b82eb5ee/scripts/create-allura-sitemap.py
----------------------------------------------------------------------
diff --git a/scripts/create-allura-sitemap.py b/scripts/create-allura-sitemap.py
index 60deeb4..f39b2a6 100644
--- a/scripts/create-allura-sitemap.py
+++ b/scripts/create-allura-sitemap.py
@@ -102,7 +102,8 @@ def main(options):
 
     nbhd_id = []
     if options.neighborhood:
-        nbhd_id = [nbhd._id for nbhd in M.Neighborhood.query.find({'url_prefix': {'$in':
options.neighborhood}})]
+        prefix = ['/%s/' % n for n in options.neighborhood]
+        nbhd_id = [nbhd._id for nbhd in M.Neighborhood.query.find({'url_prefix': {'$in':
prefix}})]
 
     # write sitemap files, MAX_SITEMAP_URLS per file
     for chunk in utils.chunked_find(M.Project, {'deleted': False, 'neighborhood_id': {'$nin':
nbhd_id}}):
@@ -154,11 +155,11 @@ def parse_options():
                         dest='output_dir',
                         default='/tmp/allura_sitemap',
                         help='Output directory (absolute path).'
-                              '[default: %default]')
+                              '[default: %(default)s]')
     parser.add_argument('-u', '--urls-per-file', dest='urls_per_file',
                          default=10000, type=int,
                          help='Number of URLs per sitemap file. '
-                         '[default: %default, max: ' +
+                         '[default: %(default)s, max: ' +
                          str(MAX_SITEMAP_URLS) + ']',
                          action=Validate)
     parser.add_argument('-n', '--neighborhood', dest='neighborhood',


Mime
View raw message