Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

draft - email meta preview

  • Loading branch information...
commit 700827a1f38968876c96cc4d50bd4ad1730d5fe7 1 parent 54eeb92
@CarlFK authored
View
5 .gitignore
@@ -12,3 +12,8 @@ temp
blip_uploader.cfg
veyepar.cfg
veyepar.db
+*.png
+*.gif
+*.pdf
+*.jpg
+
View
4 TODO.txt
@@ -1,3 +1,7 @@
+pyconde
+ 10 d-i time/zone string US/Central
+
+
client checklist:
release on talk submission
data driven schedule, api (json)
View
4 dj/main/templates/show_stats.html
@@ -104,7 +104,7 @@
{% endfor %}
</table>
- max name: <a href="E/{{max_name_ep.id}}/">{{ max_name_ep.name }}</a><br/>
- max authors: <a href="E/{{max_authors_ep.id}}/">{{ max_authors_ep.authors }}</a>
+ max name: #{{max_name_ep.id}} <a href="E/{{max_name_ep.id}}/">{{ max_name_ep.name }}</a><br/>
+ max authors: # {{max_authors_ep.id}} <a href="E/{{max_authors_ep.id}}/">{{ max_authors_ep.authors }}</a>
{% endblock %}
View
18 dj/scripts/addeps.py
@@ -1460,12 +1460,12 @@ def pyconde2012(self,schedule,show):
return
def pyconca2012(self,schedule,show):
- pprint.pprint(schedule)
+ # pprint.pprint(schedule)
schedule = schedule['data']['talk_list']
# return talks, session
- # not sure if we need this,
+ # remove rejected talks
schedule = [t for t in schedule if t['schedule_slot_id'] is not None]
rooms = self.get_rooms(schedule )
@@ -1478,17 +1478,15 @@ def pyconca2012(self,schedule,show):
('title','name'),
('','slug'),
('authors','authors'),
- ('contact','emails'),
- ('description','description'),
+ ('','emails'),
+ ('abstract','description'),
('start','start'),
('duration','duration'),
- ('released','released'),
- ('license','license'),
- ('tags','tags'),
+ ('','released'),
+ ('','license'),
+ ('','tags'),
('conf_key','conf_key'),
('conf_url','conf_url'),
- ('','host_url'),
- ('','publiv_url'),
]
events = self.generic_events(schedule, field_maps)
@@ -1500,7 +1498,7 @@ def pyconca2012(self,schedule,show):
event['authors'] = \
raw['speaker_first_name'] +' ' + raw['speaker_last_name']
- event['contact'] = raw['user']['email']
+ event['emails'] = raw['user']['email']
event['start'] = datetime.datetime.strptime(
event['start'],'%Y-%m-%dT%H:%M:%S-05:00')
View
65 dj/scripts/email_title.py
@@ -0,0 +1,65 @@
+#!/usr/bin/python
+
+# email_url.py
+# emails the video URL to the presenters
+
+from django.core.mail import get_connection, EmailMessage
+
+from process import process
+
+class email_title(process):
+
+ ready_state = None
+
+ def process_ep(self, ep):
+ if self.options.verbose: print ep
+ url = ep.public_url ### or ep.host_url
+ if ep.emails and ep.released and url:
+ tos = ep.emails.split(',')
+ subject = "Video metadata for: %s" % ep.name
+ body = """
+ According to the released field in the database, your talk is going
+ to be recorded and posted online. If this is a problem, please
+ contact the conference organizers.
+
+ Please review the following text:
+ %(title)s
+ %(authors)s
+ %(description)s
+
+ Problems with the text will need to be fixed in the conference database.
+
+ Also have a look at the attached title slide to verify that it rendered
+ correctly. If there is a problem with it, first check here for
+ the latest version to see if the problem has already been corrected:
+ %(svg_url)s
+
+ and then ontact me by repling to this message.
+
+ Reference: #%(id)s %(slug)s
+
+ Email generated by Veyepar, but replies go to Carl.
+ """ % ({ 'title':ep.title, 'authors':ep.authors,
+ 'description':ep.description, 'svg_url':url,
+ 'id':ep.id, 'slug':ep.slug })
+
+ # connect to the smtp server
+ connection = get_connection()
+ sender = 'Carl Karsten <carl@nextdayvideo.com>'
+ headers = {
+ # 'Reply-To': "ChiPy <chicago@python.org>"
+ # 'From': sender,
+ }
+ email = EmailMessage(subject, body, sender, tos, headers=headers )
+ ret = connection.send_messages([email])
+ print tos, ret
+ ret = True # need to figure out what .send_messages returns
+
+ else:
+ ret = False
+ return ret
+
+if __name__ == '__main__':
+ p=email_title()
+ p.main()
+
View
4 dj/scripts/enc.py
@@ -141,11 +141,11 @@ def mk_title_svg(self, raw_svg, texts):
tree=xml.etree.ElementTree.XMLID(raw_svg)
for key in texts:
- if self.options.verbose: print key
+ if self.options.verbose: print "looking for:", key
# tollerate template where tokens have been removed
if tree[1].has_key(key):
if self.options.verbose:
- print "org", tree[1][key].text
+ print "fond in svg:", tree[1][key].text
# print "new", texts[key].encode()
tree[1][key].text=texts[key]
View
3  utils/cloud_sync.sh
@@ -1,2 +1,3 @@
-rsync -rtvP -e 'ssh -p 222' --exclude="**.dv" -v --copy-dirlinks enthought veyepar@nextdayvideo.com:Videos/veyepar/
+rsync -rtvP -e 'ssh -p 222' --exclude="**.dv" -v --copy-dirlinks pyconca veyepar@nextdayvideo.com:Videos/veyepar/
+# rsync -rtvP -e 'ssh -p 222' --exclude="**.dv" -v --copy-dirlinks enthought veyepar@nextdayvideo.com:Videos/veyepar/
# rsync -rtvP --exclude="**.dv" -v --bwlimit=350 vt@71.239.168.206:Videos/veyepar/flourish/ .
Please sign in to comment.
Something went wrong with that request. Please try again.