diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | conferences.csv | 16 | ||||
-rw-r--r-- | conferences.html | 38 | ||||
-rwxr-xr-x | conferences.py | 171 |
4 files changed, 206 insertions, 20 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0d20b64 --- /dev/null +++ b/.gitignore | |||
@@ -0,0 +1 @@ | |||
*.pyc | |||
diff --git a/conferences.csv b/conferences.csv new file mode 100644 index 0000000..6a4391b --- /dev/null +++ b/conferences.csv | |||
@@ -0,0 +1,16 @@ | |||
1 | RTSS,http://sites.ieee.org/rtss2012/,"San Juan, Puerto Rico",5/15/2012,12/5/2012,12/7/2012 | ||
2 | ECRTS,http://ecrts12.ecrts.org/,"Pisa, Italy",2/3/2012,7/10/2012,7/13/2012 | ||
3 | RTAS,http://www.rtas.org/,"Beijing, China",10/14/2011,4/16/2012,4/19/2012 | ||
4 | SIES,http://sies2012.ira.uka.de/index.php,"Karlsruhe, Germany",2/26/2012,6/20/2012,6/22/2012 | ||
5 | ETFA,http://www.etfa2012.org/,"Krakow, Poland",3/25/2012,9/17/2012,9/21/2012 | ||
6 | RTCSA,http://rtcsa.konkuk.ac.kr/,"Seoul, Korea",4/16/2012,8/20/2012,8/22/2012 | ||
7 | "ESWeek (3 Conferences)",http://www.esweek.org/,"Tampere, Finland",4/11/2011,10/9/2011,10/14/2011 | ||
8 | RTLWS,https://www.osadl.org/RTLWS-2012.rtlws-2012.0.html,"Chapel Hill, NC",TBD,10/18/2012,10/20/2012 | ||
9 | RTNS,http://rtns2011.irccyn.ec-nantes.fr/#page=home,"Nancy, France",TBD,11/8/2012,11/9/2012 | ||
10 | OPODIS,http://www.opodis.net/,"Toulouse, France",7/22/2011,12/12/2011,12/16/2011 | ||
11 | IPDPS,http://www.ipdps.org/,"Shanghai, China",10/2/2011,5/21/2012,5/25/2012 | ||
12 | LAW,http://www.acsac.org/2011/workshops/law/,"Orlando, FA",9/29/2011,12/5/2011,12/9/2011 | ||
13 | EuroSys,http://eurosys2012.unibe.ch/,"Bern, Switzerland",10/20/2011,4/11/2012,4/13/2012 | ||
14 | NFM,http://shemesh.larc.nasa.gov/nfm2012/,"Norfolk, VA",12/18/2011,4/3/2012,4/5/2012 | ||
15 | APRES,http://cps.kaist.ac.kr/apres2012/,"Beijing, China",1/29/2012,4/16/2012 | ||
16 | ICPP,http://www.icpp2012.org/,"Pittsburgh, PA",3/2/2012,9/10/2012,9/13/2012 | ||
diff --git a/conferences.html b/conferences.html index 48bf1f2..efbfbb9 100644 --- a/conferences.html +++ b/conferences.html | |||
@@ -27,28 +27,26 @@ | |||
27 | <div id="content"> | 27 | <div id="content"> |
28 | <h2>Conferences</h2> | 28 | <h2>Conferences</h2> |
29 | <p>Following is a listing of conferences, workshops and symposia of relevance to our research group.</p> | 29 | <p>Following is a listing of conferences, workshops and symposia of relevance to our research group.</p> |
30 | <p>Past deadlines are listed in <span style="color: red">red</span>. These listings are retained <u>until the conference has been held and the web page for its successor is available</u>.</p> | 30 | <p>Past deadlines are listed in <span style="color: red">red</span>. These listings are retained until the conference has been held and the web page for its successor is available.</p> |
31 | <p>This information is subject to frequent change. If you notice some information that is outdated, we kindly ask that you <a href="mailto:cjk@cs.unc.edu">send email to</a> the maintainer of this page.</p> | 31 | <p>This information is subject to frequent change. If you notice some information that is outdated, we kindly ask that you <a href="mailto:cjk@cs.unc.edu">send email to</a> the maintainer of this page.</p> |
32 | <table class="event"> | 32 | <table class="event"> |
33 | <tr class="heading"><td>Deadline</td><td>Conference</td><td>Location</td><td>Dates</td></tr> | 33 | <tr class="heading"><td style="width: 150px">Deadline</td><td style="width: 200px">Conference</td><td style="width: 140px">Location</td><td style="width: 200px">Dates</td></tr> |
34 | <tr><td style="color: red">May 16, 2010</td><td><a href="http://www.rtss.org">RTSS</a></td><td>San Diego, CA</td><td>Dec. 1-3, 2010</td></tr> | 34 | <tr><td style="color: red">Apr. 11, 2011</td><td><a href="http://www.esweek.org/">ESWeek (3 Conferences)</a></td><td>Tampere, Finland</td><td>Oct. 9 – 14, 2011</td></tr> |
35 | <tr><td style="color: red">Jun. 6, 2010</td><td><a href="http://www.irit.fr/rtns2010">RTNS</a></td><td>Toulouse, FR</td><td>Nov. 4-5, 2010</td></tr> | 35 | <tr><td style="color: red">Jul. 22, 2011</td><td><a href="http://www.opodis.net/">OPODIS</a></td><td>Toulouse, France</td><td>Dec. 12 – 16, 2011</td></tr> |
36 | <tr><td style="color: red">July 25, 2010</td><td><a href="http://www.opodis.net">OPODIS</a></td><td>Tozeur, Tunisia</td><td>Dec. 14-17, 2010</td></tr> | 36 | <tr><td style="color: red">Sep. 29, 2011</td><td><a href="http://www.acsac.org/2011/workshops/law/">LAW</a></td><td>Orlando, FA</td><td>Dec. 5 – 9, 2011</td></tr> |
37 | <tr><td style="color: red">TBA</td><td><a href="http://fm.csl.sri.com/LAW/2010/index.shtml">Layered Assurance Workshop</a></td><td>Austin, TX</td><td>Dec. 6-7, 2010</td></tr> | 37 | <tr><td style="color: red">Oct. 2, 2011</td><td><a href="http://www.ipdps.org/">IPDPS</a></td><td>Shanghai, China</td><td>May. 21 – 25, 2012</td></tr> |
38 | <tr><td style="color: red">Oct. 1, 2010</td><td><a href="http://www.ipdps.org">IPDPS</a></td><td>Anchorage, AK</td><td>May 16-20, 2011</td></tr> | 38 | <tr><td style="color: red">Oct. 14, 2011</td><td><a href="http://www.rtas.org/">RTAS</a></td><td>Beijing, China</td><td>Apr. 16 – 19, 2012</td></tr> |
39 | <tr><td style="color: red">Oct. 8, 2010</td><td><a href="http://www.rtas.org/">RTAS</a></td><td>Chicago, Il</td><td>Apr. 11-14, 2011</td></tr> | 39 | <tr><td style="color: red">Oct. 20, 2011</td><td><a href="http://eurosys2012.unibe.ch/">EuroSys</a></td><td>Bern, Switzerland</td><td>Apr. 11 – 13, 2012</td></tr> |
40 | <tr><td style="color: red">Oct. 10, 2010</td><td><a href="http://eurosys2011.cs.uni-salzburg.at/">EuroSys</a></td><td>Salzburg, Austria</td><td>Apr. 10-13, 2011</td></tr> | 40 | <tr><td style="color: red">Dec. 18, 2011</td><td><a href="http://shemesh.larc.nasa.gov/nfm2012/">NFM</a></td><td>Norfolk, VA</td><td>Apr. 3 – 5, 2012</td></tr> |
41 | <tr><td style="color: red">Oct. 14, 2010</td><td><a href="http://dream.eng.uci.edu/isorc2011/workshop.html">IEEE Workshop on Applications and Architectures for Mixed Criticality Systems</a></td><td>Newport Beach, CA</td><td>Mar. 31 2011</td></tr> | 41 | <tr><td>Jan. 29, 2012</td><td><a href="http://cps.kaist.ac.kr/apres2012/">APRES</a></td><td>Beijing, China</td><td>Apr. 16, 2012</td></tr> |
42 | <tr><td style="color: red">Dec. 19, 2010</td><td><a href="http://lars-lab.jpl.nasa.gov/nfm2011">NASA Formal Methods Symposium</a></td><td>Pasadena, CA</td><td>Apr. 18-20, 2011</td></tr> | 42 | <tr><td>Feb. 3, 2012</td><td><a href="http://ecrts12.ecrts.org/">ECRTS</a></td><td>Pisa, Italy</td><td>Jul. 10 – 13, 2012</td></tr> |
43 | <tr><td>Jan. 23, 2011</td><td><a href="http://www.cister.isep.ipp.pt/ecrts11/">ECRTS</td><td>Porto, Portugal</td><td>Jul. 5-8 2011</td></tr> | 43 | <tr><td>Feb. 26, 2012</td><td><a href="http://sies2012.ira.uka.de/index.php">SIES</a></td><td>Karlsruhe, Germany</td><td>Jun. 20 – 22, 2012</td></tr> |
44 | <tr><td style="">Feb. 8, 2011</td><td><a href="http://apres2011.uwaterloo.ca/">APRES</a></td><td>Chigago, IL</td><td>Apr. 11, 2011</td></tr> | 44 | <tr><td>Mar. 2, 2012</td><td><a href="http://www.icpp2012.org/">ICPP</a></td><td>Pittsburgh, PA</td><td>Sep. 10 – 13, 2012</td></tr> |
45 | <tr><td>Feb. 20, 2011</td><td><a href="http://www.mrtc.mdh.se/sies2011/index.php">IEEE-SIES</a></td><td>Västerås, SE</td><td>Jun. 15-17, 2011</td></tr> | 45 | <tr><td>Mar. 25, 2012</td><td><a href="http://www.etfa2012.org/">ETFA</a></td><td>Krakow, Poland</td><td>Sep. 17 – 21, 2012</td></tr> |
46 | <tr><td style="">Feb. 24, 2011</td><td><a href="http://icpp2011.org">ICPP</a></td><td>Taipei, Taiwan</td><td>Sep. 13-16, 2011</td></tr> | 46 | <tr><td>Apr. 16, 2012</td><td><a href="http://rtcsa.konkuk.ac.kr/">RTCSA</a></td><td>Seoul, Korea</td><td>Aug. 20 – 22, 2012</td></tr> |
47 | <tr><td style="">Mar. 21, 2011</td><td><a href="http://www.etfa-2011.org">ETFA</a></td><td>Toulouse, FR</td><td>Sep. 5-9, 2011</td></tr> | 47 | <tr><td>May. 15, 2012</td><td><a href="http://sites.ieee.org/rtss2012/">RTSS</a></td><td>San Juan, Puerto Rico</td><td>Dec. 5 – 7, 2012</td></tr> |
48 | <tr><td style="">Apr. 4, 2011</td><td><a href="http://emsoft2011.uwaterloo.ca/index.shtml">EMSOFT</a></td><td>Taipei, Taiwan</td><td>Oct. 9-14, 2011</td></tr> | 48 | <tr><td>TBD</td><td><a href="https://www.osadl.org/RTLWS-2012.rtlws-2012.0.html">RTLWS</a></td><td>Chapel Hill, NC</td><td>Oct. 18 – 20, 2012</td></tr> |
49 | <tr><td style="">Apr. 15, 2011</td><td><a href="http://www.rtcsa.org">RTCSA</a></td><td>Toyama, Japan</td><td>Aug. 29-31, 2011</td></tr> | 49 | <tr><td>TBD</td><td><a href="http://rtns2011.irccyn.ec-nantes.fr/#page=home">RTNS</a></td><td>Nancy, France</td><td>Nov. 8 – 9, 2012</td></tr> |
50 | <tr><td style="">Jun. 30, 2011</td><td><a href="http://trust.csu.edu.cn/conference/icess2011/">ICESS</a></td><td>Changsha, China</td><td>Nov. 16-18, 2011</td></tr> | ||
51 | |||
52 | </table> | 50 | </table> |
53 | </div> | 51 | </div> |
54 | </div> | 52 | </div> |
diff --git a/conferences.py b/conferences.py new file mode 100755 index 0000000..ecf07ac --- /dev/null +++ b/conferences.py | |||
@@ -0,0 +1,171 @@ | |||
1 | #!/usr/bin/env python | ||
2 | |||
3 | from __future__ import print_function | ||
4 | |||
5 | import sys | ||
6 | import csv | ||
7 | from functools import total_ordering | ||
8 | from datetime import datetime | ||
9 | from operator import attrgetter | ||
10 | |||
11 | """Read CSV and make HTML for the conference page. | ||
12 | |||
13 | Handles sorting dates, TBD dates, dates in the past, and more. | ||
14 | No guarantees that this is bug free :) | ||
15 | |||
16 | Author: Christopher Kenna (2012) | ||
17 | |||
18 | """ | ||
19 | |||
20 | @total_ordering | ||
21 | class ConferenceDate(object): | ||
22 | TBD_STR = 'tbd' | ||
23 | TBD_VAL = 'tbd' | ||
24 | |||
25 | def __init__(self, date): | ||
26 | if isinstance(date, datetime): | ||
27 | self.dt = date | ||
28 | else: | ||
29 | self.dt = self.date_from_str(date) | ||
30 | |||
31 | @classmethod | ||
32 | def date_from_str(cls, date_str): | ||
33 | try: | ||
34 | return datetime.strptime(date_str, '%m/%d/%Y') | ||
35 | except ValueError: | ||
36 | if cls.TBD_STR == date_str.lower(): | ||
37 | return cls.TBD_VAL | ||
38 | die('bad date: {0}'.format(date_str)) | ||
39 | |||
40 | @classmethod | ||
41 | def get_timespan(cls, start, end): | ||
42 | ret = [] | ||
43 | if start is end: | ||
44 | ret.append(cls.html_date(start)) | ||
45 | elif (not start.is_tbd() and not end.is_tbd() and | ||
46 | start.dt.month == end.dt.month): | ||
47 | ret.append(start.dt.strftime('%b. {0}'.format(start.dt.day))) | ||
48 | ret.append('–') | ||
49 | ret.append(end.dt.strftime('{0}, %Y'.format(end.dt.day))) | ||
50 | else: | ||
51 | ret.extend([cls.html_date(start), '&endash;', | ||
52 | cls.html_date(end)]) | ||
53 | return ' '.join(ret) | ||
54 | |||
55 | @classmethod | ||
56 | def html_date(cls, d): | ||
57 | if d.is_tbd(): | ||
58 | return 'TBD' | ||
59 | # using string format to get '2' and not '02' | ||
60 | return d.dt.strftime('%b. {0}, %Y'.format(d.dt.day)) | ||
61 | |||
62 | def __eq__(self, other): | ||
63 | a_is_tbd, b_is_tbd = self.is_tbd(), other.is_tbd() | ||
64 | if a_is_tbd and b_is_tbd: | ||
65 | return True | ||
66 | elif a_is_tbd or b_is_tbd: | ||
67 | return False | ||
68 | else: | ||
69 | return self.dt == other.dt | ||
70 | |||
71 | def __lt__(self, other): | ||
72 | a_is_tbd, b_is_tbd = self.is_tbd(), other.is_tbd() | ||
73 | if not a_is_tbd and not b_is_tbd: | ||
74 | return self.dt < other.dt | ||
75 | if not a_is_tbd and b_is_tbd: | ||
76 | return True | ||
77 | else: | ||
78 | # (a_is_tbd and not b_is_tbd) or (a_is_tbd and b_is_tbd) | ||
79 | return False | ||
80 | |||
81 | def is_tbd(self): | ||
82 | return ConferenceDate.TBD_VAL == self.dt | ||
83 | |||
84 | def in_past(self): | ||
85 | return self < ConferenceDate(datetime.now()) | ||
86 | |||
87 | def in_past_style(self): | ||
88 | return 'color: red' if self.in_past() else None | ||
89 | |||
90 | |||
91 | @total_ordering | ||
92 | class Conference(object): | ||
93 | def __init__(self, name, url, location, deadline, start, end=None): | ||
94 | self.name = name | ||
95 | self.url = url | ||
96 | self.location = location | ||
97 | self.deadline = ConferenceDate(deadline) | ||
98 | self.start = ConferenceDate(start) | ||
99 | self.end = self.start if end is None else ConferenceDate(end) | ||
100 | |||
101 | if self.end < self.start: | ||
102 | die('start before end for {0}'.format(self.name)) | ||
103 | |||
104 | @classmethod | ||
105 | def make_td(cls, contents, style=None): | ||
106 | _style = '' | ||
107 | if style is not None: | ||
108 | _style = ' style="{0}"'.format(style) | ||
109 | return '<td{0}>{1}</td>'.format(_style, contents) | ||
110 | |||
111 | def __eq__(self, other): | ||
112 | cmps = ('deadline', 'name', 'url', 'location', 'start', 'end') | ||
113 | for s in cmps: | ||
114 | ag = attrgetter(s) | ||
115 | if ag(self) != ag(other): | ||
116 | return False | ||
117 | return True | ||
118 | |||
119 | def __lt__(self, other): | ||
120 | cmps = ('deadline', 'name', 'url', 'location', 'start', 'end') | ||
121 | for s in cmps: | ||
122 | ag = attrgetter(s) | ||
123 | a, b = ag(self), ag(other) | ||
124 | if a < b: | ||
125 | return True | ||
126 | elif a > b: | ||
127 | return False | ||
128 | return False | ||
129 | |||
130 | def html(self): | ||
131 | s = ['<tr>'] | ||
132 | s.append(self.make_td(ConferenceDate.html_date(self.deadline), | ||
133 | style=self.deadline.in_past_style())) | ||
134 | s.append(self.make_td('<a href="{0}">{1}</a>'.format( | ||
135 | self.url, self.name))) | ||
136 | s.append(self.make_td(self.location)) | ||
137 | s.append(self.make_td(ConferenceDate.get_timespan(self.start, self.end))) | ||
138 | s.append('</tr>') | ||
139 | return ''.join(s) | ||
140 | |||
141 | |||
142 | def die(msg, e=None): | ||
143 | print(msg, file=sys.stderr) | ||
144 | sys.exit(1) | ||
145 | |||
146 | |||
147 | def load_conferences(in_f): | ||
148 | c = [] | ||
149 | r = csv.reader(open(in_f, 'r')) | ||
150 | for row in r: | ||
151 | c.append(Conference(*row)) | ||
152 | #try: | ||
153 | # c.append(Conference(*row)) | ||
154 | #except TypeError as e: | ||
155 | # print('error on {0}'.format(row), file=sys.stderr) | ||
156 | # die('error message: {0}'.format(e.message)) | ||
157 | return c | ||
158 | |||
159 | |||
160 | def main(): | ||
161 | if len(sys.argv) < 2: | ||
162 | die('usage: {0} <CSV file>'.format(sys.argv[0])) | ||
163 | |||
164 | in_f = sys.argv[1] | ||
165 | conferences = load_conferences(in_f) | ||
166 | for c in sorted(conferences): | ||
167 | print(c.html()) | ||
168 | |||
169 | |||
170 | if __name__ == '__main__': | ||
171 | main() | ||