コード例 #1
0
ファイル: confdb.py プロジェクト: sysconfdb/sysconfdb
def deadline_calendar():
	""" A vCal file of impending deadlines. """
	events = []
	for conf in db.deadlines():
		# Use extended paper deadline if it exists, or the original otherwise.
		if conf.extendedDeadline:
			events.append(
				(
					"%s Deadline (extended)" % conf.abbreviation,
					"Extended paper deadline for %s" % conf.name,
					conf.where(),
					conf.extendedDeadline,
				))
		elif conf.deadline:
			events.append(
				(
					"%s Deadline" % conf.abbreviation,
					"Paper deadline for %s" % conf.name,
					conf.where(),
					conf.deadline,
				))

		# A conference may also have a poster deadline.
		if conf.posterDeadline:
			events.append(
				(
					"%s Poster Deadline" % conf.abbreviation,
					"Poster deadline for %s" % conf.name,
					conf.where(),
					conf.posterDeadline,
				))

	return utils.make_vcal(events, 'Conference Deadlines')
コード例 #2
0
ファイル: confdb.py プロジェクト: sysconfdb/sysconfdb
def conference_calendar():
	""" A vCal file of upcoming conferences. """
	events = [
		(
			event.abbreviation, event.name, event.where(),
			(event.startDate, event.endDate)
		)
		for event in db.upcoming()
	]

	return utils.make_vcal(events, 'Upcoming Conferences')