OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 3 # for details. All rights reserved. Use of this source code is governed by a |
| 4 # BSD-style license that can be found in the LICENSE file. |
| 5 |
| 6 import datetime |
| 7 import sys |
| 8 |
| 9 def Main(): |
| 10 (_, input_file_name, output_file_name) = sys.argv |
| 11 if not input_file_name or not output_file_name: |
| 12 raise Exception('Missing argument') |
| 13 |
| 14 timestamp = str(datetime.datetime.now()) |
| 15 |
| 16 with open(input_file_name, 'r') as input_file: |
| 17 with open(output_file_name, 'w') as output_file: |
| 18 output_file.write(input_file.read().replace('@@TIMESTAMP@@', timestamp)) |
| 19 |
| 20 |
| 21 if __name__ == '__main__': |
| 22 sys.exit(Main()) |
OLD | NEW |