示例#1
0
文件: bot.go 项目: GDG-Korea/Andnyang
func (c *GDGChannel) Activities() {
	start := time.Unix(0, 0)
	for _, e := range event.GetGDGEvents(c.chapterId, start, start) {
		event := fmt.Sprintf("[%s] %s (https://developers.google.com%s)", e.GetStart(), e.Title, e.Link)
		c.Talk(event)
	}
}
示例#2
0
func main() {
	/* cid := "102751345660146384940" // chapter ID of Czech Republic Uber */
	/* cid := "12714242728066184635" // chapter ID for GDG Golnag Korea */
	if len(os.Args) < 3 {
		fmt.Printf("%s: CHAPTERID YEAR\n", os.Args[0])
		os.Exit(1)
	}

	cid := os.Args[1]
	year := os.Args[2]

	st, _ := time.Parse(TF_CALENDAR, year+"0101")
	et, _ := time.Parse(TF_CALENDAR, year+"1231")
	for _, e := range event.GetGDGEvents(cid, st.UTC(), et.UTC()) {
		e.PrintSummary()
	}
}