From b0a5bb4663dcd9561ab032869341607422f4cdc1 Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Wed, 29 May 2024 15:57:10 +0300 Subject: [PATCH] data_models: add Google Scholar as a social network (#85) --- rendercv/data_models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rendercv/data_models.py b/rendercv/data_models.py index b93f17a..a382239 100644 --- a/rendercv/data_models.py +++ b/rendercv/data_models.py @@ -838,6 +838,7 @@ SocialNetworkName = Literal[ "StackOverflow", "ResearchGate", "YouTube", + "Google Scholar", ] available_social_networks = get_args(SocialNetworkName) @@ -908,6 +909,7 @@ class SocialNetwork(RenderCVBaseModel): "StackOverflow": "https://stackoverflow.com/users/", "ResearchGate": "https://researchgate.net/profile/", "YouTube": "https://youtube.com/", + "Google Scholar": "https://scholar.google.com/citations?user=", } url = url_dictionary[self.network] + self.username @@ -1018,6 +1020,7 @@ class CurriculumVitae(RenderCVBaseModel): "Twitter": "\\faTwitter", "ResearchGate": "\\faResearchgate", "YouTube": "\\faYoutube", + "Google Scholar": "\\faGraduationCap", } for social_network in self.social_networks: clean_url = social_network.url.replace("https://", "").rstrip("/") @@ -1031,6 +1034,9 @@ class CurriculumVitae(RenderCVBaseModel): if social_network.network == "StackOverflow": username = social_network.username.split("/")[1] connection["placeholder"] = username + if social_network.network == "Google Scholar": + connection["placeholder"] = "Google Scholar" + connections.append(connection) return connections