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

Ryan Verner xf-guest at alioth.debian.org
Tue Apr 14 07:06:51 UTC 2009


Author: xf-guest
Date: 2009-04-14 07:06:51 +0000 (Tue, 14 Apr 2009)
New Revision: 423

Added:
   package/branches/pycon09/src/outputcsv.py
Log:
Misc script not part of workflow - output CSV of published URLs, PyCon wanted this for embeds on their webpage

Added: package/branches/pycon09/src/outputcsv.py
===================================================================
--- package/branches/pycon09/src/outputcsv.py	                        (rev 0)
+++ package/branches/pycon09/src/outputcsv.py	2009-04-14 07:06:51 UTC (rev 423)
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+
+DEBUG=0
+
+import os, sys
+import datetime
+import re
+import datetime
+
+from pyconvideo.pyconvideo import models
+from django.db import transaction
+
+def exportcsv():
+    for e in models.VideoTargetFile.objects.all():
+        if e.published_time:
+	    print str(e.published_url) + ", " + str([y.source_url for y in models.Event.objects.filter(event_id=e.event_id)][0])
+	    if DEBUG == 1:
+		print str(e.event_id) + ", " + str(e.id)
+
+if __name__ == "__main__":
+    os.environ['DJANGO_SETTINGS_MODULE'] = 'pyconvideo.settings'
+    sys.path.append('/usr/share/debconf-video-store')
+    exportcsv()
+
+


Property changes on: package/branches/pycon09/src/outputcsv.py
___________________________________________________________________
Added: svn:executable
   + *




More information about the Debconf-video-commits mailing list