2025.03.14 aka Mo' Money, Mo' Formatting Problems

Today, I continued work on Bmore Today.

Small Things

Made all source links absolute URLs

I noticed a small problem with one of the source's links. Previously, if you clicked on baltshowplace.tumblr.com, it would actually direct to https://bmoretoday.modamo.xyz/baltshowplace.tumblr.com. Turns out when passing a URL to href, if it doesn't have a protocol prepended, it's interpreted as a relative URL instead of absolute. Source of the problem was that in the script for event retrieval, I was passing baltshowplace.tumblr.com as the source property. The Tumblr API requires that the blogIdentifier is passed to access a blog's posts. So since I already had a variable for blogIdentifier, I just passed it as the source. This was an easy fix, just had to prepend https:// to blogIdentifier when inserting it into the database.

Dropped TIME column

Now that I have startTime and endTime properties, bye-bye redundant time property 👋🏾! Just removed all mentions of time in the scripts, adjusted the insertion query, and dropped the TIME column.

Now displays "Not Provided" if there's no start time

It must be rare because I didn't notice it until today. There was an event that said to DM the provided handle for the address. This populated the location property, but no time was provided (maybe that'll be given with the address?). So, on the frontend, it was just displaying null. Another quick fix: just adjusted the conditional rendering statement to display "Not Provided" if there's no startTime (but now that I'm thinking about it, I wonder if this'll affect the sorting by time 🤔).

Big Thing: Setting the stage for Price Standardization

Yesterday, I said today's task would be tackling prices. Here are all the unique price formats I documented just from today's events:

  • $25
  • $FREE
  • Unknown
  • $10-$15
  • $SOLD OUT
  • $15 adv/$20 doors
  • $
  • Not Provided
  • 30
  • FREE
  • Free
  • Free-$5
  • 0-30
  • $39 to $59 21+ over. 100% ID Check.
  • $15-55
  • $25 in advance, $35 at the door, $10 reduced
  • $12 in advance, $15 at the door
  • Vary
  • FREE, donations welcome!
  • $10.00

Sigh...

Current plan is to move from one price prop that's a string to three new properties:

  • minPrice
  • maxPrice
  • priceDescription

minPrice and maxPrice will be floats with two decimals or either +/- Infinity (on the frontend, SQL supposedly doesn't support Infinity so it'll be null there). Added those columns to the table and adjusted the Event type, making sure to mark the three new properties as optional with ? so nothing breaks in the transition. Tomorrow will be the fun part: adjusting the regexes to account for all of the various price options. ...yay (but actually. The challenge is frustrating, but fulfilling).

Final Thoughts

Today's session was table setting, the tricky part will be updating the regexes (Free-$5 and $39 to $59 21+ over. 100% ID Check. seem like they'll be the trickiest for some reason.) Until then, I'm gonna enjoy the apple pie I got today and see Cap 4 for the second time.

Happy Pi Day! 🥧