Navigation Menu

Skip to content

Commit

Permalink
pyconca
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlFK committed Nov 12, 2012
1 parent 28809a0 commit 9653892
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 26 deletions.
2 changes: 2 additions & 0 deletions TODO.txt
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dj/main/views.py
Expand Up @@ -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'
Expand Down
31 changes: 18 additions & 13 deletions dj/scripts/add_to_richard.py
Expand Up @@ -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
Expand All @@ -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>'):
Expand All @@ -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'',
Expand Down
20 changes: 10 additions & 10 deletions dj/scripts/addeps.py
Expand Up @@ -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() )
Expand Down Expand Up @@ -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] = ''

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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']
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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']
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'),
Expand All @@ -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'] = ''

Expand Down
4 changes: 2 additions & 2 deletions dj/updb.sh
Expand Up @@ -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
Expand Down

0 comments on commit 9653892

Please sign in to comment.