Commit e0d24aac authored by Henke's avatar Henke
Browse files

Allow for overwriting files

parent 1759ed11
......@@ -103,6 +103,8 @@ if __name__ == '__main__':
parser.add_argument('--beesource', help='Specify source for bee movie script')
parser.add_argument('--exceptions', action='store_const',
const=True, default=False, help='Raise exceptions for long lines')
parser.add_argument('--overwrite', action='store_const',
const=True, default=False, help='Overwrite input files')
parser.add_argument('--comment-l', type=str, default='', dest='L',
help='Use this as left side of inline comment.')
parser.add_argument('--comment-r', type=str, default='', dest='R',
......@@ -122,6 +124,8 @@ if __name__ == '__main__':
for fname in args.filename:
beefname = fname
if not args.overwrite:
beefname = beeify_filename(fname)
lines, text_ptr = beeify_file(fname, args.width, args.comment, text_ptr, L, R)
with open(beefname, 'w') as f:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment