Browse files

pyconca

  • Loading branch information...
1 parent 28809a0 commit 9653892a147ee1dc4c4b2f58197911ddbad4cad1 @CarlFK committed Nov 11, 2012
Showing with 33 additions and 26 deletions.
  1. +2 −0 TODO.txt
  2. +1 −1 dj/main/views.py
  3. +18 −13 dj/scripts/add_to_richard.py
  4. +10 −10 dj/scripts/addeps.py
  5. +2 −2 dj/updb.sh
View
2 TODO.txt
@@ -58,6 +58,8 @@ veyepar:
state:2 api is broken.
html-atize desceription.
+ Stop - make it work again
+
encoding:
soften jump cuts
create list of cut times relitive to start of final video
View
2 dj/main/views.py
@@ -315,7 +315,7 @@ def episode_pdfs(request, show_id, episode_id=None, rfxml='test.rfxml'):
episodes=Episode.objects.filter(id=episode_id)
else:
episodes=Episode.objects.filter(show=show,
- # start__day=29,
+ start__day=11,
location__active=True).order_by('location__id','start')
# location__name='Hays Cape'
# location__name='Barbie Tootle'
View
31 dj/scripts/add_to_richard.py
@@ -68,8 +68,7 @@ def process_ep(self, ep):
found = False
for cat in cats['objects']:
if self.options.verbose: print cat['id'], cat['slug'], cat['name']
- # if cat['slug'] == ep.show.slug:
- if cat['name'] == ep.show.client.name:
+ if cat['name'] == ep.show.name:
found = True
if self.options.verbose: print "found"
break
@@ -80,19 +79,23 @@ def process_ep(self, ep):
if self.options.verbose: print "creating..."
cat_data = {
'kind': 1,
- 'name': ep.show.client.name,
- 'title': ep.show.client.name,
+ 'name': ep.show.name,
+ # 'name': ep.show.client.name,
+ 'title': ep.show.name,
+ # 'title': ep.show.client.name,
'description': '',
'url': '',
'whiteboard': '',
# I think start_date should be blank, or .today()
# 'start_date': '2012-07-16',
- 'slug': ep.show.client.slug
+ # 'slug': ep.show.client.slug
+ # 'slug': ep.show.slug
}
try:
- cat = api.category.post(cat_data,
- username=host['user'], api_key=host['api_key'])
- if self.options.verbose: print "created", cat
+ # cat = api.category.post(cat_data,
+ # username=host['user'], api_key=host['api_key'])
+ # if self.options.verbose: print "created", cat
+ pass
except Exception as exc:
# TODO: OMG gross.
if exc.content.startswith('\n<!DOCTYPE html>'):
@@ -107,28 +110,30 @@ def process_ep(self, ep):
# cat is now the category we want to use
# either it was existing, or was just added.
- category_key = cat['title']
- category_key = 'PyCon DE 2012'
-
+ # category_key = cat['title']
+ # category_key = 'PyCon DE 2012'
+ category_key = 'PyCon CA 2012'
description = (
linebreaks(
urlize(
force_escape(ep.description))))
+ slug = ep.slug.replace("_","-").lower()
# Let's populate a video object and push it.
video_data = {
'state': 1, # 1=live, 2=draft
'title': ep.name,
'category': category_key,
'summary': description,
- #'slug': ep.slug, ## richard will provide a better slug.
+ # 'slug': slug,
'source_url': ep.host_url,
'copyright_text': ep.license,
'tags': tags,
'speakers': speakers,
'recorded': ep.start.isoformat(),
- 'language': 'German',
+ 'language': 'English',
+ #'language': 'German',
'whiteboard': u'',
'quality_notes': '',
'description': u'',
View
20 dj/scripts/addeps.py
@@ -133,7 +133,6 @@ def goog(show,url):
minutes -= hours*60
duration="%s:%s:00" % ( hours,minutes)
- # released = True
# print name, authors, location, start, duration
print "%s: %s - %s" % ( authors, location, start.time() )
@@ -234,8 +233,8 @@ def generic_events(self, schedule, field_maps ):
try:
event[vk] = row[jk]
except:
- # event[vk] = None
- pass
+ event[vk] = None
+ # pass
else:
event[vk] = ''
@@ -283,6 +282,7 @@ def add_eps(self, episodes, show):
'conf_url', 'tags')
if created or self.options.update:
+ if self.options.verbose: pprint.pprint( row )
loc=Location.objects.get(name=row['location'])
loc.active = True
episode.location=loc
@@ -606,7 +606,7 @@ def zoo_events(self, schedule):
event['emails'] = row.get('Presenter_emails','')
# https://github.com/zookeepr/zookeepr/issues/93
- event['released'] = True
+ # event['released'] = True
event['license'] = self.options.license
event['description'] = row['Description']
@@ -855,7 +855,7 @@ def chipy_events(self, schedule ):
event['authors'] = event['authors'][0]['name']
event['emails'] = event['emails'][0]['email']
event['location'] = 'room_1'
- event['released'] = True
+ # event['released'] = True
event['license'] = ''
return events
@@ -920,7 +920,7 @@ def pct_events(self, schedule):
event['authors'] = src_event['presenters']
event['emails'] = ''
- event['released'] = True
+ # event['released'] = True
event['license'] = self.options.license
event['description'] = src_event['summary']
event['conf_key'] = src_event['id']
@@ -1059,7 +1059,7 @@ def scipy_events(self, schedule ):
# released flag fliping back to False?
# investigate later, ignore for now.
- event['released'] = event['released']!="0"
+ # event['released'] = event['released']!="0"
# del(event['released'])
if event['description'] is None:
@@ -1370,7 +1370,7 @@ def sched(self,schedule,show):
if self.options.verbose: print "event", event
row = event['raw']
- event['released'] = True
+ # event['released'] = True
if 'speakers' not in row.keys():
# del(event)
# continue
@@ -1483,7 +1483,7 @@ def pyconca2012(self,schedule,show):
('abstract','description'),
('start','start'),
('duration','duration'),
- ('','released'),
+ ('video_releaase','released'),
('','license'),
('','tags'),
('conf_key','conf_key'),
@@ -1506,7 +1506,7 @@ def pyconca2012(self,schedule,show):
event['duration'] = "00:%s:00" % ( event['duration'] )
- # event['released'] = True
+ event['released'] = raw['video_release']
event['license'] = ''
View
4 dj/updb.sh
@@ -5,8 +5,8 @@ if grep ^DATABASES local_settings.py; then
exit
fi
-# ssh -p 222 veyepar@nextdayvideo.com /home/veyepar/veyepar/dj/dumpdata.sh
-# scp -P 222 veyepar@nextdayvideo.com:veyepar/dj/veyepar_main.json .
+ssh -p 222 veyepar@nextdayvideo.com /home/veyepar/veyepar/dj/dumpdata.sh
+scp -P 222 veyepar@nextdayvideo.com:veyepar/dj/veyepar_main.json .
touch veyepar.db
mv veyepar.db ~/temp

0 comments on commit 9653892

Please sign in to comment.