@@ -0,0 +1,1370 @@
+#!/usr/bin/env python3%0A# tiffcomment.py%0A%0A%22%22%22Print or replace ImageDescription in first page of TIFF file.%0A%0AUsage: tiffcomment %5B--set comment%5D file%0A%0A%22%22%22%0A%0Aimport os%0Aimport sys%0A%0Atry:%0A    from .tifffile import tiffcomment%0Aexcept ImportError:%0A    try:%0A        from tifffile.tifffile import tiffcomment%0A    except ImportError:%0A        from tifffile import tiffcomment%0A%0A%0Adef main(argv=None):%0A    %22%22%22Tiffcomment command line usage main function.%22%22%22%0A    if argv is None:%0A        argv = sys.argv%0A%0A    if len(argv) %3E 2 and argv%5B1%5D in '--set':%0A        comment = argv%5B2%5D%0A        files = argv%5B3:%5D%0A    else:%0A        comment = None%0A        files = argv%5B1:%5D%0A%0A    if len(files) == 0 or any(f.startswith('-') for f in files):%0A        print()%0A        print(__doc__.strip())%0A        return%0A%0A    if comment is None:%0A        pass%0A    elif os.path.exists(comment):%0A        with open(comment, 'rb') as fh:%0A            comment = fh.read()%0A    else:%0A        try:%0A            comment = comment.encode('ascii')%0A        except UnicodeEncodeError as exc:%0A            print(f'%7Bfile%7D: %7Bexc%7D')%0A            comment = comment.encode()%0A%0A    for file in files:%0A        try:%0A            result = tiffcomment(file, comment)%0A        except Exception as exc:%0A            print(f'%7Bfile%7D: %7Bexc%7D')%0A        else:%0A            if result:%0A                print(result)%0A%0A%0Aif __name__ == '__main__':%0A    sys.exit(main())%0A

Add tifffile/tiffcomment.py