# HG changeset patch # User verrierj # Date 1328193015 -3600 # Node ID 9b3ad1aa186875be859f61868694c8745d61d5e7 # Parent 8dc3043a747011934ed9936865f0b35c8d8e6379# Parent d6371bde0c13b36b44c186d40f78ae4355f94c85 Merge with d6371bde0c13b36b44c186d40f78ae4355f94c85 diff -r 8dc3043a7470 -r 9b3ad1aa1868 .DS_Store Binary file .DS_Store has changed diff -r 8dc3043a7470 -r 9b3ad1aa1868 .settings/org.eclipse.core.resources.prefs --- a/.settings/org.eclipse.core.resources.prefs Thu Feb 02 15:24:08 2012 +0100 +++ b/.settings/org.eclipse.core.resources.prefs Thu Feb 02 15:30:15 2012 +0100 @@ -1,4 +1,4 @@ -#Wed Jan 25 12:23:22 CET 2012 +#Wed Feb 01 17:37:13 CET 2012 eclipse.preferences.version=1 encoding//src/ldt/ldt/core/migrations/0001_initial.py=utf-8 encoding//src/ldt/ldt/core/migrations/0002_auto__del_owner.py=utf-8 @@ -11,6 +11,7 @@ encoding//src/ldt/ldt/ldt_utils/migrations/0009_auto__chg_field_content_image__chg_field_project_image.py=utf-8 encoding//src/ldt/ldt/ldt_utils/migrations/0010_auto__add_annotationstat.py=utf-8 encoding//src/ldt/ldt/ldt_utils/migrations/0011_gen_stat_annotation.py=utf-8 +encoding//src/ldt/ldt/management/utils.py=utf-8 encoding//src/ldt/ldt/text/migrations/0001_initial.py=utf-8 encoding//src/ldt/ldt/user/migrations/0001_initial.py=utf-8 encoding//src/ldt/ldt/user/migrations/0002_auto__del_irigroup.py=utf-8 diff -r 8dc3043a7470 -r 9b3ad1aa1868 src/ldt/ldt/management/utils.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/ldt/ldt/management/utils.py Thu Feb 02 15:30:15 2012 +0100 @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +''' +Created on Feb 1, 2012 + +@author: ymh +''' +import sys +import codecs #@UnresolvedImport +import math + +def show_progress(current_line, total_line, label, width, writer=None): + + if writer is None: + writer = sys.stdout + if sys.stdout.encoding is not None: + writer = codecs.getwriter(sys.stdout.encoding)(sys.stdout) + + percent = (float(current_line) / float(total_line)) * 100.0 + + marks = math.floor(width * (percent / 100.0)) #@UndefinedVariable + spaces = math.floor(width - marks) #@UndefinedVariable + + loader = u'[' + (u'=' * int(marks)) + (u' ' * int(spaces)) + u']' + + s = u"%s %3d%% %*d/%d - %*s\r" % (loader, percent, len(str(total_line)), current_line, total_line, width, label[:width]) + + writer.write(s) #takes the header into account + if percent >= 100: + writer.write("\n") + writer.flush() + + return writer diff -r 8dc3043a7470 -r 9b3ad1aa1868 src/ldt/ldt/static/ldt/js/LdtPlayer-release.js --- a/src/ldt/ldt/static/ldt/js/LdtPlayer-release.js Thu Feb 02 15:24:08 2012 +0100 +++ b/src/ldt/ldt/static/ldt/js/LdtPlayer-release.js Thu Feb 02 15:30:15 2012 +0100 @@ -1092,7 +1092,7 @@ IriSP.annotation_loading_template = "{{! template shown while the annotation widget is loading }}
 
