Skip to content

Instantly share code, notes, and snippets.

@zainab-ali
Created June 19, 2025 22:18
Show Gist options
  • Save zainab-ali/ef7eea79b32b1e265c216e818eb96dab to your computer and use it in GitHub Desktop.
Save zainab-ali/ef7eea79b32b1e265c216e818eb96dab to your computer and use it in GitHub Desktop.
London Scala User Group Talks Thank-you Template
//> using dep tech.neander::cue4s::latest.release
import cue4s.*
case class Attributes(
@cue(_.text("Intro slides"))
introSlides: String,
@cue(_.text("Venue"))
venue: String,
@cue(_.text("Venue bsky"))
venueBsky: String,
@cue(_.text("First speaker name"))
speaker1Bsky: String,
@cue(_.text("First speaker bluesky handle"))
speaker1Name: String,
@cue(_.text("First speaker talk title"))
talk1: String,
@cue(_.text("First speaker slides"))
speaker1Slides: String,
@cue(_.text("Second speaker name"))
speaker2Name: String,
@cue(_.text("Second speaker bluesky handle"))
speaker2Bsky: String,
@cue(_.text("Second speaker talk title"))
talk2: String,
@cue(_.text("Second speaker slides"))
speaker2Slides: String,
@cue(_.text("Next talk date"))
nextTalksDate: String,
@cue(_.text("Next talk link"))
nextTalksLink: String,
@cue(_.text("Next hack date"))
nextHackDate: String,
@cue(_.text("Next hack link"))
nextHackLink: String,
@cue(_.text("Next bridge date"))
nextBridgeDate: String,
@cue(_.text("Next bridge link"))
nextBridgeLink: String
) derives PromptChain
val attributes: Attributes =
Prompts.sync.use: p =>
p.run(PromptChain[Attributes]).getOrThrow
val template = """
=== Bluesky ===
Thank you for attending yesterday's Scala Talks! Thanks go to @<venue-bsky> for having us round for pizza, drinks and a beautiful venue. Special thanks go to our fantastic speakers @<speaker-1-bsky> and @<speaker-2-bsky>. See you next time!
πŸ—’ from us <intro-slides>
πŸ—’ from "<talk-1>" by @<speaker-1-bsky> : <speaker-1-slides>
πŸ—’ from "<talk-2>" by @<speaker-2-bsky> : <speaker-2-slides>
Join our Discord for video announcements https://discord.gg/aRCVCHmHES!
=== LinkedIn ===
Thank you for attending yesterday's Scala Talks! Thank go to <venue> for having us round for pizza, drinks and a beautiful venue. Special thanks go to our fantastic speakers <speaker-1> and <speaker-2>. See you next time!
πŸ—’ Slides from us <intro-slides>
πŸ—’ Slides from "<talk-1>" by <speaker-1> : <speaker-1-slides>
πŸ—’ Slides from "<talk-2>" by <speaker-2> : <speaker-2-slides>
🎟 Enter our Scala Days Underrepresented Group Discount Ticket Raffle: https://forms.gle/cKjqBHW36VsgMB3u7
πŸ“… Save the date for our next meetup on <next-talks-date> <next-talks-link>
πŸ“… Come along to the OSS hack on <next-hack-date> <next-hack-link>
πŸ“… Come along to ScalaBridge on <next-bridge-date> <next-bridge-link>
πŸ“’Join our Discord for video announcements: https://discord.gg/aRCVCHmHES!
πŸ‘·Join our Discord #jobs channel for job postings: https://discord.gg/aRCVCHmHES!
=== Meetup ===
Thank you for attending yesterday's Scala Talks! We hope you enjoyed it as much as we did. Thanks go to <venue> for having us round for pizza, drinks and a beautiful venue. Special thanks go to our fantastic speakers <speaker-1> and <speaker-2>.
- πŸ—’ [slides from us](<intro-slides>)
- πŸ—’ [slides from "<talk-1>" by <speaker-1>](<speaker-1-slides>)
- πŸ—’ [slides from "<talk-2>" by <speaker-2>](<speaker-2-slides>)
- 🎟 [Enter our Scala Days Underrepresented Group Discount Ticket Raffle](https://forms.gle/cKjqBHW36VsgMB3u7)
- πŸ“… [Save the date for our next meetup on <next-talks-date>](<next-talks-link>)
- πŸ“… [Come along to the OSS hack on <next-hack-date>](<next-hack-link>)
- πŸ“… [Come along to ScalaBridge on <next-bridge-date>](<next-bridge-link>)
- πŸ“’[Join our Discord for video announcements](https://discord.gg/aRCVCHmHES)
- πŸ‘·[Join our Discord jobs channel for job postings](https://discord.gg/aRCVCHmHES)
See you soon!
London Scala User Group
"""
val filledIn = template
.replaceAll("<intro-slides>", attributes.introSlides)
.replaceAll("<venue>", attributes.venue)
.replaceAll("<venue-bsky>", attributes.venueBsky)
.replaceAll("<speaker-1-bsky>", attributes.speaker1Bsky)
.replaceAll("<speaker-1>", attributes.speaker1Name)
.replaceAll("<talk-1>", attributes.talk1)
.replaceAll("<speaker-1-slides>", attributes.speaker1Slides)
.replaceAll("<speaker-2-bsky>", attributes.speaker2Bsky)
.replaceAll("<speaker-2>", attributes.speaker2Name)
.replaceAll("<talk-2>", attributes.talk2)
.replaceAll("<speaker-2-slides>", attributes.speaker2Slides)
.replaceAll("<next-talks-date>", attributes.nextTalksDate)
.replaceAll("<next-talks-link>", attributes.nextTalksLink)
.replaceAll("<next-hack-date>", attributes.nextHackDate)
.replaceAll("<next-hack-link>", attributes.nextHackLink)
.replaceAll("<next-bridge-date>", attributes.nextBridgeDate)
.replaceAll("<next-bridge-link>", attributes.nextBridgeLink)
println(filledIn)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment