Binary file .DS_Store has changed
--- 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
--- /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
--- 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 }}<div id='Ldt-load-container'><div id='Ldt-loader'> </div> Chargement... </div>";
IriSP.annotationsListWidget_template = "{{! template for the annotation list widget }}<div class='Ldt-AnnotationsListWidget'> <!-- ugly div because we want to have a double border --> <div class='Ldt-Annotation-DoubleBorder'> <ul> {{#annotations}} <li> {{! if the url is not present, it means that the annotation exists in the current project }} {{^url}} <a href='#id={{id}}'> {{/url}} {{! otherwise link to url }} {{#url}} <a href='{{url}}#id={{id}}'> {{/url}} <div style='overflow: auto; margin-top: 5px; margin-bottom: 5px;'> <div class='Ldt-AnnotationsList-Caption'> <img src='http://i.imgur.com/aoUlC.jpg'></img> </div> <div class='Ldt-AnnotationsList-Duration'>{{begin}} - {{end}}</div> <div class='Ldt-AnnotationsList-Title'>{{title}}</div> <div class='Ldt-AnnotationsList-Description'>{{desc}}</div> </div> </a> </li> {{/annotations}} </ul> </div></div>";
IriSP.arrowWidget_template = "<div class='Ldt-arrowWidget'></div>";
-IriSP.createAnnotationWidget_template = "{{! template for the annotation creation widget }}<div class='Ldt-createAnnotationWidget'> <!-- ugly div because we want to have a double border --> <div class='Ldt-createAnnotation-DoubleBorder'> <div class='Ldt-createAnnotation-startScreen'> <div style='margin-bottom: 7px; overflow: auto;'> <div class='Ldt-createAnnotation-Title'></div> <div class='Ldt-createAnnotation-TimeFrame'></div> {{^cinecast_version}} <img src='{{img_dir}}/minimize.png' class='Ldt-createAnnotation-Minimize' alt='Cancel'></img> {{/cinecast_version}} </div> <div class='Ldt-createAnnotation-Container'> <textarea class='Ldt-createAnnotation-Description'></textarea> <div class='Ldt-createAnnotation-profileArrow'> <img src='{{img_dir}}/annotate_arrow.png'></img> </div> <div class='Ldt-createAnnotation-userAvatar'> <img src='https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png'></img> </div> </div> <div class='Ldt-createAnnotation-keywords'> Add keywords : </div> {{#polemic_mode}} <div class='Ldt-createAnnotation-polemics'> Add polemic keywords </div> {{/polemic_mode}} <div class='Ldt-createAnnotation-submitButton'> <div style='position: absolute; bottom: 10pt; right: 11pt;'>Submit</div> </div> </div> <div class='Ldt-createAnnotation-waitScreen' style='display: none; text-align: center'> <img src='{{img_dir}}/spinner.gif'></img> Please wait while your request is being processed... </div> <div class='Ldt-createAnnotation-endScreen' style='display: none'> Thank you, your annotation has been saved.<br> Would you like to share it on social networks ? <div style='margin-top: 12px; text-align: center;'> <a target='_blank' class='Ldt-createAnnotation-endScreen-TweetLink'><img src='{{img_dir}}/tweet_button.png' style='margin-right: 20px;'></img></a> <a target='_blank' class='Ldt-createAnnotation-endScreen-FbLink'><img src='{{img_dir}}/facebook_button.png' style='margin-right: 20px;'></img></a> <a target='_blank' class='Ldt-createAnnotation-endScreen-GplusLink'><img src='{{img_dir}}/gplus_button.png' style='margin-right: 20px;'></img></a> </div> </div> </div></div>";
+IriSP.createAnnotationWidget_template = "{{! template for the annotation creation widget }}<div class='Ldt-createAnnotationWidget'> <!-- ugly div because we want to have a double border --> <div class='Ldt-createAnnotation-DoubleBorder'> <div class='Ldt-createAnnotation-startScreen'> <div style='margin-bottom: 7px; overflow: auto;'> <div class='Ldt-createAnnotation-Title'></div> <div class='Ldt-createAnnotation-TimeFrame'></div> {{^cinecast_version}} <img src='{{img_dir}}/minimize.png' class='Ldt-createAnnotation-Minimize' alt='Cancel'></img> {{/cinecast_version}} </div> <div class='Ldt-createAnnotation-Container'> <textarea class='Ldt-createAnnotation-Description'></textarea> <div class='Ldt-createAnnotation-profileArrow'> <img src='{{img_dir}}/annotate_arrow.png'></img> </div> <div class='Ldt-createAnnotation-userAvatar'> <img src='https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png'></img> </div> </div> <div class='Ldt-createAnnotation-submitButton'> <div style='position: absolute; bottom: 17px; right: 13px;'>Submit</div> </div> <div class='Ldt-createAnnotation-keywords'> Add keywords : </div> {{#polemic_mode}} <div class='Ldt-createAnnotation-polemics'> Add polemic keywords </div> {{/polemic_mode}} </div> <div class='Ldt-createAnnotation-waitScreen' style='display: none; text-align: center'> <img src='{{img_dir}}/spinner.gif'></img> Please wait while your request is being processed... </div> <div class='Ldt-createAnnotation-endScreen' style='display: none'> Thank you, your annotation has been saved.<br> Would you like to share it on social networks ? <div style='margin-top: 12px; text-align: center;'> <a target='_blank' class='Ldt-createAnnotation-endScreen-TweetLink'><img src='{{img_dir}}/tweet_button.png' style='margin-right: 20px;'></img></a> <a target='_blank' class='Ldt-createAnnotation-endScreen-FbLink'><img src='{{img_dir}}/facebook_button.png' style='margin-right: 20px;'></img></a> <a target='_blank' class='Ldt-createAnnotation-endScreen-GplusLink'><img src='{{img_dir}}/gplus_button.png' style='margin-right: 20px;'></img></a> </div> </div> </div></div>";
IriSP.createAnnotationWidget_festivalCinecast_template = "{{! template for the annotation creation widget specific for the cinecast festival}}<div class='Ldt-createAnnotationWidget'> <!-- ugly div because we want to have a double border --> <div class='Ldt-createAnnotation-DoubleBorder'> <div style='margin-bottom: 7px; overflow: auto;'> <div class='Ldt-createAnnotation-Title'></div> <div class='Ldt-createAnnotation-TimeFrame'></div> </div> <div class='Ldt-createAnnotation-Container'> <textarea class='Ldt-createAnnotation-Description'></textarea> <div class='Ldt-createAnnotation-profileArrow'> <img src='{{img_dir}}/annotate_arrow.png'></img> </div> <div class='Ldt-createAnnotation-userAvatar'> <img src='https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png'></img> </div> </div> <div class='Ldt-createAnnotation-keywords'> Add keywords : </div> <div class='Ldt-createAnnotation-submitButton'> <div style='position: absolute; bottom: 10pt; right: 11pt;'>Submit</div> </div> <div class='Ldt-createAnnotation-endScreen' style='display: none'> Thank you, your annotation has been saved.<br> Would you like to share it on social networks ? <div style='margin-top: 12px; text-align: center;'> <a target='_blank' class='Ldt-createAnnotation-endScreen-TweetLink'><img src='{{img_dir}}/tweet_button.png' style='margin-right: 20px;'></img></a> <a target='_blank' class='Ldt-createAnnotation-endScreen-FbLink'><img src='{{img_dir}}/facebook_button.png' style='margin-right: 20px;'></img></a> <a target='_blank' class='Ldt-createAnnotation-endScreen-GplusLink'><img src='{{img_dir}}/gplus_button.png' style='margin-right: 20px;'></img></a> </div> </div> </div></div>";
IriSP.createAnnotation_errorMessage_template = "<p class='Ldt-createAnnotation-errorMessage'> You must enter text to submit an annotation</p>";
IriSP.overlay_marker_template = "{{! the template for the small bars which is z-indexed over our segment widget }}<div class='Ldt-SegmentPositionMarker' style='background-color: #F7268E;'></div>";
@@ -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"] = [];
--- 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):
Binary file virtualenv/res/src/jpegsrc.v8d.tar.gz has changed
Binary file virtualenv/res/src/sorl-sorl-thumbnail-v10.12.1-65-g2285451.tar.gz has changed
Binary file virtualenv/res/src/sorl-thumbnail-v10.12.1.tar.gz has changed
Binary file virtualenv/res/src/zlib-1.2.6.tar.gz has changed
--- 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":
--- 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"]
--- 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 *