euro interest

This commit is contained in:
vilmibm 2025-09-07 12:00:19 -07:00
parent 33db23c8c7
commit 403460ae80
2 changed files with 58 additions and 0 deletions

View File

@ -290,6 +290,56 @@ func submit(o opts) error {
return nil
}
type euroData struct {
Username string
Interested bool
}
func euro(o opts) error {
euroContent, err := md.ReadFile("md/euro.md")
if err != nil {
return err
}
out, err := glamour.Render(string(euroContent), "auto")
if err != nil {
return err
}
fmt.Println(out)
var interested bool
form := huh.NewForm(
huh.NewGroup(
huh.NewConfirm().Title("So...would you be interested?").Value(&interested),
)).WithTheme(huh.ThemeBase())
if err := form.Run(); err != nil {
return err
}
ed := euroData{
Username: o.Username,
Interested: interested,
}
if err = sendEuroEmail(vd); err != nil {
return err
}
fmt.Println("THANK YOU~!!")
return nil
}
func sendEuroEmail(ed euroData) error {
bs, err := yaml.Marshal(vd)
if err != nil {
return err
}
return email.SendLocalEmail("vilmibm", "TOWNCON25 EURO INTEREST", string(bs))
}
type voteData struct {
Username string
Days []string
@ -446,6 +496,7 @@ func _main() error {
huh.NewSelect[string]().Title("whadduyu wanna doo?").
Options(
huh.NewOption("VOTE ON DAY", "vote"),
huh.NewOption("EUROPE: REGISTER INTEREST", "euro"),
huh.NewOption("Get an info dump", "info"),
//huh.NewOption("SEE SCHEDULE", "schedule"),
//huh.NewOption("RSVP", "rsvp"),
@ -472,6 +523,8 @@ func _main() error {
return jam(o)
case "vote":
return vote(o)
case "euro":
return euro(o)
case "quit":
default:
return fmt.Errorf("wtf '%s'", mode)

5
cmd/towncon/md/euro.md Normal file
View File

@ -0,0 +1,5 @@
On the 11th of October there will be an informal tilde town meetup. The 11th is the actual birthday of the town so it'll be a special little bday party.
It will be in Italy in either Florence or Rome; timing/venue TBD but the day is for sure.
Getting a rough headcount now will help us plan better!