Skip to content

Commit ea7fa93

Browse files
committed
Pulling Changes - Conflict Resolved for Merge
2 parents 2c9fa53 + 5581dd9 commit ea7fa93

File tree

14 files changed

+1874
-152
lines changed

14 files changed

+1874
-152
lines changed

Pipfile.lock

Lines changed: 17 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/create_gcs_query_plan.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def get_tool_urls():
117117
file_path = shared.path_join(PATHS["data"], "legal-tool-paths.txt")
118118
prefix = "//creativecommons.org/"
119119
tool_urls = []
120-
with open(file_path, "r") as file_obj:
120+
with open(file_path, "r", encoding="utf-8") as file_obj:
121121
for line in file_obj:
122122
tool_urls.append(f"{prefix}{line.strip()}")
123123
LOGGER.info("Prioritizing CC Legal Tool URLs")
@@ -127,14 +127,14 @@ def get_tool_urls():
127127

128128
def load_countries():
129129
file_path = shared.path_join(PATHS["data"], "gcs_country_collection.yaml")
130-
with open(file_path, "r") as file_obj:
130+
with open(file_path, "r", encoding="utf-8") as file_obj:
131131
countries = yaml.safe_load(file_obj)
132132
return countries
133133

134134

135135
def load_languages():
136136
file_path = shared.path_join(PATHS["data"], "gcs_language_collection.yaml")
137-
with open(file_path, "r") as file_obj:
137+
with open(file_path, "r", encoding="utf-8") as file_obj:
138138
languages = yaml.safe_load(file_obj)
139139
return languages
140140

@@ -209,7 +209,7 @@ def save_plan(plan):
209209
"LANGUAGE",
210210
"LR",
211211
]
212-
with open(file_path, "w") as file_obj:
212+
with open(file_path, "w", encoding="utf-8", newline="\n") as file_obj:
213213
writer = csv.DictWriter(
214214
file_obj, fieldnames=fieldnames, dialect="unix"
215215
)

dev/prioritize_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def get_tool_urls():
4242
file_path = shared.path_join(PATHS["data"], "legal-tool-paths.txt")
4343
prefix = "//creativecommons.org/"
4444
tool_urls = []
45-
with open(file_path, "r") as file_obj:
45+
with open(file_path, "r", encoding="utf-8") as file_obj:
4646
for line in file_obj:
4747
tool_urls.append(f"{prefix}{line.strip()}")
4848
return tool_urls
@@ -112,7 +112,7 @@ def save_tools_list(tool_urls):
112112
LOGGER.info("Saving prioritized CC Legal Tool URLs")
113113
file_path = shared.path_join(PATHS["data"], "prioritized-tool-urls.txt")
114114
tool_urls.append("") # ensure file has end of file newline
115-
with open(file_path, "w") as file_obj:
115+
with open(file_path, "w", encoding="utf-8", newline="\n") as file_obj:
116116
file_obj.writelines("\n".join(tool_urls))
117117

118118

env.example

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
# This file must be copied to .env and the appropriate variables populated.
22

33

4-
## GCS (Google Custom Search)
4+
## Europeana
5+
6+
# Europeana Search API Documentation:
7+
# https://europeana.atlassian.net/wiki/spaces/EF/pages/2385739812/Search+API+Documentation#Request
8+
9+
# EUROPEANA_API_KEY =
10+
11+
12+
# GCS (Google Custom Search)
513

614
# https://developers.google.com/custom-search/v1/introduction
715
# "Custom Search JSON API requires the use of an API key. An API key is a way

0 commit comments

Comments
 (0)