asdf2014 commented on a change in pull request #1210:
URL: 
https://github.com/apache/incubator-seatunnel/pull/1210#discussion_r811959103



##########
File path: bin/license.py
##########
@@ -0,0 +1,385 @@
+#!/usr/bin/env python
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import os
+import sys
+
+if sys.version_info.major < 3:
+    print('At least Python3 is required!')
+    print('Please refer to the https://www.python.org/downloads/ documentation 
if you do not have a right Python env.')
+    exit(-1)
+
+if len(sys.argv) - 1 != 3:
+    print("The length of arguments should be 3!")
+    print("The first argument should be the path to the THIRD-PARTY.txt file.")
+    print("The second argument should be the path to the LICENSE file.")
+    print("The third argument should be a flag that controls whether to print 
the diff or change the LICENSE file.")
+    exit(-1)
+
+third_party = sys.argv[1]
+license = sys.argv[2]
+print_diff = sys.argv[3]
+
+with open(third_party, "r") as f:
+    licenses = f.readlines()
+
+licenses_keyword_map = {
+    "Apache 2.0 License": ["Apache", "APL2"],
+    "MIT License": ["MIT"],
+    "BSD License": ["BSD"],
+    "CC0-1.0 License": ["CC0"],
+    "CDDL License": ["CDDL"],
+    "Eclipse Public License": ["Eclipse"],
+    "Public Domain License": ["Public Domain"],
+    "Mozilla Public License Version 2.0": ["Mozilla Public License"],
+    "Go License": ["The Go license"],
+    "Unicode License": ["Unicode/ICU License"]
+}
+unknown_licenses_map = {

Review comment:
       These dependencies are unknown for this script, right 😅 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to