From 22fa39a789a9a84d305ec85e26fb35c5ad1b6b8f Mon Sep 17 00:00:00 2001 From: Stephanie Kirmer Date: Fri, 19 Apr 2024 15:11:06 -0500 Subject: [PATCH 1/3] Adding speaking to the index content --- config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.toml b/config.toml index 5fbffc9..c2ca5fd 100644 --- a/config.toml +++ b/config.toml @@ -18,6 +18,6 @@ name = "medium" url = "https://medium.com/@s.kirmer" [params] -mainSections = "writing" +mainSections = ["writing", "speaking"] From 8e2570cdf2f9fb37d2184766c51a33c2b5d7f855 Mon Sep 17 00:00:00 2001 From: Stephanie Kirmer Date: Fri, 19 Apr 2024 15:11:50 -0500 Subject: [PATCH 2/3] Adding speaking to the index content --- public/index.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/public/index.html b/public/index.html index 7a2e6d5..66088ba 100644 --- a/public/index.html +++ b/public/index.html @@ -118,9 +118,9 @@ - - - + + + @@ -186,7 +186,7 @@
- Recent Writing + Recent Writing and Speaking
@@ -294,9 +294,9 @@

- - - + + + From ffd4f355b2796d864543b9eb77715764d1e5599a Mon Sep 17 00:00:00 2001 From: Stephanie Kirmer Date: Fri, 19 Apr 2024 15:31:49 -0500 Subject: [PATCH 3/3] Tidying up article summaries --- config.toml | 3 +-- content/speaking/aqi_2024.md | 7 ++++--- content/speaking/ocair.md | 1 + generator.py | 25 +++++++++++++++---------- themes/ananke/i18n/en.toml | 2 +- 5 files changed, 22 insertions(+), 16 deletions(-) diff --git a/config.toml b/config.toml index c2ca5fd..94bf12a 100644 --- a/config.toml +++ b/config.toml @@ -19,5 +19,4 @@ url = "https://medium.com/@s.kirmer" [params] mainSections = ["writing", "speaking"] - - +recent_posts_number = 3 diff --git a/content/speaking/aqi_2024.md b/content/speaking/aqi_2024.md index 643a0d7..b44ecda 100644 --- a/content/speaking/aqi_2024.md +++ b/content/speaking/aqi_2024.md @@ -4,9 +4,10 @@ description: "AI Quality Conference" featured_image: "" tags: ["webinar", "careers"] title: "UPCOMING: AI Quality Conference" +summary: "See me in June in San Francisco at AQI talking about data privacy and how to balance it with innovating in your AI development!" --- -Topic: Building Safer AI: Balancing Data Privacy with Innovation -Location: San Francisco -Date: June 25, 2024 +Topic: Building Safer AI: Balancing Data Privacy with Innovation +Location: San Francisco +Date: June 25, 2024 Links: [https://www.aiqualityconference.com/](https://www.aiqualityconference.com/) diff --git a/content/speaking/ocair.md b/content/speaking/ocair.md index c282ba6..e23b9bf 100644 --- a/content/speaking/ocair.md +++ b/content/speaking/ocair.md @@ -4,6 +4,7 @@ description: "OCAIR Professional Development Webinar Series" featured_image: "" tags: ["webinar", "careers"] title: "OCAIR Professional Development Webinar Series" +summary: "I spoke to overseas Chinese students and scholars about career opportunities in data science. Click for full video." --- Topic: Decoding Data Science Roles: A guide to the different jobs data scientists (really) do diff --git a/generator.py b/generator.py index 9849607..333b320 100644 --- a/generator.py +++ b/generator.py @@ -23,10 +23,6 @@ def get_image(soup): img_caption = soup.figure.figcaption return img_link, img_caption -def get_subtitle(soup): - subtitle = soup.find_all('h4')[0].text - return subtitle - def get_date(soup): date = soup.published_parsed year = date[0] @@ -38,7 +34,7 @@ def get_tags(base_item): tags = [j['term'] for j in base_item['tags']] return tags -def generate_yaml(img_link, tags, base_item, year, month, day): +def generate_yaml(img_link, tags, base_item, year, month, day, subtitle=None): yaml_str = f""" --- date: {year}-{month}-{day} @@ -48,12 +44,17 @@ def generate_yaml(img_link, tags, base_item, year, month, day): disable_share: false --- """ + # summary: "{subtitle}" + return yaml_str def get_body(base_item): body = md(base_item, strip=['figure', 'figcaption', 'title', 'img']) return body - + +def get_subtitle(soup): + subtitle = soup.find_all('h4')[0].text + return subtitle def get_body2(soup): i_tag = soup.figure @@ -71,10 +72,14 @@ def get_body2(soup): tags = get_tags(i) year, month, day = get_date(i) print(year, month, day) - # try: - # subtitle = get_subtitle(soup) - # except: - # continue + + # Debating whether to make subtitles automatically the summary- not currently doing this but TBD + # If I do want to do that, just need to add subtitle as argument to generate_yaml + try: + subtitle = get_subtitle(soup) + except: + subtitle = "" + print(subtitle) body = get_body2(soup) yaml_str = generate_yaml(img_link, tags, i, year, month, day) diff --git a/themes/ananke/i18n/en.toml b/themes/ananke/i18n/en.toml index 4e5638d..e815289 100644 --- a/themes/ananke/i18n/en.toml +++ b/themes/ananke/i18n/en.toml @@ -5,7 +5,7 @@ other = "More" other = "All {{.Title }}" [recentTitle] -other = "Recent {{.Title }}" +other = "Recent Writing and Speaking" [readMore] other = "read more"