Skip to content

Commit 887ab46

Browse files
authored
Merge pull request #54 from PolarGeospatialCenter/feature-write-comd-txt
Minor bug fixes for writing out the input command
2 parents 4c94cdf + d4f267d commit 887ab46

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pgc_mosaic_build_tile.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ def main():
5050
help="scratch space (default is mosaic directory)")
5151
parser.add_argument("--gtiff-compression", choices=mosaic.GTIFF_COMPRESSIONS, default="lzw",
5252
help="GTiff compression type. Default=lzw ({})".format(','.join(mosaic.GTIFF_COMPRESSIONS)))
53+
parser.add_argument("--skip-cmd-txt", action='store_true', default=True,
54+
help='Skip writing the txt file containing the input command.')
5355
parser.add_argument("--version", action='version', version="imagery_utils v{}".format(VERSION))
5456

5557

@@ -81,6 +83,13 @@ def main():
8183
parser.error("scratch space directory does not exist: {0}".format(args.wd))
8284
else:
8385
localpath = os.path.dirname(tile)
86+
87+
#### write input command to text file next to output folder for reference
88+
command_str = ' '.join(sys.argv)
89+
logger.info("Running command: {}".format(command_str))
90+
if not args.skip_cmd_txt:
91+
utils.write_input_command_txt(command_str,localpath)
92+
args.skip_cmd_txt = True
8493

8594
intersects = []
8695

0 commit comments

Comments
 (0)