From 9d7138359236450fe3ca48253cede0dac6c3af18 Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Sun, 26 Sep 2010 18:08:29 -0400 Subject: timb commiting prod changes... --- scripts/s3upload.py | 90 ++++++++++++++++++--------------------------- static/css/dump.css | 23 ++++++------ static/form_login/front.css | 3 +- static/js/fullscreen.js | 2 + template/banner.st | 6 +-- template/footer.st | 4 +- template/messagepane.st | 41 +++++++++++++++++---- template/mini_profile.st | 8 ++++ template/rooms/VIP.st | 2 +- template/share_buttons.st | 4 +- 10 files changed, 101 insertions(+), 82 deletions(-) diff --git a/scripts/s3upload.py b/scripts/s3upload.py index f4a5a77..a31874b 100644 --- a/scripts/s3upload.py +++ b/scripts/s3upload.py @@ -9,9 +9,7 @@ CONN = None AWS_ACCESS_KEY_ID = 'AKIAJAQK4CDDP6I6SNVA' AWS_SECRET_ACCESS_KEY = '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' BUCKET_NAME = 'dumpfm' - -def parse_date(date_string, fmt='%Y%m%d'): - return datetime.datetime.strptime(date_string, fmt) +COUNTER = 0 def retry_func(f, count): try: @@ -22,75 +20,57 @@ def retry_func(f, count): print 'Error! retrying %s more time(s)' % (count - 1) retry_func(f, count - 1) -def upload_file(path, dry_run=True): +def upload_file(path): + global COUNTER path = os.path.normpath(path) if path == '.' or not os.path.isfile(path): return filedata = open(path, 'rb').read() + size = os.path.getsize(path) content_type = mimetypes.guess_type(path)[0] if not content_type: content_type = 'text/plain' path = path.replace('\\', '/') # Windows hack - if not dry_run: - start = time.time() - def do_upload(): - CONN.put(BUCKET_NAME, path, S3.S3Object(filedata), - {'x-amz-acl': 'public-read', 'Content-Type': content_type}) - retry_func(do_upload, 3) - ms_took = (time.time() - start) * 1000 - print "uploaded %s (%0.0fms)" % (path, ms_took) + start = time.time() + def do_upload(): + CONN.put(BUCKET_NAME, path, S3.S3Object(filedata), + {'x-amz-acl': 'public-read', 'Content-Type': content_type}) + retry_func(do_upload, 3) + + ms_took = (time.time() - start) * 1000 + print "uploaded %s (%0.0fms) (%sKB)" % (path, ms_took, size / 1024) + COUNTER += 1 +def upload_directory(path): + for f in sorted(os.listdir(path)): + subpath = os.path.join(path, f) + if os.path.isdir(subpath): + upload_directory(subpath) + else: + upload_file(subpath) -def do_upload(directory, start_date, end_date, dry_run=True): +def do_upload(path): global CONN CONN = S3.AWSAuthConnection(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY) - for subdir in sorted(os.listdir(directory)): - subdir_date = None - try: - subdir_date = parse_date(subdir) - except: - continue + start = time.time() + + if os.path.isdir(path): + upload_directory(path) + else: + upload_file(path) - - if start_date <= subdir_date <= end_date: - counter = 0 - print "uploading contents of %s" % subdir, - for filename in os.listdir(os.path.join(directory, subdir)): - path = os.path.join(directory, subdir, filename) - upload_file(path, dry_run=dry_run) - counter += 1 + s_took = (time.time() - start) + print "uploaded %s files in %0.0fs" % (COUNTER, s_took) - print 'handled %s files' % counter if __name__ == "__main__": - if not 4 <= len(sys.argv) <= 5: - print 'usage: s3upload.py directory startdate enddate [dryrun=true]' + if len(sys.argv) == 1: + print 'usage: s3upload.py path' sys.exit(1) - - directory = sys.argv[1] - start_date = sys.argv[2] - end_date = sys.argv[3] - dry_run = sys.argv[4] if len(sys.argv) == 5 else 'true' - - if dry_run.lower() == 'true': - print 'doing dry run' - dry_run = True - else: - dry_run = False - - try: - start_date = parse_date(start_date) - except: - print "invalid start date: %s" % start_date - sys.exit(1) - - try: - end_date = parse_date(end_date) - except: - print "invalid end date: %s" % end_date - sys.exit(1) - - do_upload(directory, start_date, end_date, dry_run) + args = sys.argv[1:] + for path in args: + do_upload(path) + print diff --git a/static/css/dump.css b/static/css/dump.css index 1449167..a68bd0c 100755 --- a/static/css/dump.css +++ b/static/css/dump.css @@ -281,7 +281,6 @@ border-left:1px solid #999;*/ position:absolute; width: 100%; height: 62px; - z-index: 1000; } #logoicons{ width:auto; @@ -336,6 +335,7 @@ img.chat-thumb { /* sharing */ .buttons{ cursor:pointer; + position: relative; display:inline-block; } @@ -349,14 +349,11 @@ display:inline-block; /*padding-left: 20px;*/ } img.thumb { -bottom:10px; +bottom:3px; image-rendering: -moz-crisp-edges; position:absolute; - - - - left:110px; + left:94px; display: inline-block; } @@ -511,6 +508,7 @@ a.msg-image-zoom img.zoom-icon:hover { width:100%; text-align: center; left: 0; + z-index: 1000; } #search-results-images{ @@ -650,6 +648,7 @@ color:#000; line-height:1.6; font-size:11px; word-spacing:15px; +z-index:6; height:28px; color: #000; @@ -1513,7 +1512,7 @@ color:000; { position:absolute; top:18px; - padding-top: 25px; + margin-top: 25px; } .logged-dump img{ @@ -1531,13 +1530,12 @@ color:000; .logged-dump { background-color:#fff; text-overflow: ellipsis-word; - padding: 18px 18px 6px 18px; + padding: 0px 18px 6px 18px; + margin-top: 18px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; text-transform: uppercase; margin-left:3px; - line-height:15px; - z-index:4; line-height:20px; text-align: left; } @@ -1932,7 +1930,6 @@ border:8px inset yellow; bottom:25px; top:50px; background-color:#fff; - z-index:5; } #login-container a:link{color:#000;} @@ -2032,14 +2029,16 @@ font-size:20px;font-weight:bold;word-spacing:-3px; font-size: 20px;left:-40px; font-weight: bold; line-height: 1em; - opacity: 1.0; + opacity: 1.0;z-index:3; padding: 25px 10px 40px; top: 8px; width: auto; -webkit-transform: rotate(-9deg); -moz-transform: rotate(-9deg); transform: rotate(-9deg); + } + login-container{z-index:777;} #bar7dis a#disregister:hover { background: #E9E74A; border-top: 10px solid #e1df47; diff --git a/static/form_login/front.css b/static/form_login/front.css index fee7e27..1bd0fae 100644 --- a/static/form_login/front.css +++ b/static/form_login/front.css @@ -9,7 +9,7 @@ top:-2; filter:alpha(opacity=90); -moz-opacity:0.9; -khtml-opacity: 0.9; - opacity: 0.9; + opacity: 0.9z-index:2; } @@ -95,6 +95,7 @@ a.signin.menu-open span {cursor:pointer; color:#789; font-size:11px; box-shadow: 3px 2px 2px #ccc; -webkit-box-shadow: 3px 2px 2px #ccc; +z-index:5000; -moz-box-shadow: 3px 2px 2px #ccc; filter: progid:DXImageTransform.Microsoft.dropShadow(color=#ccc, offX=3, offY=4, positive=true); } diff --git a/static/js/fullscreen.js b/static/js/fullscreen.js index 0f54102..808c138 100644 --- a/static/js/fullscreen.js +++ b/static/js/fullscreen.js @@ -40,11 +40,13 @@ function clickImage(img) { $('#fav-indicator').show(); Tag.add(msg_id, "favorite"); $(img).addClass("fullscreen-favorite"); + track('UI', 'FullscreenFav'); } else { delete FavedMap[msg_id]; $('#fav-indicator').hide(); Tag.rm(msg_id, "favorite"); $(img).removeClass("fullscreen-favorite"); + track('UI', 'FullscreenDeFav'); } } diff --git a/template/banner.st b/template/banner.st index 6083678..a4229f5 100644 --- a/template/banner.st +++ b/template/banner.st @@ -35,7 +35,7 @@
- @@ -86,7 +86,7 @@
$if(user_nick)$ - checkout dump.fm in full-screen - SUPPORT DUMP.FM! BUY SOME STICKERS!!- dis magazine new style options $else$ $endif$ + checkout dump.fm in full-screen - SUPPORT DUMP.FM! BUY SOME STICKERS!!$else$ $endif$ $if(isadmin)$ -NAUGHTY BOYS DELIGHT $endif$
@@ -109,7 +109,7 @@ -
+
previous diff --git a/template/footer.st b/template/footer.st index 6df573b..5987bd1 100644 --- a/template/footer.st +++ b/template/footer.st @@ -1,7 +1,7 @@ @2010 dump.fm -About Us -Help FAQ +About Us +Help FAQ Terms Privacy $google_analytics()$ diff --git a/template/messagepane.st b/template/messagepane.st index f925629..673c2ec 100644 --- a/template/messagepane.st +++ b/template/messagepane.st @@ -1,19 +1,46 @@
-
- show text? - +
+
+ show text? + +
+
+ show imgs? + +
+
+ clear screen + +
$if(user_nick)$ diff --git a/template/mini_profile.st b/template/mini_profile.st index b7c82cc..a991f6b 100644 --- a/template/mini_profile.st +++ b/template/mini_profile.st @@ -35,3 +35,11 @@


$endif$
+ \ No newline at end of file diff --git a/template/rooms/VIP.st b/template/rooms/VIP.st index 54bf72a..9281203 100644 --- a/template/rooms/VIP.st +++ b/template/rooms/VIP.st @@ -119,7 +119,7 @@ $footer()$
$preload()$ -
+

Welcome to the cool club

  • Rooms
  • diff --git a/template/share_buttons.st b/template/share_buttons.st index 83c387f..882ec07 100644 --- a/template/share_buttons.st +++ b/template/share_buttons.st @@ -7,6 +7,8 @@ $if(dump.favorited)$ $else$ - +
    + +
    $endif$ \ No newline at end of file -- cgit v1.2.3-70-g09d2