Chargement...
"; IriSP.annotationsListWidget_template = "{{! template for the annotation list widget }}
"; IriSP.arrowWidget_template = "
"; -IriSP.createAnnotationWidget_template = "{{! template for the annotation creation widget }}
{{^cinecast_version}} Cancel {{/cinecast_version}}
Add keywords :
{{#polemic_mode}}
Add polemic keywords
{{/polemic_mode}}
Submit
"; +IriSP.createAnnotationWidget_template = "{{! template for the annotation creation widget }}
{{^cinecast_version}} Cancel {{/cinecast_version}}
Submit
Add keywords :
{{#polemic_mode}}
Add polemic keywords
{{/polemic_mode}}
"; IriSP.createAnnotationWidget_festivalCinecast_template = "{{! template for the annotation creation widget specific for the cinecast festival}}
Add keywords :
Submit
"; IriSP.createAnnotation_errorMessage_template = "

You must enter text to submit an annotation

"; IriSP.overlay_marker_template = "{{! the template for the small bars which is z-indexed over our segment widget }}
"; @@ -2949,7 +2949,6 @@ code = {start: annotation.begin / 1000, end: annotation.end / 1000, onStart: function(annotation) { return function() { - console.log("runned ?", annotation); if (typeof(annotation.content) !== "undefined") _this.selector.find(".Ldt-createAnnotation-Title").html(annotation.content.title); @@ -3180,7 +3179,11 @@ annotation.content["data"] = contents; var meta = apiJson["meta"]; - meta.creator = "An User"; + if (!IriSP.null_or_undefined(IriSP.user) && !IriSP.null_or_undefined(IriSP.user.name)) + meta.creator = IriSP.user.name; + else + meta.creator = "An User"; + meta.created = Date().toString(); annotation["tags"] = []; diff -r 8dc3043a7470 -r 9b3ad1aa1868 virtualenv/res/lib/lib_create_env.py --- a/virtualenv/res/lib/lib_create_env.py Thu Feb 02 15:24:08 2012 +0100 +++ b/virtualenv/res/lib/lib_create_env.py Thu Feb 02 15:30:15 2012 +0100 @@ -31,6 +31,9 @@ 'SOCIAL_AUTH': {'setup':'social_auth', 'url':'https://github.com/omab/django-social-auth/tarball/v0.3.10', 'local':"omab-django-social-auth-v0.3.10-modified.tar.gz"}, 'SOUTH': { 'setup': 'South', 'url':'http://www.aeracode.org/releases/south/south-0.7.3.tar.gz', 'local':"south-0.7.3.tar.gz"}, 'DJANGO_GUARDIAN' : { 'setup': 'django-guardian', 'url':'http://pypi.python.org/packages/source/d/django-guardian/django-guardian-1.0.3.tar.gz', 'local':"django-guardian-1.0.3.tar.gz"}, + 'SORL_THUMBNAIL' : { 'setup': 'sorl-thumbnail', 'url':'http://pypi.python.org/packages/source/s/sorl-thumbnail/sorl-thumbnail-11.12.tar.gz', 'local':"sorl-thumbnail-v10.12.1.tar.gz"}, + 'LIBJPEG': {'setup': None, 'url':'jpegsrc.v8d.tar.gz', 'local':'jpegsrc.v8d.tar.gz'}, + 'ZLIB': {'setup': None, 'url':'zlib-1.2.6.tar.gz', 'local':'zlib-1.2.6.tar.gz'}, } if system_str == 'Windows': @@ -207,7 +210,102 @@ shutil.copytree(os.path.join(psycopg2_src_path, 'psycopg2'), os.path.abspath(os.path.join(home_dir, 'Lib/site-packages', 'psycopg2'))) shutil.copy(os.path.join(psycopg2_src_path, 'psycopg2-2.0.14-py2.6.egg-info'), os.path.abspath(os.path.join(home_dir, 'Lib/site-packages', 'site-packages'))) +def gen_install_comp_lib(lib_name, lib_key, configure_options=[]): + + def install_lib(option_str, extra_env, res_source_key, home_dir, lib_dir, tmp_dir, src_dir, res_env, logger, call_subprocess, filter_python_develop): + lib_src = os.path.join(src_dir,lib_name+".tar.gz") + shutil.copy(res_env.URLS[lib_key][res_source_key], lib_src) + tf = tarfile.open(lib_src,'r:gz') + lib_base_path = os.path.join(src_dir, lib_name) + logger.notify("Extract %s to %s " % (lib_name,lib_base_path)) + tf.extractall(lib_base_path) + tf.close() + + lib_src_path = os.path.join(lib_base_path, os.listdir(lib_base_path)[0]) + + logger.notify("libjpeg configure") + call_subprocess(['configure', '--prefix='+os.path.abspath(home_dir)] + configure_options, + cwd=os.path.abspath(lib_src_path), + filter_stdout=filter_python_develop, + show_stdout=True) + + logger.notify("libjpeg make") + call_subprocess(['make'], + cwd=os.path.abspath(lib_src_path), + filter_stdout=filter_python_develop, + show_stdout=True) + + logger.notify("zlib make install") + call_subprocess(['make', 'install'], + cwd=os.path.abspath(lib_src_path), + filter_stdout=filter_python_develop, + show_stdout=True) + return install_lib +install_libjpeg = gen_install_comp_lib("libjpeg", "LIBJPEG", ['--enable-shared']) +install_zlib = gen_install_comp_lib("zlib", "ZLIB", []) + +#def install_libjpeg(option_str, extra_env, res_source_key, home_dir, lib_dir, tmp_dir, src_dir, res_env, logger, call_subprocess, filter_python_develop): +# libjpeg_src = os.path.join(src_dir,"jpegsrc.tar.gz") +# shutil.copy(res_env.URLS['LIBJPEG'][res_source_key], libjpeg_src) +# tf = tarfile.open(pylucene_src,'r:gz') +# libjpeg_base_path = os.path.join(src_dir,"libjpeg") +# logger.notify("Extract libjpeg to %s " % libjpeg_base_path) +# tf.extractall(libjpeg_base_path) +# tf.close() +# +# libjpeg_src_path = os.path.join(libjpeg_base_path, os.listdir(libjpeg_base_path)[0]) +# +# logger.notify("libjpeg configure") +# call_subprocess(['configure', '--enable-shared', '--prefix='+os.path.abspath(home_dir)], +# cwd=os.path.abspath(libjpeg_src_path), +# filter_stdout=filter_python_develop, +# show_stdout=True) +# +# logger.notify("libjpeg make") +# call_subprocess(['make'], +# cwd=os.path.abspath(libjpeg_src_path), +# filter_stdout=filter_python_develop, +# show_stdout=True) +# +# logger.notify("zlib make install") +# call_subprocess(['make', 'install'], +# cwd=os.path.abspath(libjpeg_src_path), +# filter_stdout=filter_python_develop, +# show_stdout=True) +# +# +#def install_zlib(option_str, extra_env, res_source_key, home_dir, lib_dir, tmp_dir, src_dir, res_env, logger, call_subprocess, filter_python_develop): +# zlib_src = os.path.join(src_dir,"zlib.tar.gz") +# shutil.copy(res_env.URLS['ZLIB'][res_source_key], libjpeg_src) +# tf = tarfile.open(pylucene_src,'r:gz') +# zlib_base_path = os.path.join(src_dir,"zlib") +# logger.notify("Extract libjpeg to %s " % zlib_base_path) +# tf.extractall(zlib_base_path) +# tf.close() +# +# zlib_src_path = os.path.join(zlib_base_path, os.listdir(zlib_base_path)[0]) +# +# logger.notify("zlib configure") +# call_subprocess(['configure', '--enable-shared', '--prefix='+os.path.abspath(home_dir)], +# cwd=os.path.abspath(zlib_src_path), +# filter_stdout=filter_python_develop, +# show_stdout=True) +# +# logger.notify("zlib make") +# call_subprocess(['make'], +# cwd=os.path.abspath(zlib_src_path), +# filter_stdout=filter_python_develop, +# show_stdout=True) +# +# logger.notify("zlib make install") +# call_subprocess(['make', 'install'], +# cwd=os.path.abspath(zlib_src_path), +# filter_stdout=filter_python_develop, +# show_stdout=True) + + + def lib_generate_install_methods(path_locations, src_base, Logger, call_subprocess, normal_installs, urls=None): diff -r 8dc3043a7470 -r 9b3ad1aa1868 virtualenv/res/src/jpegsrc.v8d.tar.gz Binary file virtualenv/res/src/jpegsrc.v8d.tar.gz has changed diff -r 8dc3043a7470 -r 9b3ad1aa1868 virtualenv/res/src/sorl-sorl-thumbnail-v10.12.1-65-g2285451.tar.gz Binary file virtualenv/res/src/sorl-sorl-thumbnail-v10.12.1-65-g2285451.tar.gz has changed diff -r 8dc3043a7470 -r 9b3ad1aa1868 virtualenv/res/src/sorl-thumbnail-v10.12.1.tar.gz Binary file virtualenv/res/src/sorl-thumbnail-v10.12.1.tar.gz has changed diff -r 8dc3043a7470 -r 9b3ad1aa1868 virtualenv/res/src/zlib-1.2.6.tar.gz Binary file virtualenv/res/src/zlib-1.2.6.tar.gz has changed diff -r 8dc3043a7470 -r 9b3ad1aa1868 virtualenv/web/res/res_create_env.py --- a/virtualenv/web/res/res_create_env.py Thu Feb 02 15:24:08 2012 +0100 +++ b/virtualenv/web/res/res_create_env.py Thu Feb 02 15:30:15 2012 +0100 @@ -38,6 +38,7 @@ ('DJANGO_OPENID_CONSUMER', 'pip', None, None), ('SOCIAL_AUTH', 'easy_install', None, None), ('DJANGO_GUARDIAN', 'pip', None, None), + ('SOLR_THUMBNAIL', 'pip', None, None), ]) if system_str == "Darwin": diff -r 8dc3043a7470 -r 9b3ad1aa1868 web/ldtplatform/config.py.tmpl --- a/web/ldtplatform/config.py.tmpl Thu Feb 02 15:24:08 2012 +0100 +++ b/web/ldtplatform/config.py.tmpl Thu Feb 02 15:30:15 2012 +0100 @@ -90,16 +90,7 @@ AUTO_INDEX_AFTER_SAVE = True -USE_GROUP_PERMISSIONS = ['Project', 'Content', 'Media'] FORBIDDEN_STREAM_URL = "rtmp://media.iri.centrepompidou.fr/ddc_player/mp4:video/forbidden_stream.mp4?old_path=" -PUBLIC_GROUP_NAME = 'everyone' -MAX_USERS_SEARCH = 20 - -DEFAULT_CONTENT_ICON = "thumbnails/contents/content_default_icon.png" -DEFAULT_PROJECT_ICON = "thumbnails/projects/project_default_icon.png" -DEFAULT_USER_ICON = "thumbnails/users/user_default_icon.png" -DEFAULT_GROUP_ICON = "thumbnails/groups/group_default_icon.png" -PROFILE_IMG_MAX_SIZE = 1000000 FRONT_TAG_LIST = [u"Enmi 2011", u"film", u"conférence"] diff -r 8dc3043a7470 -r 9b3ad1aa1868 web/ldtplatform/settings.py --- a/web/ldtplatform/settings.py Thu Feb 02 15:24:08 2012 +0100 +++ b/web/ldtplatform/settings.py Thu Feb 02 15:30:15 2012 +0100 @@ -216,7 +216,19 @@ DIVISIONS_FOR_STAT_ANNOTATION = 64 -FRONT_TAG_LIST = [u"Enmi 2011",u"film"] +FRONT_TAG_LIST = [] + +DEFAULT_CONTENT_ICON = "thumbnails/contents/content_default_icon.png" +DEFAULT_PROJECT_ICON = "thumbnails/projects/project_default_icon.png" +DEFAULT_USER_ICON = "thumbnails/users/user_default_icon.png" +DEFAULT_GROUP_ICON = "thumbnails/groups/group_default_icon.png" +PROFILE_IMG_MAX_SIZE = 1000000 + +USE_GROUP_PERMISSIONS = ['Project', 'Content', 'Media'] +FORBIDDEN_STREAM_URL = "rtmp://media.iri.centrepompidou.fr/ddc_player/mp4:video/forbidden_stream.mp4?old_path=" +PUBLIC_GROUP_NAME = 'everyone' +MAX_USERS_SEARCH = 20 + from config import *