Permalink
Browse files

change package name from mediacore to mediadrop and eliminate some of…

… the remaining references to MediaCore. Also the gettext domain is changed to mediadrop.

This results in a huge changeset but the idea is that nothing really changes for users who don't use any plugins.

This commit should eliminate all internal references to mediacore and there is very little left in the templates/JS code.
  • Loading branch information...
FelixSchwarz committed Nov 4, 2013
1 parent 4eaead2 commit 6d7f9d9dd27d6910c016bc943d7ee3e1d7a36988
Showing 1,304 changed files with 143,001 additions and 143,001 deletions.
@@ -14,6 +14,6 @@ test.ini
.pydev*
batch-scripts/closure/compiler/*
closure-library
mediacore/public/scripts/goog
mediadrop/public/scripts/goog
wiki
build
@@ -1,7 +1,7 @@
[main]
host = https://www.transifex.com

[mediacore.mediacore-ce-091p]
file_filter = mediacore/i18n/<lang>/LC_MESSAGES/mediacore.po
[mediadrop.mediadrop-ce-091p]
file_filter = mediadrop/i18n/<lang>/LC_MESSAGES/mediadrop.po
source_lang = en
source_file = mediacore/i18n/mediacore.pot
source_file = mediadrop/i18n/mediadrop.pot
@@ -7,13 +7,13 @@ by the Free Software Foundation, either version 3 of the License, or (at your
option) any later version.

Exception 1: Third-party client-side scripts. These files are located in the
"mediacore/public/scripts/third-party/" directory. Each of these scripts and
"mediadrop/public/scripts/third-party/" directory. Each of these scripts and
modules are distributed according to individual license terms, either described
in a comment at the top of the source code file, or in a LICENSE.txt file
inside the containing directory.

Exception 2: MediaDrop's own front-facing client-side scripts. This includes
all files in "mediacore/public/scripts/" and its subdirectories, excluding
all files in "mediadrop/public/scripts/" and its subdirectories, excluding
those described in Exception 1. These files are released under a more
permissive MIT style license, to allow for GPL-incompatible third-party modules
to be used in client-side scripts.
@@ -36,13 +36,13 @@ recursive-exclude closure-library *.*
recursive-exclude batch-scripts/closure *.*

# Include our deployment.ini template
include mediacore/config/deployment.ini_tmpl
include mediadrop/config/deployment.ini_tmpl

# Include all files in these directories
graft mediacore/migrations
graft mediacore/public
graft mediacore/templates
graft mediacore/i18n
graft mediadrop/migrations
graft mediadrop/public
graft mediadrop/templates
graft mediadrop/i18n

# Always ignore scrap files
recursive-exclude * *.pyc
@@ -1,6 +1,6 @@
[alembic]
# path to migration scripts
script_location = %(here)s/mediacore/migrations
script_location = %(here)s/mediadrop/migrations

# template used to generate migration files
# actually '%%(day).3d' is meaningless, we use it only as an ordering character
@@ -1,6 +1,6 @@
closure-library/closure/bin/build/closurebuilder.py \
--namespace=mcore \
--root=mediacore/public/scripts/mcore/ \
--root=mediadrop/public/scripts/mcore/ \
--root=closure-library/ \
--output_mode=compiled \
-c batch-scripts/closure/compiler/compiler.jar \
@@ -11,8 +11,8 @@ closure-library/closure/bin/build/closurebuilder.py \
--compiler_flags="--jscomp_warning=checkTypes" \
--compiler_flags="--jscomp_warning=accessControls" \
--compiler_flags="--jscomp_warning=missingProperties" \
--compiler_flags="--externs=mediacore/public/scripts/mcore/externs.js" \
> mediacore/public/scripts/mcore-compiled.js
--compiler_flags="--externs=mediadrop/public/scripts/mcore/externs.js" \
> mediadrop/public/scripts/mcore-compiled.js
#--compiler_flags="--jscomp_error=checkTypes" \
#--compiler_flags="--formatting=PRETTY_PRINT" \
#--compiler_flags="--formatting=PRINT_INPUT_DELIMITER" \
@@ -1,3 +1,3 @@
closure-library/closure/bin/build/depswriter.py \
--root_with_prefix="mediacore/public/scripts/mcore ../mcore" \
> mediacore/public/scripts/mcore/deps.js
--root_with_prefix="mediadrop/public/scripts/mcore ../mcore" \
> mediadrop/public/scripts/mcore/deps.js
@@ -13,15 +13,15 @@
files_and_dirs = [
'batch-scripts',
'deployment-scripts',
'mediacore',
'mediadrop',
'plugins',
'setup*',
]
exclude_files_and_dirs = [
'batch-scripts/find_todos.py',
'mediacore/public/scripts/third-party/',
'mediacore/lib/xhtml/htmlsanitizer.py',
'mediacore/public/scripts/mcore-compiled.js',
'mediadrop/public/scripts/third-party/',
'mediadrop/lib/xhtml/htmlsanitizer.py',
'mediadrop/public/scripts/mcore-compiled.js',
]

IN, MULT = 1, 2
@@ -3,8 +3,8 @@
# DESCRIPTION
# Strips colour profile information, and performs optimal data compression on
# all PNG images in the directories:
# mediacore/public/images
# mediacore/public/admin/images
# mediadrop/public/images
# mediadrop/public/admin/images
#
# DEPENDENCIES
# This script depends on the common unix utilities:
@@ -14,7 +14,7 @@
# http://pmt.sourceforge.net/pngcrush/

pushd `dirname $0` > /dev/null
pushd ../mediacore/public > /dev/null
pushd ../mediadrop/public > /dev/null
for x in `find images admin/images -iname "*.png"`;
do
pngcrush -brute -rem gAMA -rem cHRM -rem iCCP -rem sRGB "$x" "$x.crsh";
@@ -1,6 +1,6 @@
#!/usr/bin/env python2.5
# -*- coding: utf-8 -*-
from mediacore.lib.cli_commands import LoadAppCommand, load_app
from mediadrop.lib.cli_commands import LoadAppCommand, load_app

_script_name = "Batch Script Template"
_script_description = """Use this script as a model for creating new batch scripts for MediaDrop."""
@@ -6,7 +6,7 @@
#
# Copyright (c) 2012 Felix Schwarz (www.schwarz.eu)

from mediacore.lib.cli_commands import LoadAppCommand, load_app
from mediadrop.lib.cli_commands import LoadAppCommand, load_app

_script_name = "Database Upgrade Script for v0.9.x users with Facebook comments"
_script_description = """Use this script to preserve your existing Facebook
@@ -94,7 +94,7 @@ def main(parser, options, args):
app_secret = options.app_secret
fb = FacebookAPI(app_id, app_secret)

from mediacore.model import DBSession, Media
from mediadrop.model import DBSession, Media
# eager loading of 'meta' to speed up later check.
all_media = Media.query.options(joinedload('_meta')).all()

@@ -18,8 +18,8 @@ RewriteRule ^appearance/(.*) data/appearance/$1 [L]
RewriteRule ^(admin/)?(styles|images|scripts)/(.*)$ public/$1$2/$3 [L]

# Create rewrite rules for pointing MediaDrop requests to fastcgi script
RewriteRule ^mediacore\.fcgi(/.*)$ - [L]
# If the file requested doesn't exist on the filesystem, redirect to mediacore.fcgi
RewriteRule ^mediadrop.fcgi(/.*)$ - [L]
# If the file requested doesn't exist on the filesystem, redirect to mediadrop.fcgi
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ mediacore.fcgi/$1 [L]
RewriteRule ^(.*)$ mediadrop.fcgi/$1 [L]

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,21 @@
#!/path/to/venv/bin/python
python_egg_cache = '/path/to/data/python-egg-cache'
deployment_config = '/path/to/deployment.ini'
temp_dir = '/path/to/data/tmp'

# NOTE: Before running MediaDrop, you will need to update the four paths
# above to point to the appropriate locations for your installation.

import os
os.environ['PYTHON_EGG_CACHE'] = python_egg_cache
os.environ['TMPDIR'] = temp_dir

if __name__ == '__main__':
from paste.script.util.logging_config import fileConfig
fileConfig(deployment_config)

from paste.deploy import loadapp
app = loadapp('config:'+deployment_config)

from flup.server.fcgi import WSGIServer
WSGIServer(app).run()
@@ -16,20 +16,20 @@ WSGIDaemonProcess mcore \

WSGIProcessGroup mcore

# Intercept all requests to /my_media/* and pass them to mediacore.wsgi
WSGIScriptAlias /my_media /path/to/mediacore.wsgi
# Intercept all requests to /my_media/* and pass them to mediadrop.wsgi
WSGIScriptAlias /my_media /path/to/mediadrop.wsgi

# Create an exception for media and podcast image from your data directory
AliasMatch /my_media/images/(media|podcasts)(.*) /path/to/data/images/$1$2

# Create an exception for all static mediacore content
AliasMatch /my_media/(admin/)?(images|scripts|styles)(.*) /path/to/mediacore_install/mediacore/public/$1$2$3
# Create an exception for all static MediaDrop content
AliasMatch /my_media/(admin/)?(images|scripts|styles)(.*) /path/to/mediadrop_install/mediadrop/public/$1$2$3

# Create an exception for your custom appearance css and images
Alias /my_media/appearance /path/to/data/appearance

# Make all the static content accessible
<Directory /path/to/mediacore_install/mediacore/public/*>
<Directory /path/to/mediadrop_install/mediadrop/public/*>
Order allow,deny
Allow from all
Options -Indexes

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,16 @@
deployment_config = '/path/to/deployment.ini'
temp_dir = '/path/to/data/tmp'

# NOTE: Before running MediaDrop, you will need to update the two paths
# above to point to the appropriate locations for your installation.

import os
os.environ['TMPDIR'] = temp_dir

if __name__.startswith('_mod_wsgi_'):
# Set up logging under mod_wsgi
from paste.script.util.logging_config import fileConfig
fileConfig(deployment_config)
# Load the app!
from paste.deploy import loadapp
application = loadapp('config:'+deployment_config)

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,15 @@
deployment_config = '/path/to/deployment.ini'
temp_dir = '/path/to/data/tmp'

# NOTE: Before running MediaDrop, you will need to update the two paths
# above to point to the appropriate locations for your installation.

import os
os.environ['TMPDIR'] = temp_dir

# Set up logging under mod_wsgi
from paste.script.util.logging_config import fileConfig
fileConfig(deployment_config)
# Load the app!
from paste.deploy import loadapp
application = loadapp('config:'+deployment_config)
@@ -99,7 +99,7 @@ use = egg:MediaCore
full_stack = true
static_files = true
app_instance_uuid = {2673572c-6fb8-405e-89ed-00e2d4192faa}
beaker.session.key = mediacore
beaker.session.key = mediadrop

# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
# Debug mode will enable the interactive debugging tool, allowing ANYONE to
@@ -138,7 +138,7 @@ qualname = routes.middleware
[logger_mediadrop]
level = INFO
handlers =
qualname = mediacore
qualname = mediadrop

[logger_sqlalchemy]
level = WARN
@@ -1,4 +1,4 @@
import mediacore
import mediadrop

def omit_sqlalchemy_descriptors(app, what, name, obj, skip, options):
if obj.__doc__ == 'Public-facing descriptor, placed in the mapped class dictionary.':
@@ -2,7 +2,7 @@
Sphinx autodoc extension that reads @expose decorator in controllers
"""
import mediacore
import mediadrop

def setup(app):
app.connect('autodoc-process-docstring', add_expose_info)
@@ -19,13 +19,13 @@
sys.path.append(os.path.abspath('../'))
sys.path.append(os.path.abspath('.'))

import mediacore
import mediadrop


# -- Environment Setup -----------------------------------------------------
# We need a proper request environment to be able to properly import
# controllers and forms for the sake of autodoc.
from mediacore.lib.test import fake_request, setup_environment_and_database
from mediadrop.lib.test import fake_request, setup_environment_and_database

pylons_config = setup_environment_and_database()
request = fake_request(pylons_config)
@@ -66,9 +66,9 @@
# built documents.
#
# The short X.Y version.
version = mediacore.__version__
version = mediadrop.__version__
# The full version, including alpha/beta/rc tags.
release = mediacore.__version__
release = mediadrop.__version__

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -23,7 +23,7 @@ installed, try calling

.. sourcecode:: python

mediacore.ipython()()
mediadrop.ipython()()

at some point in your code; it'll act as a breakpoint and open up an IPython
shell with the local scope for you to play with.
Oops, something went wrong.

0 comments on commit 6d7f9d9

Please sign in to comment.