Skip to content

Commit

Permalink
Moving repo to github
Browse files Browse the repository at this point in the history
  • Loading branch information
ebidel committed Jul 30, 2012
1 parent 91d5fb0 commit bd6830f
Show file tree
Hide file tree
Showing 3,643 changed files with 434,758 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 8 additions & 0 deletions .gitignore
@@ -0,0 +1,8 @@
*~
*.pyc
*.DS_Store
_localized
_unlocalized

^studio\.html5rocks\.com\/samples\/.*\.zip

68 changes: 68 additions & 0 deletions Makefile
@@ -0,0 +1,68 @@
#
# `make messages`
#
LANGUAGES=en de fr ja pt ru zh es
MAC_DJANGO_ROOT=/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django_1_2
LINUX_DJANGO_ROOT=/usr/local/google/google_appengine/lib/django_1_2
IMPORT_ROOT=~/git/html5/google3/blaze-genfiles/devrel/html5rocks/po_files/server/tc_dump
ifeq "$(shell uname)" "Darwin"
DJANGO_ROOT=$(MAC_DJANGO_ROOT)
else
DJANGO_ROOT=$(LINUX_DJANGO_ROOT)
endif

define HEREDOC

HTML5Rocks Makefile
===================

Run `make messages` to regenerate the *.po files in `conf/locale/*`, and
`make compile` to recompile the *.mo files that gettext will use to
translate strings.

We're currently generating message files for English, German, Japanese,
Portuguese, Russian, Simplified Chinese, and Spanish. For additional
languages, edit the `LANGUAGES` variable in the Makefile.

endef
export HEREDOC

define EXPORT

Export to Translation Console
=============================

Hi! I've copied the newly generated English PO file to your local checkout
of the TC directory. Assuming that went well, head over to ~/git/html5/google3
and generate a CL, then drop a line to the TC team once it lands.

If you have questions, ask mkwst@google.com. :)
endef
export EXPORT

help:
@echo "$$HEREDOC"

yaml:
@python ./scripts/localizer/l7r.py --generate --yaml=database/tutorials.yaml

messages: yaml
@for locale in $(LANGUAGES) ; do \
PYTHONPATH=$(DJANGO_ROOT) $(DJANGO_ROOT)/django/bin/django-admin.py makemessages -l $$locale ; \
done
@python ./scripts/localizer/l7r.py --generate
@rm -f ./database/_tutorials.yaml.html

compile:
@PYTHONPATH=$(DJANGO_ROOT) $(DJANGO_ROOT)/django/bin/django-admin.py compilemessages
@python ./scripts/localizer/l7r.py --import

export: messages
@cp ./conf/locale/en/LC_MESSAGES/django.po ~/git/html5/google3/devrel/html5rocks/po_files/django.po
@echo "$$EXPORT"

import:
@for locale in $(LANGUAGES) ; do \
[ -r $(IMPORT_ROOT)/$$locale/django.po ] && cp $(IMPORT_ROOT)/$$locale/django.po ./conf/locale/$$locale/LC_MESSAGES/django.po ; \
done

35 changes: 35 additions & 0 deletions NOTICE
@@ -0,0 +1,35 @@
This project includes the html5lib library:
http://code.google.com/p/html5lib/

Which is licensed under the following license:
Copyright (c) 2006-2008 The Authors

Contributors:
James Graham - jg307@cam.ac.uk
Anne van Kesteren - annevankesteren@gmail.com
Lachlan Hunt - lachlan.hunt@lachy.id.au
Matt McDonald - kanashii@kanashii.ca
Sam Ruby - rubys@intertwingly.net
Ian Hickson (Google) - ian@hixie.ch
Thomas Broyer - t.broyer@ltgt.net
Jacques Distler - distler@golem.ph.utexas.edu
Henri Sivonen - hsivonen@iki.fi
The Mozilla Foundation (contributions from Henri Sivonen since 2008)

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
182 changes: 182 additions & 0 deletions app.yaml
@@ -0,0 +1,182 @@
application: html5rocks-hrd
version: master
runtime: python
api_version: 1

default_expiration: "30d"

handlers:

