diff options
author | Thorsten Behrens <tbehrens@suse.com> | 2012-02-10 20:29:44 +0100 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2012-02-11 19:00:51 +0100 |
commit | df845703f81f2137d79ad0e9187e3b8b18c87223 (patch) | |
tree | e76852017870cbd7cc4dd76f349c5ef9eec44a78 /vote | |
parent | dcb4358ee8e9ad787f52575ac9477c53c3293539 (diff) |
New poll: 2012 LibOCon location
Diffstat (limited to 'vote')
-rw-r--r-- | vote/2012-confpoll/Makefile.am | 14 | ||||
-rw-r--r-- | vote/2012-confpoll/candidates.wml | 74 | ||||
-rw-r--r-- | vote/2012-confpoll/index.wml | 51 | ||||
-rwxr-xr-x | vote/2012-confpoll/mkical.py | 250 | ||||
-rw-r--r-- | vote/2012-confpoll/rules.wml | 104 | ||||
-rw-r--r-- | vote/2012-confpoll/timeline.ics | 67 | ||||
-rw-r--r-- | vote/2012-confpoll/voting-instructions.txt | 39 | ||||
-rw-r--r-- | vote/Makefile.am | 2 | ||||
-rw-r--r-- | vote/index.wml | 1 |
9 files changed, 601 insertions, 1 deletions
diff --git a/vote/2012-confpoll/Makefile.am b/vote/2012-confpoll/Makefile.am new file mode 100644 index 0000000..8416559 --- /dev/null +++ b/vote/2012-confpoll/Makefile.am @@ -0,0 +1,14 @@ +SUBDIRS = + +urlpath = /vote/2012-confpoll + +page_SCRIPTS = \ + index.html \ + candidates.html\ + rules.html + +page_DATA = \ + timeline.ics + mkical.py + +include $(top_srcdir)/rules.common diff --git a/vote/2012-confpoll/candidates.wml b/vote/2012-confpoll/candidates.wml new file mode 100644 index 0000000..9558726 --- /dev/null +++ b/vote/2012-confpoll/candidates.wml @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + + <head> + <title>The LibreOffice 2012 Conference Location Candidates</title> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + </head> + + <body> + <h1>Candidates for the LibreOffice 2012 Conference</h1> + + <p> + Below you will find a list of candidates who applied for running + the LibreOffice 2012 conference. A short summary statement from + each candidate and a link to their full application is provided + to help you learn more about them. Please refer to the <a + href="http://listarchives.documentfoundation.org/www/discuss/">discuss@documentfoundation.org</a> + list for further information, and for questions towards the + candidates. The announcement blog post about the applicants is + <a href="http://blog.documentfoundation.org/2012/01/28/libocon-2012-proposals/">here</a>. + </p> + + <p> + If you have any questions, please send them to either + <a href="http://listarchives.documentfoundation.org/www/discuss/">discuss@documentfoundation.org</a> + or to the board at <a + href="mailto:info@documentfoundation.org">info@documentfoundation.org</a>. + </p> + + <h2>List of proposals for the LibreOffice 2012 conference</h2> + + <ol> + <li><strong>Berlin, Germany</strong><br /> + Full application at <a href="http://tdfsc.files.wordpress.com/2012/01/libocon2012_berlin_proposal.pdf">http://tdfsc.files.wordpress.com/2012/01/libocon2012_berlin_proposal.pdf</a> + <blockquote> + Being Germany's capital and largest city at the same + time, Berlin is well equipped to host + conferences. Conveniently accessible via plane or trains + from most other European cities, Berlin has a wide range + of hotels, and excellent public transport systems, both + at comparably reasonable prices. Hosted by the Federal Ministry of Economics and + Technology in Berlin, the conference will be located both in the + center of Berlin, and at the center of one of the larger + sub-communities inside TDF. + </blockquote> + </li> + <li><strong>Zaragoza, Spain</strong><br /> + Full application at <a href="http://tdfsc.files.wordpress.com/2012/01/libocon2012_zaragoza_proposal.pdf">http://tdfsc.files.wordpress.com/2012/01/libocon2012_zaragoza_proposal.pdf</a> + <blockquote> + Being one of the largest cities of Spain, and one of the + pioneering local authorities focusing on FLOSS and open + standards, Zaragoza is an ideal location for the + LibreOffice conference. Zaragoza has already successfully + hosted many other FLOSS conferences, and the experienced + team behind CESLA also offers to run this event. Zaragoza + is easily accessible via train or airplane from many + European cities. + </blockquote> + </li> + + </ol> + + + <h2>Additional Poll-related Information</h2> + + <p> + If you have any futher question, please consult the + <a href="rules.html">Rules for this poll</a> or write to + <a href="mailto:info@documentfoundation.org">info@documentfoundation.org</a>. + </p> + + </body> +</html> diff --git a/vote/2012-confpoll/index.wml b/vote/2012-confpoll/index.wml new file mode 100644 index 0000000..3399ae1 --- /dev/null +++ b/vote/2012-confpoll/index.wml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + + <head> + <title>The LibreOffice 2012 Conference Location Poll</title> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta name="author" content="Thorsten Behrens" /> + </head> + + <body> + + <h1>The LibreOffice 2012 Conference Location Poll</h1> + + <p> + The Document Foundation Membership is asked to vote for one of + our <a href="http://blog.documentfoundation.org/2012/01/28/libocon-2012-proposals/">two conference location proposals</a>. + </p> + + <p> + The poll results from the LibreOffice 2012 Conference Location Poll + will be archived here for public access. + </p> + + <h2>LibreOffice 2012 Conference Poll Materials:</h2> + <ul> + <li> + <a href="../results.php?election_id=2">Detailed election results</a> + </li> + <li> + <a href="../votes.php?election_id=2">List of all votes</a> + </li> + <li> + <a href="../vote.php?election_id=2">Interface to vote</a> + </li> + <li> + <a href="candidates.html">List of conference location candidates</a> + </li> + + <li> + <a href="http://www.documentfoundation.org/foundation/members/">List of registered voters</a> + </li> + + <li> + <a href="rules.html">Elections Rules and Timeline</a> (webcal <a + href="webcal://elections.documentfoundation.org/voting/vote/2012-confpoll/timeline.ics">timeline</a>) + </li> + </ul> + + </body> +</html> diff --git a/vote/2012-confpoll/mkical.py b/vote/2012-confpoll/mkical.py new file mode 100755 index 0000000..b0c9a40 --- /dev/null +++ b/vote/2012-confpoll/mkical.py @@ -0,0 +1,250 @@ +#!/usr/bin/env python +''' +This Python script creates a simple iCal file based on hardcoded events +in this file. +''' + +import calendar +import datetime +import logging +import math +import os +import vobject + + +#### Configure these variables +YEAR = 2012 +CANDIDATES_OPENED_DATE = (2011, 10, 19) +CANDIDATES_CLOSED_DATE = (YEAR, 1, 22) +CANDIDATES_ANNOUNCED_DATE = (YEAR, 1, 28) +VOTING_OPENED_DATE = (YEAR, 2, 12) +VOTING_CLOSED_DATE = (YEAR, 2, 19) +PRELIMINARY_RESULTS_DATE = (YEAR, 2, 20) +CHALLENGE_CLOSED_DATE = (YEAR, 2, 26) + + + +### I'm sorry that these functions clutter your calendar-creating experience +### Please scroll down a bit to edit the description texts + +#### Application Data +def c(multilinestring): + ''' + A helper functions which cleans up a multiline string, so that + it doesn't contain any newlines or multiple whitespaces + ''' + stripped = [l.strip() for l in multilinestring.splitlines()] + ret = " ".join (stripped) + return ret + +def d(year, month, day): + ''' + Just a tiny wrapper around datetime.datetime to create a datetime object + ''' + return datetime.date(year, month, day) + + + +CANDIDATES_OPENED = ( + d(*CANDIDATES_OPENED_DATE), + 'Announcements and list of candidates opens', + c("""If you have the team and resources to organize a conference, you may send a nomination to + info@documentfoundation.org with your name, e-mail + address, and a detailed description of your proposal, before + %s (23:59 UTC).""" % d(*CANDIDATES_CLOSED_DATE)) + ''' + ''' + c(""" + You should also send a summary of your candidacy announcement + to discuss@documentfoundation.org. """) + ''' + ''' +) + +CANDIDATES_CLOSED = ( + d(*CANDIDATES_CLOSED_DATE), + 'List of candidates closed', + CANDIDATES_OPENED[2] # Get the same text again +) + +CANDIDATES_ANNOUNCED = ( + d(*CANDIDATES_ANNOUNCED_DATE), + 'List of candidates announced', + 'You may now start to send your questions to the candidates' +) + +VOTING_OPENED = ( + d(*VOTING_OPENED_DATE), + 'Instructions to vote are sent', + 'Please read your email and follow these instructions and submit your vote by %s' % d(*VOTING_CLOSED_DATE) +) +VOTING_CLOSED = ( + d(*VOTING_CLOSED_DATE), + 'Votes must be returned', + 'Preliminary results are announced on %s' % d(*PRELIMINARY_RESULTS_DATE) +) + + +PRELIMINARY_RESULTS = ( + d(*PRELIMINARY_RESULTS_DATE), + 'Preliminary results are announced', + 'The preliminary results can be challenged until %s' % d(*CHALLENGE_CLOSED_DATE) +) + +CHALLENGE_CLOSED = ( + d(*CHALLENGE_CLOSED_DATE), + 'Challenges to the results closed', + "If there weren't any challenges, preliminary results are valid" +) + + + + +def create_ical(eventlist): + '''Generates an ical stream based on the list given as eventlist. + The list shall contain elements with a tuple with a + (date, string, string) object, serving as date when the event takes place, + summary and description respectively. + ''' + log = logging.getLogger('create_ical') + + cal = vobject.iCalendar() + cal.add('method').value = 'PUBLISH' + cal.add('calscale').value = 'GREGORIAN' + cal.add('x-wr-timezone').value = 'UTC' + + for (timestamp, summary, description) in eventlist: + log.debug('creating %s, %s', timestamp, description) + vevent = cal.add('vevent') + vevent.add('dtstart').value = timestamp + vevent.add('dtend').value = timestamp + datetime.timedelta(1) + vevent.add('summary').value = summary + vevent.add('description').value = description + + stream = cal.serialize() + return stream + + +def wraptext(s, width): + '''Wraps a string @s at @width characters. + + >>> wraptext('fooo', 2) + ['fo','oo'] + ''' + l = len(s) + nr_frames = int(math.ceil(float(l)/width)) + print nr_frames + frames = [] + for i in xrange(nr_frames): + start, end = i*width, (i+1) * width + frames.append(s[start:end]) + # One could (and prolly should) yield that + return frames + +def ordinal(n): + n = int(n) + if 10 <= n % 100 < 20: + return str(n) + 'th' + else: + return str(n) + {1 : 'st', 2 : 'nd', 3 : 'rd'}.get(n % 10, "th") + + +def cal_for_month(month, events, width=80, year=datetime.datetime.now().year): + '''Generates a textual calendar for the @month in @year. + It will return a string with the calendar on the left hand side and the + events on the right hand side. + @events shall be a list with tuples: timestamp, summary, description. + + Returns a string with the calendar + ''' + log = logging.getLogger('cal_for_month') + + cal = calendar.TextCalendar() + calstrings = cal.formatmonth(year, month, 3).splitlines() + + for (timestamp, summary, description) in events: + log.debug('creating %s, %s', timestamp, summary) + year, month, day = timestamp.year, timestamp.month, timestamp.day + maxwidth = max([len(cs) for cs in calstrings]) + rightwidth = 80 - maxwidth + for i, line in enumerate(calstrings): + needles = (" %d " % day, + " %d\n" % day) + replacement = "(%d)" % day + # Find the day so that we can highlight it and add a comment + day_in_week = False + for needle in needles: + if needle in line+"\n": + # k, this looks a bit weird but we have that corner + # case with the day being at the end of the line + # which in turn will have been split off + day_in_week = True + break # Set the needle to the found one + if day_in_week == False: # Nothing found, try next week + log.debug('Day (%d) not found in %s', day, line) + continue + else: + log.debug('Day (%d) found in %s', day, line) + new_line = (line+"\n").replace(needle, replacement).rstrip() + new_line += " %s (%s)" % (summary, ordinal(day)) + # Replace in-place for two events in the same week + # FIXME: This has bugs :-( + calstrings[i] = new_line + + return os.linesep.join(calstrings) + +def create_textcal(eventlist): + '''Generates a multiline string containing a calendar with the + events written on the side + The list shall contain elements with a tuple with a + (date, string, string) object, serving as date when the event takes place, + summary and description respectively. + ''' + log = logging.getLogger('textcal') + log.debug('Generating from %s', eventlist) + months = set(map(lambda x: x[0].month, eventlist)) + year = set(map(lambda x: x[0].year, eventlist)).pop() + + final_cal = [] + for month in months: + events = filter(lambda x: x[0].month == month, eventlist) + log.debug('Events for %d: %s', month, events) + month_cal = cal_for_month(month, events, year=year) + final_cal.append(month_cal) + + return os.linesep.join(final_cal) + +if __name__ == "__main__": + from optparse import OptionParser + parser = OptionParser("usage: %prog [options]") + parser.add_option("-l", "--loglevel", dest="loglevel", help="Sets the loglevel to one of debug, info, warn, error, critical", + default=None) + parser.add_option("-i", "--ical", + action="store_true", dest="ical", default=False, + help="print iCal file to stdout") + parser.add_option("-t", "--textcal", + action="store_true", dest="tcal", default=False, + help="print textual calendar to stdout") + (options, args) = parser.parse_args() + + loglevel = {'debug': logging.DEBUG, 'info': logging.INFO, + 'warn': logging.WARNING, 'error': logging.ERROR, + 'critical': logging.CRITICAL}.get(options.loglevel, logging.WARNING) + logging.basicConfig( level=loglevel ) + log = logging.getLogger() + + eventlist = [ + CANDIDATES_OPENED, + CANDIDATES_CLOSED, + CANDIDATES_ANNOUNCED, + VOTING_OPENED, + VOTING_CLOSED, + PRELIMINARY_RESULTS, + CHALLENGE_CLOSED, + ] + + if not any([options.ical, options.tcal]): + parser.error("You want to select either ical or textcal output. See --help for details") + if options.ical: + ical = create_ical( eventlist ) + print ical + if options.tcal: + tcal = create_textcal( eventlist ) + print tcal diff --git a/vote/2012-confpoll/rules.wml b/vote/2012-confpoll/rules.wml new file mode 100644 index 0000000..f5bfb1a --- /dev/null +++ b/vote/2012-confpoll/rules.wml @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + + <head> + <title>The LibreOffice 2012 conference location poll rules</title> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + </head> + + <body> + + <h1>Rules & Timeline for the LibreOffice 2012 conference location poll</h1> + + <h2>Poll Rules</h2> + + <ol> + <li> + Members of The Document Foundation as of 2012-02-01 + + are eligible to vote in this poll. Anyone who has made a + contribution to The Document Foundation can apply for membership by completing the + <a href="http://www.documentfoundation.org/foundation/application-for-tdf-community-membership/">application</a>. + Also, your membership needs to be valid at least until the end + of the poll (2012-02-19). + + </li> + <li> + All discussion related to this poll should be held on + <a href="http://listarchives.documentfoundation.org/www/discuss/">discuss@documentfoundation.org</a>. + Members are invited to ask questions to one or all candidates on that + list. + </li> + <li> + Instructions explaining how to vote will be sent via e-mail to all + eligible voters on + 2012-02-12, + + and votes must be returned by 2012-02-19, 23:59 UTC. + </li> + <li> + Votes will be held confidential during this poll, but an + anonymized archive of all submitted votes will be made publicly + accessible at its conclusion. + </li> + <li> + The Document Foundation board of directors is responsible for counting the votes. + </li> + <li> + The poll concludes the 2012 LibreOffice conference location by + simple majority. Every member can vote for exactly one + location. Empty votes are discarded. + </li> + <li> + In the event of a tie, the board will schedule a run-off poll as soon as possible. + </li> + <li> + The board will announce preliminary results as soon as + possible after the poll closes, along with instructions on how to + access the votes archive and how to independently verify the vote + count. + </li> + <li> + Any eligible voter may challenge the preliminary results by e-mailing + <a + href="mailto:info@documentfoundation.org">info@documentfoundation.org</a> + prior to 2012-02-26. + + The decision of the board as to any challenge shall be final. Once all challenges have been + resolved, the board shall announce the final results. + </li> + <li> + Any questions regarding these procedures should be directed to the + board by e-mail to <a + href="mailto:info@documentfoundation.org">info@documentfoundation.org</a>. + The board reserves the right to make any necessary changes or + clarifications to these rules at any point during the poll. + </li> + </ol> + + <h2>Timeline</h2> + <p><small>(all deadlines are 23:59 UTC)</small></p> + <ul> + <li> + 2012-02-11: Announcement of the poll + </li> + <li> + 2012-02-12: Instructions mailed to eligible voters, voting begins. + </li> + <li> + 2012-02-19: Voting closes. + </li> + <li> + 2012-02-20: Preliminary results are announced. + </li> + <li> + 2012-02-26: Last day to challenge preliminary results. + </li> + <li> + 2012-02-27: Announcement of final results. + </li> + </ul> + + </body> +</html> diff --git a/vote/2012-confpoll/timeline.ics b/vote/2012-confpoll/timeline.ics new file mode 100644 index 0000000..26928b7 --- /dev/null +++ b/vote/2012-confpoll/timeline.ics @@ -0,0 +1,67 @@ +BEGIN:VCALENDAR
+VERSION:2.0
+CALSCALE:GREGORIAN
+METHOD:PUBLISH
+PRODID:-//PYVOBJECT//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:20120210T194758Z-86023@xeon
+DTSTART;VALUE=DATE:20111019
+DTEND;VALUE=DATE:20111020
+DESCRIPTION:If you have the team and resources to organize a conference\,
+ you may send a nomination to info@documentfoundation.org with your name\,
+ e-mail address\, and a detailed description of your proposal\, before 2012
+ -01-22 (23:59 UTC).\n You should also send a summary of your candidacy
+ announcement to discuss@documentfoundation.org.\n
+SUMMARY:Announcements and list of candidates opens
+END:VEVENT
+BEGIN:VEVENT
+UID:20120210T194758Z-59248@xeon
+DTSTART;VALUE=DATE:20120122
+DTEND;VALUE=DATE:20120123
+DESCRIPTION:If you have the team and resources to organize a conference\,
+ you may send a nomination to info@documentfoundation.org with your name\,
+ e-mail address\, and a detailed description of your proposal\, before 2012
+ -01-22 (23:59 UTC).\n You should also send a summary of your candidacy
+ announcement to discuss@documentfoundation.org.\n
+SUMMARY:List of candidates closed
+END:VEVENT
+BEGIN:VEVENT
+UID:20120210T194758Z-33342@xeon
+DTSTART;VALUE=DATE:20120128
+DTEND;VALUE=DATE:20120129
+DESCRIPTION:You may now start to send your questions to the candidates
+SUMMARY:List of candidates announced
+END:VEVENT
+BEGIN:VEVENT
+UID:20120210T194758Z-62412@xeon
+DTSTART;VALUE=DATE:20120212
+DTEND;VALUE=DATE:20120213
+DESCRIPTION:Please read your email and follow these instructions and submi
+ t your vote by 2012-02-19
+SUMMARY:Instructions to vote are sent
+END:VEVENT
+BEGIN:VEVENT
+UID:20120210T194758Z-72964@xeon
+DTSTART;VALUE=DATE:20120219
+DTEND;VALUE=DATE:20120220
+DESCRIPTION:Preliminary results are announced on 2012-02-20
+SUMMARY:Votes must be returned
+END:VEVENT
+BEGIN:VEVENT
+UID:20120210T194758Z-77368@xeon
+DTSTART;VALUE=DATE:20120220
+DTEND;VALUE=DATE:20120221
+DESCRIPTION:The preliminary results can be challenged until 2012-02-26
+SUMMARY:Preliminary results are announced
+END:VEVENT
+BEGIN:VEVENT
+UID:20120210T194758Z-14118@xeon
+DTSTART;VALUE=DATE:20120226
+DTEND;VALUE=DATE:20120227
+DESCRIPTION:If there weren't any challenges\, preliminary results are vali
+ d
+SUMMARY:Challenges to the results closed
+END:VEVENT
+X-WR-TIMEZONE:UTC
+END:VCALENDAR
+ diff --git a/vote/2012-confpoll/voting-instructions.txt b/vote/2012-confpoll/voting-instructions.txt new file mode 100644 index 0000000..ba2306e --- /dev/null +++ b/vote/2012-confpoll/voting-instructions.txt @@ -0,0 +1,39 @@ +noreply@documentfoundation.org +info@documentfoundation.org +Your LibreOffice 2012 Conference Location Poll Voting Token + +Dear $member, + +The poll for the LibreOffice 2012 conference location will soon be +open. + +Voting will run from 2012-02-12 (Sunday) until 2012-02-19, 23:59 UTC. + +To vote, please go to +https://elections.documentfoundation.org/vote.php?election_id=2 +and follow the instructions there. + +A list of candidates and their statements are available at +https://elections.documentfoundation.org/2012-confpoll/candidates.html + +When instructed to do so, enter the following details: + + E-mail: $email + Vote token: $token + +The election has 4 steps - first, you must identify yourself using the +voting token above. Then select your preferred candidate (you can only +choose one). A third step will show you your choice, and ask you to +confirm or return to the previous step. Finally, after confirming your +choice, a unique identifier will be given to you which will allow you to +verify after the poll that your vote was counted correctly. To ensure +anonymity, no link will be kept between this token and your identifiers, +so please keep this token safe. Once you have voted, you will not be able +to vote again. + +Thank you for your vote! + +Regards, + Thorsten Behrens + Deputy chair of the Board, on behalf of The Document Foundation + Board of Directors diff --git a/vote/Makefile.am b/vote/Makefile.am index 8bb3df0..f94cf4e 100644 --- a/vote/Makefile.am +++ b/vote/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = include 2011 +SUBDIRS = include 2011 2012-confpoll urlpath = /vote diff --git a/vote/index.wml b/vote/index.wml index 866ddea..c052662 100644 --- a/vote/index.wml +++ b/vote/index.wml @@ -28,6 +28,7 @@ <ul> <li><a href="2011/">Material from the 2011 BoD Elections</a></li> + <li><a href="2012-confpoll/">Material from the 2012 conference location poll</a></li> </ul> <!-- Do not close the body or html tag because we still add stuff to the footer --> |