summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-10-30 16:54:10 -0400
committerNick Mathewson <nickm@torproject.org>2014-10-30 16:54:10 -0400
commit0eb18866929837b8c04d2ff5b4cb464d70397463 (patch)
tree38f487a124574b43d751b980d240e9db3f5bab8b /scripts
parent0799f6f2cae413470ba8d4db7ba05742a755b48b (diff)
downloadtor-0eb18866929837b8c04d2ff5b4cb464d70397463.tar.gz
tor-0eb18866929837b8c04d2ff5b4cb464d70397463.zip
Twiddle the format_changelog.py option defaults.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/maint/format_changelog.py20
1 files changed, 17 insertions, 3 deletions
diff --git a/scripts/maint/format_changelog.py b/scripts/maint/format_changelog.py
index 686ebba1d6..35dc7252a6 100755
--- a/scripts/maint/format_changelog.py
+++ b/scripts/maint/format_changelog.py
@@ -449,19 +449,32 @@ op.add_option('-S', '--no-sort', action='store_false',
dest='sort', default=True,
help='Do not sort or collate sections')
op.add_option('-o', '--output', dest='output',
- default=None, metavar='FILE', help="write output to FILE")
+ default='-', metavar='FILE', help="write output to FILE")
op.add_option('-H', '--html', action='store_true',
dest='html', default=False,
help="generate an HTML fragment")
op.add_option('-1', '--first', action='store_true',
dest='firstOnly', default=False,
help="write only the first section")
-op.add_option('-b', '--blog-format', action='store_true',
+op.add_option('-b', '--blog-header', action='store_true',
dest='blogOrder', default=False,
help="Write the header in blog order")
+op.add_option('-B', '--blog', action='store_true',
+ dest='blogFormat', default=False,
+ help="Set all other options as appropriate for a blog post")
+op.add_option('--inplace', action='store_true',
+ dest='inplace', default=False,
+ help="Alter the ChangeLog in place")
options,args = op.parse_args()
+if options.blogFormat:
+ options.blogOrder = True
+ options.html = True
+ options.sort = False
+ options.wrapText = False
+ options.firstOnly = True
+
if len(args) > 1:
op.error("Too many arguments")
elif len(args) == 0:
@@ -469,7 +482,8 @@ elif len(args) == 0:
else:
fname = args[0]
-if options.output == None:
+if options.inplace:
+ assert options.output == '-'
options.output = fname
if fname != '-':