PermafrostDiscoveryGateway / viz-points

Python package for post-processing point-cloud data for 3D visualization
Apache License 2.0
0 stars 1 forks source link

Swap `getopt` with `argparse` #19

Closed iannesbitt closed 1 year ago

iannesbitt commented 1 year ago
          Consider swapping the more outdated `getopt` with the more powerful and easier to read `argparse` (which we're using in other `viz-*` packages). Usage example:
    parser = argparse.ArgumentParser(description='Process some files.')
    parser.add_argument('-v', '--verbose', action='store_true', help='Whether to log more messages')
    parser.add_argument('-c', '--copy_I_to_RGB', action='store_true', help='Whether to copy intensity values to RGB')
    parser.add_argument('-m', '--merge', action='store_true', help='Whether to use merge function')
    parser.add_argument('-a', '--archive', action='store_true', help='Whether to archive the input dataset')
    parser.add_argument('-s', '--rgb_scale', type=float, default=1.0, help='Scale multiplier for RGB values')
    parser.add_argument('-z', '--translate_z', type=float, default=0.0, help='Float translation for z values')
    parser.add_argument('-f', '--file', type=str, required=True, help='The file to process')

    args = parser.parse_args()

_Originally posted by @robyngit in https://github.com/PermafrostDiscoveryGateway/viz-points/pull/12#discussion_r1195557338_

iannesbitt commented 1 year ago

Erroneously referenced and closed. Reopening.

iannesbitt commented 1 year ago

Tested and working