summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbipasa <bipasac2000@gmail.com>2012-01-13 13:01:12 -0500
committerbipasa <bipasac2000@gmail.com>2012-01-13 13:01:12 -0500
commit34f017590712c9906836ddf996bdc65b55fd745c (patch)
treee0df7c5834999d3445dec91d9b8c3ac65cdab431
parent405287fa6dd51e682ae4b7e39432f5859865fc24 (diff)
parente8f30c862d050c74b4d72c9353bcf90255baba56 (diff)
Merge branch 'master' of ssh://cvs.cs.unc.edu/cvs/proj/litmus/repo/rthp
-rw-r--r--.gitignore1
-rw-r--r--conferences.csv16
-rw-r--r--conferences.html38
-rwxr-xr-xconferences.py170
4 files changed, 205 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 @@
1RTSS,http://sites.ieee.org/rtss2012/,"San Juan, Puerto Rico",5/15/2012,12/5/2012,12/7/2012
2ECRTS,http://ecrts12.ecrts.org/,"Pisa, Italy",2/3/2012,7/10/2012,7/13/2012
3RTAS,http://www.rtas.org/,"Beijing, China",10/14/2011,4/16/2012,4/19/2012
4SIES,http://sies2012.ira.uka.de/index.php,"Karlsruhe, Germany",2/26/2012,6/20/2012,6/22/2012
5ETFA,http://www.etfa2012.org/,"Krakow, Poland",3/25/2012,9/17/2012,9/21/2012
6RTCSA,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
8RTLWS,https://www.osadl.org/RTLWS-2012.rtlws-2012.0.html,"Chapel Hill, NC",TBD,10/18/2012,10/20/2012
9RTNS,http://rtns2011.irccyn.ec-nantes.fr/#page=home,"Nancy, France",TBD,11/8/2012,11/9/2012
10OPODIS,http://www.opodis.net/,"Toulouse, France",7/22/2011,12/12/2011,12/16/2011
11IPDPS,http://www.ipdps.org/,"Shanghai, China",10/2/2011,5/21/2012,5/25/2012
12LAW,http://www.acsac.org/2011/workshops/law/,"Orlando, FA",9/29/2011,12/5/2011,12/9/2011
13EuroSys,http://eurosys2012.unibe.ch/,"Bern, Switzerland",10/20/2011,4/11/2012,4/13/2012
14NFM,http://shemesh.larc.nasa.gov/nfm2012/,"Norfolk, VA",12/18/2011,4/3/2012,4/5/2012
15APRES,http://cps.kaist.ac.kr/apres2012/,"Beijing, China",1/29/2012,4/16/2012
16ICPP,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&nbsp;16,&nbsp;2010</td><td><a href="http://www.rtss.org">RTSS</a></td><td>San Diego, CA</td><td>Dec.&nbsp;1-3,&nbsp;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 &ndash; 14, 2011</td></tr>
35 <tr><td style="color: red">Jun.&nbsp;6,&nbsp;2010</td><td><a href="http://www.irit.fr/rtns2010">RTNS</a></td><td>Toulouse, FR</td><td>Nov.&nbsp;4-5,&nbsp;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 &ndash; 16, 2011</td></tr>
36 <tr><td style="color: red">July&nbsp;25,&nbsp;2010</td><td><a href="http://www.opodis.net">OPODIS</a></td><td>Tozeur, Tunisia</td><td>Dec.&nbsp;14-17,&nbsp;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 &ndash; 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.&nbsp;6-7,&nbsp;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 &ndash; 25, 2012</td></tr>
38 <tr><td style="color: red">Oct.&nbsp;1,&nbsp;2010</td><td><a href="http://www.ipdps.org">IPDPS</a></td><td>Anchorage, AK</td><td>May&nbsp;16-20,&nbsp;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 &ndash; 19, 2012</td></tr>
39 <tr><td style="color: red">Oct.&nbsp;8,&nbsp;2010</td><td><a href="http://www.rtas.org/">RTAS</a></td><td>Chicago, Il</td><td>Apr.&nbsp;11-14,&nbsp;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 &ndash; 13, 2012</td></tr>
40 <tr><td style="color: red">Oct.&nbsp;10,&nbsp;2010</td><td><a href="http://eurosys2011.cs.uni-salzburg.at/">EuroSys</a></td><td>Salzburg,&nbsp;Austria</td><td>Apr.&nbsp;10-13,&nbsp;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 &ndash; 5, 2012</td></tr>
41 <tr><td style="color: red">Oct.&nbsp;14,&nbsp;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&nbsp;Beach,&nbsp;CA</td><td>Mar.&nbsp;31&nbsp;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.&nbsp;19,&nbsp;2010</td><td><a href="http://lars-lab.jpl.nasa.gov/nfm2011">NASA Formal Methods Symposium</a></td><td>Pasadena,&nbsp;CA</td><td>Apr. 18-20,&nbsp;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 &ndash; 13, 2012</td></tr>
43 <tr><td>Jan.&nbsp;23,&nbsp;2011</td><td><a href="http://www.cister.isep.ipp.pt/ecrts11/">ECRTS</td><td>Porto, Portugal</td><td>Jul.&nbsp;5-8&nbsp;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 &ndash; 22, 2012</td></tr>
44 <tr><td style="">Feb.&nbsp;8,&nbsp;2011</td><td><a href="http://apres2011.uwaterloo.ca/">APRES</a></td><td>Chigago,&nbsp;IL</td><td>Apr.&nbsp;11,&nbsp;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 &ndash; 13, 2012</td></tr>
45 <tr><td>Feb.&nbsp;20,&nbsp;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.&nbsp;15-17,&nbsp;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 &ndash; 21, 2012</td></tr>
46 <tr><td style="">Feb.&nbsp;24,&nbsp;2011</td><td><a href="http://icpp2011.org">ICPP</a></td><td>Taipei, Taiwan</td><td>Sep.&nbsp;13-16,&nbsp;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 &ndash; 22, 2012</td></tr>
47 <tr><td style="">Mar.&nbsp;21,&nbsp;2011</td><td><a href="http://www.etfa-2011.org">ETFA</a></td><td>Toulouse, FR</td><td>Sep.&nbsp;5-9,&nbsp;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 &ndash; 7, 2012</td></tr>
48 <tr><td style="">Apr.&nbsp;4,&nbsp;2011</td><td><a href="http://emsoft2011.uwaterloo.ca/index.shtml">EMSOFT</a></td><td>Taipei, Taiwan</td><td>Oct.&nbsp;9-14,&nbsp;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 &ndash; 20, 2012</td></tr>
49 <tr><td style="">Apr.&nbsp;15,&nbsp;2011</td><td><a href="http://www.rtcsa.org">RTCSA</a></td><td>Toyama, Japan</td><td>Aug.&nbsp;29-31,&nbsp;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 &ndash; 9, 2012</td></tr>
50 <tr><td style="">Jun.&nbsp;30,&nbsp;2011</td><td><a href="http://trust.csu.edu.cn/conference/icess2011/">ICESS</a></td><td>Changsha,&nbsp;China</td><td>Nov.&nbsp;16-18,&nbsp;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..067eb6e
--- /dev/null
+++ b/conferences.py
@@ -0,0 +1,170 @@
1#!/usr/bin/env python
2
3from __future__ import print_function
4
5import sys
6import csv
7from functools import total_ordering
8from datetime import datetime
9from operator import attrgetter
10
11"""Read CSV and make HTML for the conference page.
12
13Handles sorting dates, TBD dates, dates in the past, and more.
14No guarantees that this is bug free :)
15
16Author: Christopher Kenna (2012)
17
18"""
19
20@total_ordering
21class 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('&ndash;')
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
92class 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
142def die(msg, e=None):
143 print(msg, file=sys.stderr)
144 sys.exit(1)
145
146
147def load_conferences(in_f):
148 c = []
149 r = csv.reader(open(in_f, 'r'))
150 for row in r:
151 try:
152 c.append(Conference(*row))
153 except TypeError as e:
154 print('error on {0}'.format(row), file=sys.stderr)
155 die('error message: {0}'.format(e.message))
156 return c
157
158
159def main():
160 if len(sys.argv) < 2:
161 die('usage: {0} <CSV file>'.format(sys.argv[0]))
162
163 in_f = sys.argv[1]
164 conferences = load_conferences(in_f)
165 for c in sorted(conferences):
166 print(c.html())
167
168
169if __name__ == '__main__':
170 main()