rapucation project
DESCRIPTION
Lightning talk given at the Plone Conference 2009 in Budapest, Hungary on the Rapucation education project. For more information, see www.rapucation.euTRANSCRIPT
vrijdag 30 oktober 2009(w )
RapucationFred van DijkZest Software
vrijdag 30 oktober 2009(w )
Subjects
• LinguaPlone Rocks
• Video in Plone
• contentrules
vrijdag 30 oktober 2009(w )
Story
• A music teacher in a secondary school
• Teenagers:
• Classical music, old instruments, notation…. Booh
• Music video’s, rap songs…. Yeahhh!
vrijdag 30 oktober 2009(w )
Rapucation
• Rap songs
• Education
vrijdag 30 oktober 2009(w )
Teenagers...
• Young people have specific ideas about the World.
• Use these ideas in a creative way by making a video.
• Educational
• Put it on the web: share your ideas
• Others can be influenced creatively and make new versions
vrijdag 30 oktober 2009(w )
Rapucation
Group 1
Video
Lyrics Dutch
Audio Dutch
English transl.
Group 2
Lyrics German
Audio German
transl. Italian
Group 3
Lyrics French
Audio French
Group 4
Lyrics spanish
vrijdag 30 oktober 2009(w )
Rapucation
• A group of secondary school students create a rap song
• Lyrics
• Video
• Audio
• Translation in a foreign language
• How/Who/What/Why/Where/When info
vrijdag 30 oktober 2009(w )
1
vrijdag 30 oktober 2009(w )
LinguaPlone - Song CTTitleDescriptionLyricsTranslationInstrumental videoFull video
Song WatsgeburtDutch, canonical
TitleDescriptionLyricsTranslationInstrumental videoFull video
Song Wirst ErblickGerman
TitleDescriptionLyricsTranslationInstrumental videoFull video
Song .....French
vrijdag 30 oktober 2009(w )
LinguaPlone
• Shows only content in the same language or neutral
• Filters content from other languages
• But you want both: translate the site layout and show songs in different languages
vrijdag 30 oktober 2009(w )
LinguaPlonefrom Products.LinguaPlone.browser.language import Rendererfrom Products.LinguaPlone.interfaces import ITranslatable
lp_renderer = Renderer(self.context, self.request, None, None, None) results = []
for item in lp_renderer.items(): if item['translated']: obj = self.context.getTranslation(item['code']) wf_state = self.wf_tool.getInfoFor(aq_inner(obj), 'review_state', None) if wf_state == 'published': results.append(item) return results
vrijdag 30 oktober 2009(w )
Song Details
vrijdag 30 oktober 2009(w )
Homepage: All Songs (English)
• Search English songs
• Lookup translations per song
• Search still unused songs
• show unusd translations
vrijdag 30 oktober 2009(w )
portal_catalog
query = dict(object_provides = [ISong.__identifier__,], review_state = 'published', sort_order = 'Date', Language = 'all',)
query_main = dict(object_provides = [ISong.__identifier__,], review_state = 'published', sort_order = 'Date', Language=self.current_language)
vrijdag 30 oktober 2009(w )
All songs (Dutch)
• Switch language: Dutch
Dutch songs first, on top
vrijdag 30 oktober 2009(w )
vrijdag 30 oktober 2009(w )
vrijdag 30 oktober 2009(w )
vrijdag 30 oktober 2009(w )
2
vrijdag 30 oktober 2009(w )
Video in the Rapucation Site
• Don’t serve it from Plone
• It is stored in Plone (on the filesystem)
• Students can upload high res versions in any format for the instrumental and full sung version
vrijdag 30 oktober 2009(w )
Use a Streaming Provider
• Asynchronous conversion
• We have a separate python script using ffmpeg
• Pull a video to convert fromt he Plone site /@@videoconvert
thats-my-word,en,http://localhost:8080/rapucation/songs/thats-my-word,videoclip
vrijdag 30 oktober 2009(w )
Use a Streaming Provider
• Convert it to one default format and size
• Upload it to ftp.streamingprovider.com
• Update the song on the plone site with the correct video http-url
params = urllib.urlencode( {"status": status, "mtype" : movie_type, "file" : filename } )set_url = auth_song_url + "/@@set_conversion_status?" + paramsset_result = urllib.urlopen(set_url).read()
vrijdag 30 oktober 2009(w )
3
vrijdag 30 oktober 2009(w )
notification
• Students submit a song, but a moderator has to review
teenagers, eductional, no swearing
• Reviewer (teacher) has a local role to review a few songs
• How to notify the Reviewer by mail?
• workflow script -> hardwired to a workflow
vrijdag 30 oktober 2009(w )
vrijdag 30 oktober 2009(w )
vrijdag 30 oktober 2009(w )
contentrules
• contentrules are great
• two components Filters and Actions
• check plone.app.contentrules for the basic examples
• Add small blocks of functionality
• one .py and a tests file is all there is to it
• reuse
vrijdag 30 oktober 2009(w )
www.rapucation.eu
• simple first version: one CT, video conversion views, contentrule
• Been online for a year, next development cycle on account creation and management, it’s been proven now to work.
• Plone in eduction = cool !
vrijdag 30 oktober 2009(w )
Thanks!
vrijdag 30 oktober 2009(w )