[Debconf-video-commits] r388 - package/branches/pycon09/src

benh at alioth.debian.org benh at alioth.debian.org
Wed Mar 25 14:47:12 UTC 2009


Author: benh
Date: 2009-03-25 14:47:12 +0000 (Wed, 25 Mar 2009)
New Revision: 388

Modified:
   package/branches/pycon09/src/pycon-import-events
Log:
Import room names for tutorials.
Make sure room name doesn't change when Ballroom sections ABC are combined with D and E.


Modified: package/branches/pycon09/src/pycon-import-events
===================================================================
--- package/branches/pycon09/src/pycon-import-events	2009-03-25 02:44:12 UTC (rev 387)
+++ package/branches/pycon09/src/pycon-import-events	2009-03-25 14:47:12 UTC (rev 388)
@@ -47,7 +47,8 @@
         if not match:
             print 'INFO: Ignoring', event['title']
             continue
-        event['conference_room'] = match.group(1)
+        # Treat A-E as ABC because we will use the same setup
+        event['conference_room'] = match.group(1).replace('A-E', 'ABC')
         event['description'] = match.group(2)
 
         event['source_url'] = TALKS_SOURCE_URL + '#' + vevent['UID']
@@ -116,11 +117,14 @@
 def get_tutorials():
     data = urllib2.urlopen(TUTORIALS_SOURCE_URL).read()
 
-    for match in re.finditer(r'<a class="reference external" href="([12][AP]M\d+)">', data):
+    for match in re.finditer(r'<a class="reference external" href="([12][AP]M\d+)">'
+                             r'.*?</td>\s*<td>(.*?)</td>',
+                             data):
         source_id = match.group(1)
 
         event = {
             'conference_id': 1,
+            'conference_room': match.group(2).replace(' (lower level)', ''),
             'source_url': urlparse.urljoin(TUTORIALS_SOURCE_URL, source_id)
             }
 
@@ -130,7 +134,6 @@
         else:
             event['start_time'] = event['start_time'] + ' 13:20:00'
         event['duration'] = '200 MINUTES'
-        event['conference_room'] = 'Tutorial ' + source_id[3:]  # FIXME
 
         event_desc = urllib2.urlopen(event['source_url']).read()
         match = re.search(r'<h1 class="title">(.*?)</h1>\s*'




More information about the Debconf-video-commits mailing list