<!-- image = "images/how-are-you-two-face.jpeg" -->

Here’s how I’ve been the last 14 days:

  • Wed 9/18: TODO
  • Tue 9/17: TODO
  • Mon 9/16: TODO
  • Sun 9/15: TODO
  • Sat 9/14: TODO
  • Fri 9/13: TODO
  • Thu 9/12: TODO
  • Wed 9/11: TODO
  • Tue 9/10: TODO
  • Mon 9/9: TODO
  • Sun 9/8: TODO
  • Sat 9/7: TODO
  • Fri 9/6: TODO
  • Thu 9/5: TODO

(Last Updated: )

.gitlab-ci.yml
# .gitlab-ci.yml
image: curlimages/curl:latest

deploy:
  stage: deploy
  rules:
    - if: '$CI_PIPELINE_SOURCE == "schedule"'
  script:
    - curl -X POST -d {} https://api.netlify.com/build_hooks/<redacted>
.github/workflows/main.yml
# .github/workflows/main.yml
name: Trigger Netlify Build
on:
  schedule:
    - cron: '0 */3 * * *' # every 3 hours
jobs:
  build:
    name: Request Netlify Webhook
    runs-on: ubuntu-latest
    steps:
      - name: Curl request
        run: curl -X POST -d {} https://api.netlify.com/build_hooks/<redacted>

Normally I reflexively respond with “I’m good” or “I’m okay” when someone asks how I’m doing. But after tracking my mood, energy, and many other things using exist.io, and seeing how it has a API, I decided to scrape my moods and share it here on my site.

Here’s the Hugo shortcode I wrote for it in-case you want to do something similar:

// layouts/shortcodes/exist_mood_fetch.html
{{ $moods := slice "TODO" "Terrible" "Very bad" "Bad" "Slightly bad" "Okay" "Slightly good" "Good" "Very good" "Excellent"}}
{{ $link  := "https://exist.io/api/2/attributes/values?attribute=mood" }}
{{ $token := .Get "token" }}
{{ $lookback := (default 7 (.Get "lookback")) }}
{{ $headers := dict "Authorization" (printf "Token %s" $token)}}
{{ with $resp := getJSON $link $headers }}
<ul>
    {{ range $result := (first $lookback $resp.results) }}
        {{ $moodValue := default 0 $result.value }}
        {{ $moodString := (index $moods (int $moodValue)) }}
        {{ $formattedDate :=  (time.Format "Mon 1/2" $result.date) }}
        <li><b>{{ $formattedDate }}:</b> <i>{{$moodString }}</i></li>
    {{ end }}
</ul>
{{ end }}

The exist.io API returns null for the result’s value when the user does not check-in with their mood and note for the day. This will show up as “TODO” above.

I’ve had a great experience tracking my day-to-day life using this app, if you are interested in giving it a shot, you could use my referral so we can both get some free months:

Referral: https://exist.io/?referred_by=austinmillan