diff --git a/src/python/nimbusml.pyproj b/src/python/nimbusml.pyproj
index c22c2a99..efc6c9a0 100644
--- a/src/python/nimbusml.pyproj
+++ b/src/python/nimbusml.pyproj
@@ -792,13 +792,13 @@
-
+
-
+
diff --git a/src/python/tools/changeHttpURLsToHttps.py b/src/python/tools/change_to_https.py
similarity index 77%
rename from src/python/tools/changeHttpURLsToHttps.py
rename to src/python/tools/change_to_https.py
index d7202777..9091452e 100644
--- a/src/python/tools/changeHttpURLsToHttps.py
+++ b/src/python/tools/change_to_https.py
@@ -4,10 +4,9 @@
# -------------------------------------------------------------------------
# Converts all valid HTTP links to HTTPS, where the fed
-# HTTP links are found in Report_AlterableUrls_FindHttpURLs.csv, which
-# is generated by FindHttpURLs.py
-# usage: python3 changeHttpURLsToHttps.py [PATH_TO_Report_FindHttpURLs.txt] [PATH_TO_ROOT_OF_NIMBUSML_DIRECTORY]
-# output: Report_ReplaceHttpsURLs.txt
+# HTTP links are found in alterable_urls.csv, which
+# is generated by find_http_urls.py
+# Usage: python3 change_to_https.py urls.csv path_to_repo
import sys
import os
@@ -36,7 +35,7 @@ def changeUrls(pathToReportCsv, pathToRootDirectory):
def main():
if len(sys.argv) < 3:
- print("Usage: python3 changeHttpURLsToHttps.py [PATH_TO_Report_FindHttpURLs.txt] [PATH_TO_ORIGINAL_NIMBUSML_DIRECTORY]")
+ print("Usage: python3 change_to_https.py urls.csv path_to_repo")
exit(1)
changeUrls(sys.argv[1], sys.argv[2])
diff --git a/src/python/tools/findHttpURLs.py b/src/python/tools/find_http_urls.py
similarity index 89%
rename from src/python/tools/findHttpURLs.py
rename to src/python/tools/find_http_urls.py
index 823f6966..e22eb757 100644
--- a/src/python/tools/findHttpURLs.py
+++ b/src/python/tools/find_http_urls.py
@@ -5,8 +5,8 @@
# Finds all HTTP URLs found in the NimbusML repository
# Converts all valid HTTP links to HTTPS
-# Usage: python3 findHttpURLs.py [PATH_TO_NimbusML_REPOSITORY]
-# Output: Report_AlterableUrls_FindHttpURLs.csv, [Report_NonAlterableUrls_FindHttpURLs.csv, Report_InvalidUrls_FindHttpURLs.csv]
+# Usage: python3 find_http_urls.py path_to_repo
+# Output: alterable_urls.csv, non_alterable_urls.csv, invalid_urls.csv
# Required non-standard pip library: urlextract
@@ -73,19 +73,19 @@ def findHttpUrls(searchRootDirectory):
makeReports(alterableUrlsStore, nonAlterableUrlsStore, invalidUrlsStore)
def makeReports(alterableUrlsStore, nonAlterableUrlsStore, invalidUrlsStore):
- with open('Report_AlterableUrls_FindHttpURLs.csv', mode='w', newline='') as csv_file:
+ with open('alterable_urls.csv', mode='w', newline='') as csv_file:
writer1 = csv.writer(csv_file, delimiter='\t', quotechar='|', quoting=csv.QUOTE_MINIMAL)
writer1.writerow(["url", "relativeFilepath"])
for urlKey in alterableUrlsStore:
for fileValue in alterableUrlsStore[urlKey]:
writer1.writerow([urlKey, fileValue])
- with open('Report_NonAlterableUrls_FindHttpURLs.csv', mode='w', newline='') as csv_file:
+ with open('non_alterable_urls.csv', mode='w', newline='') as csv_file:
writer2 = csv.writer(csv_file, delimiter='\t', quotechar='|', quoting=csv.QUOTE_MINIMAL)
writer2.writerow(["url", "relativeFilepath"])
for urlKey in nonAlterableUrlsStore:
for fileValue in nonAlterableUrlsStore[urlKey]:
writer2.writerow([urlKey, fileValue])
- with open('Report_InvalidUrls_FindHttpURLs.csv', mode='w', newline='') as csv_file:
+ with open('invalid_urls.csv', mode='w', newline='') as csv_file:
writer3 = csv.writer(csv_file, delimiter='\t', quotechar='|', quoting=csv.QUOTE_MINIMAL)
writer3.writerow(["url", "relativeFilepath"])
for urlKey in invalidUrlsStore:
@@ -95,7 +95,7 @@ def makeReports(alterableUrlsStore, nonAlterableUrlsStore, invalidUrlsStore):
def main():
if len(sys.argv) < 2:
- print("Usage: python3 findHttpURLs.py [PATH_TO_NimbusML_REPOSITORY]")
+ print("Usage: python3 find_http_urls.py path_to_repo")
exit(1)
findHttpUrls(sys.argv[1])