Skip to content

Commit

Permalink
Merge pull request #27 from skirmer/generator
Browse files Browse the repository at this point in the history
Updating design of summaries and adding talks to main page
  • Loading branch information
skirmer authored Apr 19, 2024
2 parents e49cbc2 + ffd4f35 commit 6b6f6da
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 24 deletions.
5 changes: 2 additions & 3 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@ name = "medium"
url = "https://medium.com/@s.kirmer"

[params]
mainSections = "writing"


mainSections = ["writing", "speaking"]
recent_posts_number = 3
7 changes: 4 additions & 3 deletions content/speaking/aqi_2024.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
1 change: 1 addition & 0 deletions content/speaking/ocair.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 15 additions & 10 deletions generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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}
Expand All @@ -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
Expand All @@ -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)

Expand Down
14 changes: 7 additions & 7 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@

<a href="http://linkedin.com/in/skirmer" target="_blank" rel="noopener" class="linkedin ananke-social-link link-transition stackoverflow link dib z-999 pt3 pt0-l mr1" title="LinkedIn link" aria-label="follow on LinkedIn——Opens in a new window">

<span class="icon"><svg style="enable-background:new 0 0 65 65;" version="1.1" viewBox="0 0 65 65" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M50.837,48.137V36.425c0-6.275-3.35-9.195-7.816-9.195 c-3.604,0-5.219,1.983-6.119,3.374V27.71h-6.79c0.09,1.917,0,20.427,0,20.427h6.79V36.729c0-0.609,0.044-1.219,0.224-1.655 c0.49-1.22,1.607-2.483,3.482-2.483c2.458,0,3.44,1.873,3.44,4.618v10.929H50.837z M22.959,24.922c2.367,0,3.842-1.57,3.842-3.531 c-0.044-2.003-1.475-3.528-3.797-3.528s-3.841,1.524-3.841,3.528c0,1.961,1.474,3.531,3.753,3.531H22.959z M34,64 C17.432,64,4,50.568,4,34C4,17.431,17.432,4,34,4s30,13.431,30,30C64,50.568,50.568,64,34,64z M26.354,48.137V27.71h-6.789v20.427 H26.354z" style="fill-rule:evenodd;clip-rule:evenodd;"/>
</svg>
<span class="icon"><svg style="enable-background:new 0 0 65 65;" version="1.1" viewBox="0 0 65 65" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M50.837,48.137V36.425c0-6.275-3.35-9.195-7.816-9.195 c-3.604,0-5.219,1.983-6.119,3.374V27.71h-6.79c0.09,1.917,0,20.427,0,20.427h6.79V36.729c0-0.609,0.044-1.219,0.224-1.655 c0.49-1.22,1.607-2.483,3.482-2.483c2.458,0,3.44,1.873,3.44,4.618v10.929H50.837z M22.959,24.922c2.367,0,3.842-1.57,3.842-3.531 c-0.044-2.003-1.475-3.528-3.797-3.528s-3.841,1.524-3.841,3.528c0,1.961,1.474,3.531,3.753,3.531H22.959z M34,64 C17.432,64,4,50.568,4,34C4,17.431,17.432,4,34,4s30,13.431,30,30C64,50.568,50.568,64,34,64z M26.354,48.137V27.71h-6.789v20.427 H26.354z" style="fill-rule:evenodd;clip-rule:evenodd;"/>
</svg>
</span>

<span class="new-window"><svg height="8px" style="enable-background:new 0 0 1000 1000;" version="1.1" viewBox="0 0 1000 1000" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" >
Expand Down Expand Up @@ -186,7 +186,7 @@ <h6 id="photo-by-pedro-lastrahttpsunsplashcompeterlasterutm_sourceunsplashutm_me


<h1 class="flex-none">
Recent Writing
Recent Writing and Speaking
</h1>


Expand Down Expand Up @@ -294,9 +294,9 @@ <h2 class="f5 fw4 mb4 dib mr3">

<a href="http://linkedin.com/in/skirmer" target="_blank" rel="noopener" class="linkedin ananke-social-link link-transition stackoverflow link dib z-999 pt3 pt0-l mr1" title="LinkedIn link" aria-label="follow on LinkedIn——Opens in a new window">

<span class="icon"><svg style="enable-background:new 0 0 65 65;" version="1.1" viewBox="0 0 65 65" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M50.837,48.137V36.425c0-6.275-3.35-9.195-7.816-9.195 c-3.604,0-5.219,1.983-6.119,3.374V27.71h-6.79c0.09,1.917,0,20.427,0,20.427h6.79V36.729c0-0.609,0.044-1.219,0.224-1.655 c0.49-1.22,1.607-2.483,3.482-2.483c2.458,0,3.44,1.873,3.44,4.618v10.929H50.837z M22.959,24.922c2.367,0,3.842-1.57,3.842-3.531 c-0.044-2.003-1.475-3.528-3.797-3.528s-3.841,1.524-3.841,3.528c0,1.961,1.474,3.531,3.753,3.531H22.959z M34,64 C17.432,64,4,50.568,4,34C4,17.431,17.432,4,34,4s30,13.431,30,30C64,50.568,50.568,64,34,64z M26.354,48.137V27.71h-6.789v20.427 H26.354z" style="fill-rule:evenodd;clip-rule:evenodd;"/>
</svg>
<span class="icon"><svg style="enable-background:new 0 0 65 65;" version="1.1" viewBox="0 0 65 65" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M50.837,48.137V36.425c0-6.275-3.35-9.195-7.816-9.195 c-3.604,0-5.219,1.983-6.119,3.374V27.71h-6.79c0.09,1.917,0,20.427,0,20.427h6.79V36.729c0-0.609,0.044-1.219,0.224-1.655 c0.49-1.22,1.607-2.483,3.482-2.483c2.458,0,3.44,1.873,3.44,4.618v10.929H50.837z M22.959,24.922c2.367,0,3.842-1.57,3.842-3.531 c-0.044-2.003-1.475-3.528-3.797-3.528s-3.841,1.524-3.841,3.528c0,1.961,1.474,3.531,3.753,3.531H22.959z M34,64 C17.432,64,4,50.568,4,34C4,17.431,17.432,4,34,4s30,13.431,30,30C64,50.568,50.568,64,34,64z M26.354,48.137V27.71h-6.789v20.427 H26.354z" style="fill-rule:evenodd;clip-rule:evenodd;"/>
</svg>
</span>

<span class="new-window"><svg height="8px" style="enable-background:new 0 0 1000 1000;" version="1.1" viewBox="0 0 1000 1000" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" >
Expand Down
2 changes: 1 addition & 1 deletion themes/ananke/i18n/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ other = "More"
other = "All {{.Title }}"

[recentTitle]
other = "Recent {{.Title }}"
other = "Recent Writing and Speaking"

[readMore]
other = "read more"
Expand Down

0 comments on commit 6b6f6da

Please sign in to comment.