diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..85c55eb
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+.env
+.venv
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..2e098f5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,16 @@
+PYTHON=.venv/bin/python
+
+.PHONY: build install
+
+install: requirements.txt
+ $(PYTHON) -m pip install -r $^
+
+build: build-svg.py template.svg
+ $(PYTHON) $<
+ git add '*.svg' && \
+ GIT_AUTHOR_NAME='publicmatt' GIT_AUTHOR_EMAIL='git@publicmatt.com' \
+ GIT_COMMITTER_NAME='publicmatt' GIT_COMMITTER_EMAIL='git@publicmatt.com' \
+ git commit -m "Auto-updating git readme"
+ git push publicmatt
+ git push github
+
diff --git a/build-svg.py b/build-svg.py
new file mode 100644
index 0000000..3f3817d
--- /dev/null
+++ b/build-svg.py
@@ -0,0 +1,96 @@
+import os
+import requests
+import pendulum
+import json
+from dotenv import load_dotenv
+import sys
+from pathlib import Path
+
+# load env files
+load_dotenv()
+
+# part of current dir
+app_path = Path(__file__).parent
+
+# Environment variable for API key
+WEATHER_API_KEY = os.getenv("WEATHER_API_KEY")
+WEATHER_DOMAIN = "http://dataservice.accuweather.com"
+
+# emojis that accuweather uses
+emojis = {
+ 1: "βοΈ",
+ 2: "βοΈ",
+ 3: "π€",
+ 4: "π€",
+ 5: "π€",
+ 6: "π₯",
+ 7: "βοΈ",
+ 8: "βοΈ",
+ 11: "π«",
+ 12: "π§",
+ 13: "π¦",
+ 14: "π¦",
+ 15: "β",
+ 16: "β",
+ 17: "π¦",
+ 18: "π§",
+ 19: "π¨",
+ 20: "π¨",
+ 21: "π¨",
+ 22: "βοΈ",
+ 23: "βοΈ",
+ 24: "π§",
+ 25: "π§",
+ 26: "π§",
+ 29: "π§",
+ 30: "π₯΅",
+ 31: "π₯Ά",
+ 32: "π¨",
+}
+
+dayBubbleWidths = {
+ "Monday": 235,
+ "Tuesday": 235,
+ "Wednesday": 260,
+ "Thursday": 245,
+ "Friday": 220,
+ "Saturday": 245,
+ "Sunday": 230,
+}
+
+# Time since graduating
+today = pendulum.now()
+todayDay = today.format("dddd")
+
+psTime = pendulum.instance(today).diff_for_humans(
+ pendulum.datetime(2023, 12, 14), absolute=True
+)
+
+# Today's weather
+locationKey = "331416" # Bellingham
+url = f"forecasts/v1/daily/1day/{locationKey}?apikey={WEATHER_API_KEY}"
+
+try:
+ response = requests.get(f"{WEATHER_DOMAIN}/{url}")
+ response.raise_for_status()
+ json_data = response.json()
+
+ degF = round(json_data["DailyForecasts"][0]["Temperature"]["Maximum"]["Value"])
+ degC = round((degF - 32) * 5 / 9)
+ icon = json_data["DailyForecasts"][0]["Day"]["Icon"]
+
+ with open(app_path / "template.svg", "r", encoding="utf-8") as file:
+ data = file.read()
+
+ data = data.replace("{degF}", str(degF))
+ data = data.replace("{degC}", str(degC))
+ data = data.replace("{weatherEmoji}", emojis[icon])
+ data = data.replace("{psTime}", psTime)
+ data = data.replace("{todayDay}", todayDay)
+ data = data.replace("{dayBubbleWidth}", str(dayBubbleWidths[todayDay]))
+
+ with open(app_path / "chat.svg", "w", encoding="utf-8") as file:
+ file.write(data)
+
+except requests.exceptions.RequestException as err:
+ print(err, file=sys.stderr)
diff --git a/chat.svg b/chat.svg
index fb68a03..a97e3f4 100644
--- a/chat.svg
+++ b/chat.svg
@@ -248,10 +248,10 @@
-
+
- Hi, I'm Jason
+ Hi, I'm Matt
@@ -272,11 +272,11 @@
-
+
- I live in Columbus, Ohio where itβs supposed to be
- 49Β° F (9Β° C) and π§ today.
+ I live in Bellingham, Washington where itβs supposed to be
+ 46Β° F (8Β° C) and π¦ today.
@@ -300,8 +300,8 @@
- Iβm a product designer. I used to work at GitHub,
- but Iβve been at PlanetScale for almost 3 years now.
+ I write software. I work in web, data and machine learning,
+ and graduated from Western Washington University with a MS in Computer Science 5 days ago.
@@ -322,12 +322,12 @@
-
+
- You can find me on Twitter at
- https://twitter.com/jasonlong
+ You can find me online at
+ https://www.publicmatt.com/
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..b3cdf78
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,4 @@
+requests
+pendulum
+quantiphy
+python-dotenv
diff --git a/template.svg b/template.svg
new file mode 100644
index 0000000..ea44ba5
--- /dev/null
+++ b/template.svg
@@ -0,0 +1,381 @@
+