- url: /google75906d613a2a09ba.html
static_files: static/google75906d613a2a09ba.html
upload: static/google75906d613a2a09ba.html

# Web App Field Guide

- url: /webappfieldguide/(.*\.(appcache|manifest))
static_files: webappfieldguide/static/\1
mime_type: text/cache-manifest
upload: webappfieldguide/static/(.*\.(appcache|manifest))
expiration: "0s"

- url: /webappfieldguide/css
static_dir: webappfieldguide/static/css

- url: /webappfieldguide/img
static_dir: webappfieldguide/static/img

- url: /webappfieldguide/js
static_dir: webappfieldguide/static/js

- url: /webappfieldguide/index.html
static_files: webappfieldguide/index/index.html
upload: webappfieldguide/index/index.html

- url: /webappfieldguide/(.*\.(html|txt|xml|png|ico))
static_files: webappfieldguide/static/\1
upload: webappfieldguide/static/(.*\.(html|txt|xml|png|ico))

- url: /webappfieldguide
static_files: webappfieldguide/index/index.html
upload: webappfieldguide/index/index.html

- url: /webappfieldguide/(.*)
static_files: webappfieldguide/index/index.html
upload: webappfieldguide/index/index.html



# Server appropriate mimetype for certain static content.

#
# Video Formats
#
- url: /(\w{2,3})/(tutorials/casestudies)/(.+\.webm)
mime_type: audio/webm
static_files: content/\2/static/\3
upload: content/tutorials/(.*\.webm)

- url: /(\w{2,3})/(tutorials/[^/]+/[^/]+)/(.+\.webm)
mime_type: video/webm
static_files: content/\2/static/\3
upload: content/tutorials/(.*\.webm)

- url: /(\w{2,3})/(tutorials/casestudies)/(.+\.ogv)
mime_type: video/ogg
static_files: content/\2/static/\3
upload: content/tutorials/(.*\.ogv)

- url: /(\w{2,3})/(tutorials/[^/]+/[^/]+)/(.+\.ogv)
mime_type: video/ogg
static_files: content/\2/static/\3
upload: content/tutorials/(.*\.ogv)

- url: /(\w{2,3})/(tutorials/casestudies)/(.+\.mp4)
mime_type: audio/mp4
static_files: content/\2/static/\3
upload: content/tutorials/(.*\.mp4)

- url: /(\w{2,3})/(tutorials/[^/]+/[^/]+)/(.+\.mp4)
mime_type: video/mp4
static_files: content/\2/static/\3
upload: content/tutorials/(.*\.mp4)

#
# Audio Formats
#
- url: /(\w{2,3})/(tutorials/casestudies)/(.+\.(ogg|oga))
mime_type: audio/ogg
static_files: content/\2/static/\3
upload: content/tutorials/(.*\.(ogg|oga))

- url: /(\w{2,3})/(tutorials/[^/]+/[^/]+)/(.+\.(ogg|oga))
mime_type: audio/ogg
static_files: content/\2/static/\3
upload: content/tutorials/(.*\.(ogg|oga))

- url: /(\w{2,3})/(tutorials/casestudies)/(.+\.mp3)
mime_type: audio/mp3
static_files: content/\2/static/\3
upload: content/tutorials/(.*\.mp3)

- url: /(\w{2,3})/(tutorials/casestudies)/(.+\.wav)
mime_type: audio/wav
static_files: content/\2/static/\3
upload: content/tutorials/(.*\.wav)

- url: /(\w{2,3})/(tutorials/[^/]+/[^/]+)/(.+\.wav)
mime_type: audio/wav
static_files: content/\2/static/\3
upload: content/tutorials/(.*\.wav)

#
# Cache Manifests
#
- url: /(\w{2,3})/(tutorials/casestudies)/(.+\.(appcache|manifest))
expiration: "0s"
mime_type: text/cache-manifest
static_files: content/\2/static/\3
upload: content/tutorials/(.*\.(appcache|manifest))

- url: /(\w{2,3})/(tutorials/[^/]+/[^/]+)/(.+\.(appcache|manifest))
expiration: "0s"
mime_type: text/cache-manifest
static_files: content/\2/static/\3
upload: content/tutorials/(.*\.(appcache|manifest))

