Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

drop new --system-site-packages that my custom mkvirtualenv doesn't s…

…upport
  • Loading branch information...
commit 6cc32eeca3b0859e7be6380a0e406cbca842b893 1 parent 20f1c0c
@CarlFK authored
View
3  INSTALL.sh
@@ -54,7 +54,8 @@ source /usr/local/bin/virtualenvwrapper.sh
# mkdir ~/.virtualenvs
#fi
-mkvirtualenv --system-site-packages veyepar
+mkvirtualenv veyepar
+# mkvirtualenv --system-site-packages veyepar
printf "workon veyepar\n" >> ~/.bashrc
git clone git://github.com/CarlFK/veyepar.git
View
15 dj/scripts/add_to_richard.py
@@ -25,7 +25,8 @@ class RichardProcess(Process):
# pycon 2013 is an example of something that uses the Show.name.
#
# hardcoding category until we figure out a better system
- category_key = 'Test Category'
+ # category_key = self.options.pyvideo_category
+ # 'PyCon US 2013'
def process_ep(self, ep):
@@ -47,12 +48,12 @@ def process_ep(self, ep):
self.api = API(self.pyvideo_endpoint)
if self.options.verbose:
- print self.pyvideo_endpoint, self.host['user'], self.host['api_key'], {'title': self.category_key}
+ print self.pyvideo_endpoint, self.host['user'], self.host['api_key'], {'title': self.options.category_key}
# FIXME using chatty hack due to problems with category handling
- create_category_if_missing(self.pyvideo_endpoint, self.host['user'], self.host['api_key'], {'title': self.category_key})
+ create_category_if_missing(self.pyvideo_endpoint, self.host['user'], self.host['api_key'], {'title': self.options.category_key})
- video_data = self.create_pyvideo_episode_dict(ep)
+ video_data = self.create_pyvideo_episode_dict(ep, state=2)
# perhaps we could just update the dict based on scraped_meta
scraped_metadata = self.get_scrapevideo_metadata(ep)
video_data['thumbnail_url'] = scraped_metadata.get('thumbnail_url','')
@@ -138,7 +139,7 @@ def create_pyvideo_episode_dict(self, ep, state=1):
video_data = {
'state': state,
'title': ep.name,
- 'category': self.category_key,
+ 'category': self.options.category_key,
'summary': summary,
'source_url': ep.host_url,
'copyright_text': ep.license,
@@ -219,6 +220,10 @@ def is_already_in_pyvideo(self, ep):
# its truthiness implies that the video already exists in pyvideo
return ep.public_url
+ def add_more_options(self, parser):
+ parser.add_option('--category-key',
+ help="Name of category in pyvideo.org, ex 'PyCon US 2013'")
+
if __name__ == '__main__':
p = RichardProcess()
View
28 dj/scripts/addeps.py
@@ -73,6 +73,7 @@
from dateutil.parser import parse
import pprint
+import fixunicode
try:
import json
@@ -276,7 +277,9 @@ def add_eps(self, schedule, show):
created = True
fields=(
- 'name', 'authors', 'emails', 'description',
+ 'name', 'authors',
+ 'emails',
+ 'description',
'start','duration',
'released',
'license',
@@ -547,6 +550,7 @@ def snake_holes(self, schedule):
return rooms
def snake_bites(self, schedule, location):
+ print "Snake Bites"
# warning: location is the 2nd half of a hack:
# veyepar json export only gives room key, not name
@@ -556,9 +560,16 @@ def snake_bites(self, schedule, location):
events=[]
fields=('location','sequence','conf_key','host_url',
- 'name','slug', 'authors','emails', 'description',
+ 'name','slug', 'authors',
+ 'emails',
+ 'description',
+ 'released', 'license',
'start','duration',
- 'released', 'license', 'conf_key', 'conf_url', 'tags')
+ 'conf_key',
+ 'conf_url', 'tags',
+ # 'public_url'
+ )
+
for row in schedule:
pk = row['pk']
@@ -572,7 +583,7 @@ def snake_bites(self, schedule, location):
if not event['conf_key']: event['conf_key'] = pk
# event['location'] = location
event['start'] = datetime.datetime.strptime(
- row['start'], '%Y-%m-%d %H:%M:%S' )
+ row['start'], '%Y-%m-%dT%H:%M:%S' )
events.append(event)
@@ -1100,6 +1111,7 @@ def scipy_v2(self, schedule, show):
def veyepar(self, schedule, show):
+ print "veyepar"
# importing from some other instance
rooms = self.snake_holes(schedule)
# hack because the veyepar export doesn't give room name
@@ -1686,11 +1698,14 @@ def one_show(self, show):
if self.options.verbose: print url
-
if url.startswith('file'):
# kinda broke this
# nees to be meld in with the response object
f = open(url[7:])
+ j = json.load(f)
+ pprint.pprint(j)
+ self.veyepar(j, show)
+ return
else:
session = requests.session()
@@ -1714,7 +1729,8 @@ def one_show(self, show):
return self.fosdem2012(schedule,show)
else:
j = response.text
- schedule = response.json()
+ schedule = response.json
+ # schedule = response.json()
# if it is a python prety printed list:
# schedule = eval(j)
View
2  dj/scripts/run_tests.py
@@ -291,7 +291,7 @@ def post_yt(self):
import post_yt as post
p=post.post()
p.set_options(force=True, verbose=True,
- upload_formats=['mp4'],
+ upload_formats=['mp4', "dv"],
debug_log=True,
host_user="test",
)
View
2  dj/updb.sh
@@ -7,7 +7,7 @@ fi
# If the current user doesn't have ssh key access,
# BatchMode will cause this to fail and continue to the wget
-#ssh -o BatchMode=yes -p 222 veyepar@nextdayvideo.com /home/veyepar/veyepar/dj/dumpdata.sh
+# ssh -o BatchMode=yes -p 222 veyepar@nextdayvideo.com /home/veyepar/veyepar/dj/dumpdata.sh
# scp -P 222 veyepar@nextdayvideo.com:veyepar/dj/veyepar_main.json .
wget -N http://veyepar.nextdayvideo.com/site_media/static/veyepar/db/veyepar_main.json
View
5 tests/richard/get_db/reset_db.sh
@@ -3,6 +3,7 @@
# things to do to make this work:
# ssh-copy-id pyvideo.org
# rsync dump_x.sh pyvideo.org:
+# ./manage.py syncdb --migrate
# ./manage.py dumpdata auth > auth.json
# instance is a dir/site/db on pyvideo.org
@@ -12,10 +13,10 @@
instance=pyvideo
# dump data from db to file on remote filesystem
-#ssh pyvideo.org ./dump_x.sh $instance
+ssh pyvideo.org ./dump_x.sh $instance
# pull that file to local filesystem
-#rsync -vP pyvideo.org:richard_${instance}_videos.json .
+rsync -vP pyvideo.org:richard_${instance}_videos.json .
# blow away and reset previous local database
mv database.db ~/temp/
Please sign in to comment.
Something went wrong with that request. Please try again.