forked from tildetown/town
jams
This commit is contained in:
parent
d950aaead2
commit
b9bd05402d
@ -157,7 +157,13 @@ func rsvp(o opts) error {
|
|||||||
Freeform: freeform,
|
Freeform: freeform,
|
||||||
PhysicalData: pd}
|
PhysicalData: pd}
|
||||||
|
|
||||||
return sendRSVPEmail(rd)
|
if err = sendRSVPEmail(rd); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Println("THANK YOUUUU!U!U!UU!U!!!!~~~!~!~~!!!!!UUU")
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type submitData struct {
|
type submitData struct {
|
||||||
@ -261,7 +267,78 @@ func submit(o opts) error {
|
|||||||
|
|
||||||
fmt.Println("THANK YOU!! I'll be in touch~")
|
fmt.Println("THANK YOU!! I'll be in touch~")
|
||||||
|
|
||||||
return sendSubmitEmail(sd)
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type jamData struct {
|
||||||
|
Username string
|
||||||
|
Desc string
|
||||||
|
Physical bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func jam(o opts) error {
|
||||||
|
jamContent, err := md.ReadFile("md/jam.md")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
out, err := glamour.Render(string(jamContent), "dracula")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
fmt.Println(out)
|
||||||
|
|
||||||
|
submitting := true
|
||||||
|
var desc string
|
||||||
|
var physical bool
|
||||||
|
|
||||||
|
notSubmitting := func() bool {
|
||||||
|
return !submitting
|
||||||
|
}
|
||||||
|
|
||||||
|
form := huh.NewForm(
|
||||||
|
huh.NewGroup(
|
||||||
|
huh.NewConfirm().Title("So...wanna propose a jam?").Value(&submitting),
|
||||||
|
),
|
||||||
|
huh.NewGroup(
|
||||||
|
huh.NewConfirm().Title("Excellent. Does it require being in person?").Value(&physical),
|
||||||
|
).WithHideFunc(notSubmitting),
|
||||||
|
huh.NewGroup(
|
||||||
|
huh.NewText().Title("Describe the jam.").
|
||||||
|
Description("Include details like required knowledge or tools").Value(&desc),
|
||||||
|
).WithHideFunc(notSubmitting),
|
||||||
|
)
|
||||||
|
|
||||||
|
if err := form.Run(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if !submitting {
|
||||||
|
fmt.Println("ok! just run the command again if you change your mind~")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
jd := jamData{
|
||||||
|
Username: o.Username,
|
||||||
|
Desc: desc,
|
||||||
|
Physical: physical,
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = sendJamEmail(jd); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Println("THANK YOU!! I'll be in touch~")
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func sendJamEmail(jd jamData) error {
|
||||||
|
bs, err := yaml.Marshal(jd)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return email.SendLocalEmail("vilmibm", "JAMPROP TOWNCON24", string(bs))
|
||||||
}
|
}
|
||||||
|
|
||||||
type opts struct {
|
type opts struct {
|
||||||
@ -307,6 +384,7 @@ func _main() error {
|
|||||||
case "submit":
|
case "submit":
|
||||||
return submit(o)
|
return submit(o)
|
||||||
case "jam":
|
case "jam":
|
||||||
|
return jam(o)
|
||||||
case "quit":
|
case "quit":
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("wtf '%s'", mode)
|
return fmt.Errorf("wtf '%s'", mode)
|
||||||
|
@ -14,7 +14,7 @@ Works submitted by townies will all be slotted into a viewing schedule to run th
|
|||||||
|
|
||||||
The text mode environment will either be a HERMETICUM instance (if I finish the project in time) or just IRC.
|
The text mode environment will either be a HERMETICUM instance (if I finish the project in time) or just IRC.
|
||||||
|
|
||||||
### JAMS
|
## JAMS
|
||||||
|
|
||||||
Throughout the event townies are encouraged to cluster and collaborate on various creative **JAMS**. Re-run this tool and select _Propose a creative jam_ if you want to suggest one. Suggested jams:
|
Throughout the event townies are encouraged to cluster and collaborate on various creative **JAMS**. Re-run this tool and select _Propose a creative jam_ if you want to suggest one. Suggested jams:
|
||||||
|
|
||||||
|
13
cmd/towncon/md/jam.md
Normal file
13
cmd/towncon/md/jam.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# JAMS
|
||||||
|
|
||||||
|
Town Con will be a great time to collaborate with other townies. We'll have a few concurrent jams: drop in/drop out creative sessions organized around a theme or activity.
|
||||||
|
|
||||||
|
Some known jams:
|
||||||
|
|
||||||
|
- 88x31 badge jam
|
||||||
|
- forum software jam
|
||||||
|
- game jam
|
||||||
|
- dos jam
|
||||||
|
- music jam (in person only)
|
||||||
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
|||||||
|
# Works
|
||||||
|
|
||||||
_every_ townie is encouraged to submit something (or multiple things) to town con. Seriously: please submit anything that can be consumed via a computer in under 60 minutes. Some ideas:
|
_every_ townie is encouraged to submit something (or multiple things) to town con. Seriously: please submit anything that can be consumed via a computer in under 60 minutes. Some ideas:
|
||||||
|
|
||||||
- a pre-recorded talk
|
- a pre-recorded talk
|
||||||
|
Loading…
x
Reference in New Issue
Block a user