- url: /(\w{2,3})/(tutorials/[^/]+/[^/]+)/(.+\.crx)
static_files: content/tutorials/\1
mime_type: application/x-chrome-extension
upload: content/tutorials/(.*\.crx)

- url: /(.+\.(appcache|manifest))
expiration: "0s"
mime_type: text/cache-manifest
static_files: \1
upload: (.*\.(appcache|manifest))

#
# Everything else
#
- url: /(\w{2,3})/(tutorials/[^/]+/[^/]+)/(.+\.vtt)
mime_type: text/vtt
static_files: content/\2/static/\3
upload: content/tutorials/(.*\.vtt)

- url: /(\w{2,3})/(tutorials/casestudies)/(.+\.(gif|swf|mp3|css|js|png|jpeg|jpg|svg|ogm|fla|zip|pdf))
static_files: content/\2/static/\3
upload: content/tutorials/casestudies/(.*\.(gif|swf|mp3|css|js|png|jpeg|jpg|svg|ogm|fla|zip|pdf))

- url: /(\w{2,3})/(tutorials/[^/]+/[^/]+)/(.+\.(html|gif|swf|mp3|css|js|png|jpeg|jpg|svg|ogm|fla|zip|pdf))
static_files: content/\2/static/\3
upload: content/tutorials/(?!casestudies)(.*?/(?!index)[^/]*\.(html|gif|swf|mp3|css|js|png|jpeg|jpg|svg|ogm|fla|zip|pdf))

# Anything under /static will automatically be considered static.
- url: /static
static_dir: static

- url: /favicon.ico
static_files: static/favicon.ico
upload: static/favicon.ico

- url: /robots.txt
static_files: static/robots.txt
upload: static/robots.txt

- url: /database/live
script: main.py
login: required

- url: /database/.*
script: main.py
login: admin

- url: /admin/.*
script: $PYTHON_LIB/google/appengine/ext/admin
login: admin

- url: /echoserver
script: echo.py

- url: .*
script: main.py
36 changes: 36 additions & 0 deletions cache.appcache
@@ -0,0 +1,36 @@
CACHE MANIFEST

CACHE:
/favicon.ico

/static/js/app.min.js
/static/js/prettify.min.js
/static/js/profiles.min.js
/static/js/modernizr.custom.73722.js
/static/js/feature.min.js
/static/js/handlebars-1.min.js
/static/js/tutsapp.min.js
/static/js/persona.min.js
/static/js/search.min.js

/static/css/base.min.css
/static/css/mobile.min.css

/static/images/google_logo_small.png
/static/images/browser_logos.png
/static/images/identity/classes_32/badge-icon-sprite_32.png
/static/images/identity/HTML5_Badge_64.png

FALLBACK:
/static/images/ /static/images/identity/HTML5_Badge_32.png

NETWORK:
*
# Tue Jan 31 14:52:59 PST 2012
# Tue Jan 31 14:58:53 PST 2012
# Tue Jan 31 15:00:54 PST 2012
# Tue Jan 31 15:02:48 PST 2012
# Tue Jan 31 15:27:18 PST 2012
# Fri May 25 13:44:38 EST 2012
# Fri May 25 13:50:30 EST 2012
# Fri May 25 14:05:07 EST 2012
16 changes: 16 additions & 0 deletions common.py
@@ -0,0 +1,16 @@
import os

if 'SERVER_SOFTWARE' in os.environ:
PROD = not os.environ['SERVER_SOFTWARE'].startswith('Development')
else:
PROD = True

APP_VERSION = os.environ['CURRENT_VERSION_ID'].split('.')[0]

MEMCACHE_KEY_PREFIX = 'newscheme' #APP_VERSION
MAX_FETCH_LIMIT = 1000

# Users whitelisted to access certain sections the site.
WHITELISTED_USERS = [
'chrome.devrel@gmail.com'
]
Binary file added conf/locale/de/LC_MESSAGES/django.mo
Binary file not shown.

0 comments on commit bd6830f

Please sign in to comment.