diff options
32 files changed, 357 insertions, 623 deletions
@@ -8,19 +8,18 @@ What is GNU MediaGoblin? * Initially, a place to store all your photos that’s as awesome as, if not more awesome than, existing network services (Flickr, SmugMug, Picasa, etc) -* Later, a place for all sorts of media, such as video, music, etc hosting. -* Federated with OStatus! * Customizable! * A place for people to collaborate and show off original and derived - creations. Free, as in freedom. We’re a GNU project in the making, - afterall. + creations. Free, as in freedom. We’re a GNU project after all. +* Later, a place for all sorts of media, such as video, music, etc hosting. +* Later, federated with OStatus! Is it ready for me to use? ========================== -Not yet! We're working on it and we hope to have a usable system by -September / October 2011. +Yes! But with caveats. The software is usable and there are instances +running, but it's still in its early stages. Can I help/hang out/participate/whisper sweet nothings in your ear? @@ -33,9 +32,9 @@ hang out, see `our Join page <http://mediagoblin.org/join/>`_ Where is the documentation? =========================== -The beginnings of a user manual is located in the ``docs/`` directory -in HTML, Texinfo, and source (Restructured Text) forms. It's also -available online at http://docs.mediagoblin.org/ in HTML form. +The beginnings of a site administration manual is located in the ``docs/`` +directory in HTML, Texinfo, and source (Restructured Text) forms. It's +also available online at http://docs.mediagoblin.org/ in HTML form. Contributor/developer documentation as well as documentation on the project processes and infrastructure is located on diff --git a/docs/source/_templates/mg_theme/layout.html b/docs/source/_templates/mg_theme/layout.html deleted file mode 100644 index eccda14b..00000000 --- a/docs/source/_templates/mg_theme/layout.html +++ /dev/null @@ -1,39 +0,0 @@ -{# - default/layout.html - ~~~~~~~~~~~~~~~~~~~ - - Sphinx layout template for the default theme. - - :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -#} -{% extends "basic/layout.html" %} - -{% if theme_collapsiblesidebar|tobool %} -{% set script_files = script_files + ['_static/sidebar.js'] %} -{% endif %} - -{%- block footer %} - <div class="footer"> - <div> - {% trans path=pathto('copyright'), copyright=copyright|e %}© <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %} - {%- if last_updated %} - {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %} - {%- endif %} - {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %} - </div> -<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br /><span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/Text" property="dc:title" rel="dc:type">{{ shorttitle|e }}</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://bluesock.org/~willg/" property="cc:attributionName" rel="cc:attributionURL">Will Kahn-Greene</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.<br /> - </div> - -<script type="text/javascript"> - var _gaq = _gaq || []; - _gaq.push(['_setAccount', 'UA-163840-8']); - _gaq.push(['_trackPageview']); - - (function() { - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); - })(); -</script> -{%- endblock %} diff --git a/docs/source/_templates/mg_theme/static/default.css_t b/docs/source/_templates/mg_theme/static/default.css_t deleted file mode 100644 index f200a0fe..00000000 --- a/docs/source/_templates/mg_theme/static/default.css_t +++ /dev/null @@ -1,299 +0,0 @@ -/* - * default.css_t - * ~~~~~~~~~~~~~ - * - * Sphinx stylesheet -- default theme. - * - * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -body { - font-family: {{ theme_bodyfont }}; - font-size: 100%; - background-color: {{ theme_footerbgcolor }}; - color: #000; - margin: 0; - padding: 0; -} - -div.document { - background-color: {{ theme_sidebarbgcolor }}; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 0 0 230px; -} - -div.body { - background-color: {{ theme_bgcolor }}; - color: {{ theme_textcolor }}; - padding: 0 20px 30px 20px; -} - -{%- if theme_rightsidebar|tobool %} -div.bodywrapper { - margin: 0 230px 0 0; -} -{%- endif %} - -div.footer { - color: {{ theme_footertextcolor }}; - width: 100%; - padding: 9px 0 9px 0; - text-align: center; - font-size: 75%; -} - -div.footer a { - color: {{ theme_footertextcolor }}; - text-decoration: underline; -} - -div.related { - background-color: {{ theme_relbarbgcolor }}; - line-height: 30px; - color: {{ theme_relbartextcolor }}; -} - -div.related a { - color: {{ theme_relbarlinkcolor }}; -} - -div.sphinxsidebar { - {%- if theme_stickysidebar|tobool %} - top: 30px; - bottom: 0; - margin: 0; - position: fixed; - overflow: auto; - height: auto; - {%- endif %} - {%- if theme_rightsidebar|tobool %} - float: right; - {%- if theme_stickysidebar|tobool %} - right: 0; - {%- endif %} - {%- endif %} -} - -{%- if theme_stickysidebar|tobool %} -/* this is nice, but it it leads to hidden headings when jumping - to an anchor */ -/* -div.related { - position: fixed; -} - -div.documentwrapper { - margin-top: 30px; -} -*/ -{%- endif %} - -div.sphinxsidebar h3 { - font-family: {{ theme_headfont }}; - color: {{ theme_sidebartextcolor }}; - font-size: 1.4em; - font-weight: normal; - margin: 0; - padding: 0; -} - -div.sphinxsidebar h3 a { - color: {{ theme_sidebartextcolor }}; -} - -div.sphinxsidebar h4 { - font-family: {{ theme_headfont }}; - color: {{ theme_sidebartextcolor }}; - font-size: 1.3em; - font-weight: normal; - margin: 5px 0 0 0; - padding: 0; -} - -div.sphinxsidebar p { - color: {{ theme_sidebartextcolor }}; -} - -div.sphinxsidebar p.topless { - margin: 5px 10px 10px 10px; -} - -div.sphinxsidebar ul { - margin: 10px; - padding: 0; - color: {{ theme_sidebartextcolor }}; -} - -div.sphinxsidebar a { - color: {{ theme_sidebarlinkcolor }}; -} - -div.sphinxsidebar input { - border: 1px solid {{ theme_sidebarlinkcolor }}; - font-family: sans-serif; - font-size: 1em; -} - - -/* -- hyperlink styles ------------------------------------------------------ */ - -a { - color: {{ theme_linkcolor }}; - text-decoration: none; -} - -a:visited { - color: {{ theme_visitedlinkcolor }}; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - -{% if theme_externalrefs|tobool %} -a.external { - text-decoration: none; - border-bottom: 1px dashed {{ theme_linkcolor }}; -} - -a.external:hover { - text-decoration: none; - border-bottom: none; -} -{% endif %} - -/* -- body styles ----------------------------------------------------------- */ - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - font-family: {{ theme_headfont }}; - background-color: {{ theme_headbgcolor }}; - font-weight: normal; - color: {{ theme_headtextcolor }}; - border-bottom: 1px solid #ccc; - margin: 20px -20px 10px -20px; - padding: 3px 0 3px 10px; -} - -div.body h1 { margin-top: 0; font-size: 200%; } -div.body h2 { font-size: 160%; } -div.body h3 { font-size: 140%; } -div.body h4 { font-size: 120%; } -div.body h5 { font-size: 110%; } -div.body h6 { font-size: 100%; } - -a.headerlink { - color: {{ theme_headlinkcolor }}; - font-size: 0.8em; - padding: 0 4px 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - background-color: {{ theme_headlinkcolor }}; - color: white; -} - -div.body p, div.body dd, div.body li { - text-align: justify; - line-height: 130%; -} - -div.admonition p.admonition-title + p { - display: inline; -} - -div.admonition p { - margin-bottom: 5px; -} - -div.admonition pre { - margin-bottom: 5px; -} - -div.admonition ul, div.admonition ol { - margin-bottom: 5px; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.topic { - background-color: #eee; -} - -div.warning { - background-color: #ffe4e4; - border: 1px solid #f66; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -pre { - padding: 5px; - background-color: {{ theme_codebgcolor }}; - color: {{ theme_codetextcolor }}; - line-height: 120%; - border: 1px solid #ac9; - border-left: none; - border-right: none; -} - -tt { - background-color: #ecf0f3; - padding: 0 1px 0 1px; - font-size: 0.95em; -} - -th { - background-color: #ede; -} - -.warning tt { - background: #efc2c2; -} - -.note tt { - background: #d6d6d6; -} - -.viewcode-back { - font-family: {{ theme_bodyfont }}; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} diff --git a/docs/source/_templates/mg_theme/theme.conf b/docs/source/_templates/mg_theme/theme.conf deleted file mode 100644 index 49442e3b..00000000 --- a/docs/source/_templates/mg_theme/theme.conf +++ /dev/null @@ -1,31 +0,0 @@ -[theme] -inherit = basic -stylesheet = default.css -pygments_style = sphinx - -[options] -rightsidebar = false -stickysidebar = false -collapsiblesidebar = false -externalrefs = false - -footerbgcolor = #b11818 -footertextcolor = #ffffff -sidebarbgcolor = #6a0000 -sidebartextcolor = #ffffff -sidebarlinkcolor = #98dbcc -relbarbgcolor = #b11818 -relbartextcolor = #ffffff -relbarlinkcolor = #ffffff -bgcolor = #ffffff -textcolor = #000000 -headbgcolor = #fdeded -headtextcolor = #20435c -headlinkcolor = #c60f0f -linkcolor = #355f7c -visitedlinkcolor = #355f7c -codebgcolor = #eeffcc -codetextcolor = #333333 - -bodyfont = sans-serif -headfont = 'Trebuchet MS', sans-serif diff --git a/docs/source/conf.py b/docs/source/conf.py index eee9900f..dce254a1 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -28,7 +28,7 @@ sys.path.insert(0, os.path.abspath('.')) extensions = ["mgext.youcanhelp"] # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = ['source/_templates'] # The suffix of source filenames. source_suffix = '.rst' @@ -48,9 +48,9 @@ copyright = u'2011, Free Software Foundation, Inc and contributors' # built documents. # # The short X.Y version. -version = '0.1.0' +version = '0.3.0' # The full version, including alpha/beta/rc tags. -release = '0.1.0' +release = '0.3.0-dev' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -91,7 +91,8 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +# html_theme = 'default' +html_theme = 'mg' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -99,7 +100,7 @@ html_theme = 'default' #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] +html_theme_path = ['themes'] # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation". diff --git a/docs/source/configuration.rst b/docs/source/configuration.rst index 093f492c..1e22ad2d 100644 --- a/docs/source/configuration.rst +++ b/docs/source/configuration.rst @@ -19,13 +19,13 @@ mediagoblin.ini tweak settings for MediaGoblin, you'll usually tweak them here. paste.ini - This is primarily a server configuration file, on the python side - (specifically, on the wsgi side, via `paste deploy + This is primarily a server configuration file, on the Python side + (specifically, on the WSGI side, via `paste deploy <http://pythonpaste.org/deploy/>`_ / `paste script <http://pythonpaste.org/script/>`_). It also sets up some middleware that you can mostly ignore, except to configure sessions... more on that later. If you are adding a different - python server other than fastcgi / plain http, you might configure + Python server other than fastcgi / plain HTTP, you might configure it here. You probably won't need to change this file very much. @@ -47,19 +47,23 @@ Let's assume you're doing the virtualenv setup described elsewhere in this manual, and you need to make local tweaks to the config files. How do you do that? Let's see. -To make changes to mediagoblin.ini: +To make changes to mediagoblin.ini :: - cp mediagoblin.ini mediagoblin_local.ini + cp mediagoblin.ini mediagoblin_local.ini -To make changes to paste.ini: - cp paste.ini paste_local.ini +To make changes to paste.ini :: + + cp paste.ini paste_local.ini From here you should be able to make direct adjustments to the files, and most of the commands described elsewhere in this manual will "notice" your local config files and use those instead of the non-local version. -(Note that all commands provide a way to pass in a specific config -file also, usually by a -cf flag.) +.. note:: + + Note that all commands provide a way to pass in a specific config + file also, usually by a ``-cf`` flag. + Common changes ============== @@ -69,9 +73,9 @@ Enabling email notifications You'll almost certainly want to enable sending emails. By default, MediaGoblin doesn't really do this... for the sake of developer -convenience, it runs in "email debug mode". Change this: +convenience, it runs in "email debug mode". Change this:: - email_debug_mode = false + email_debug_mode = false You can (and should) change the "from" email address by setting ``email_sender_address``. @@ -82,21 +86,21 @@ If you have more custom SMTP settings, you also have the following options at your disposal, which are all optional, and do exactly what they sound like. - - email_smtp_host - - email_smtp_port - - email_smtp_user - - email_smtp_pass +- email_smtp_host +- email_smtp_port +- email_smtp_user +- email_smtp_pass All other configuration changes ------------------------------- -To be perfectly honest, there are quite a few options and I'm not -going to be able to get to documanting them all in time for 0.1.0. +To be perfectly honest, there are quite a few options and we haven't had +time to document them all So here's a cop-out section saying that if you get into trouble, hop -onto IRC and we'll help you out: +onto IRC and we'll help you out:: - #mediagoblin on irc.freenode.net + #mediagoblin on irc.freenode.net Celery ====== diff --git a/docs/source/deploying.rst b/docs/source/deploying.rst index 70b1a6af..4aded2e6 100644 --- a/docs/source/deploying.rst +++ b/docs/source/deploying.rst @@ -11,9 +11,11 @@ it simple with some assumptions and use a setup that combines mediagoblin + virtualenv + fastcgi + nginx on a .deb or .rpm based GNU/Linux distro. -Note: these tools are for administrators wanting to deploy a fresh -install. If instead you want to join in as a contributor, see our -`Hacking HOWTO <http://wiki.mediagoblin.org/HackingHowto>`_ instead. +.. note:: + + These tools are for site administrators wanting to deploy a fresh + install. If instead you want to join in as a contributor, see our + `Hacking HOWTO <http://wiki.mediagoblin.org/HackingHowto>`_ instead. Prepare System -------------- @@ -33,12 +35,15 @@ MediaGoblin has the following core dependencies: On a DEB-based system (e.g Debian, gNewSense, Trisquel, Ubuntu, and derivatives) issue the following command: :: - sudo apt-get install mongodb git-core python python-dev python-lxml python-imaging python-virtualenv + sudo apt-get install mongodb git-core python python-dev python-lxml \ + python-imaging python-virtualenv On a RPM-based system (e.g. Fedora, RedHat, and derivatives) issue the following command: :: - yum install mongodb-server python-paste-deploy python-paste-script git-core python python-devel python-lxml python-imaging python-virtualenv + yum install mongodb-server python-paste-deploy python-paste-script \ + git-core python python-devel python-lxml python-imaging \ + python-virtualenv Configure MongoDB ~~~~~~~~~~~~~~~~~ @@ -46,10 +51,11 @@ Configure MongoDB After installing MongoDB some preliminary database configuration may be necessary. -Ensure that MongoDB `journaling <http://www.mongodb.org/display/DOCS/Journaling>`_ -is enabled. Journaling is enabled by default in version 2.0 and later -64-bit MongoDB instances. Check your deployment, and consider enabling -journaling if you're running 32-bit systems or earlier version. +Ensure that MongoDB `journaling +<http://www.mongodb.org/display/DOCS/Journaling>`_ is enabled. Journaling +is enabled by default in version 2.0 and later 64-bit MongoDB instances. +Check your deployment, and consider enabling journaling if you're running +32-bit systems or earlier version. .. warning:: @@ -77,41 +83,42 @@ create "system account" or dedicated service user. Ensure that it is not possible to log in to your system with as this user. You should create a working directory for MediaGoblin. This document -assumes your local git repository will be located at ``/srv/mediagoblin.example.org/mediagoblin/`` -for this documentation. Substitute your prefer ed local deployment path -as needed. +assumes your local git repository will be located at +``/srv/mediagoblin.example.org/mediagoblin/`` for this documentation. +Substitute your prefer ed local deployment path as needed. This document assumes that all operations are performed as this user. To drop privileges to this user, run the following command: :: + su - [mediagoblin] - su - [mediagoblin]`` - -Where, "``[mediagoblin]`` is the username of the system user that will +Where, "``[mediagoblin]``" is the username of the system user that will run MediaGoblin. Install MediaGoblin and Virtualenv ---------------------------------- -As of |version|, MediaGoblin has a rapid development pace. As a result -the following instructions recommend installing from the ``master`` -branch of the git repository. Eventually production deployments will -want to transition to running from more consistent releases. +.. note:: + + As of |version|, MediaGoblin has a rapid development pace. As a result + the following instructions recommend installing from the ``master`` + branch of the git repository. Eventually production deployments will + want to transition to running from more consistent releases. Issue the following commands, to create and change the working -directory. Modify these commands to reflect your own environment: :: +directory. Modify these commands to reflect your own environment:: - mkdir -p /srv/mediagoblin.example.org/ - cd /srv/mediagoblin.example.org/ + mkdir -p /srv/mediagoblin.example.org/ + cd /srv/mediagoblin.example.org/ -Clone the MediaGoblin repository: :: +Clone the MediaGoblin repository:: - git clone git://gitorious.org/mediagoblin/mediagoblin.git + git clone git://gitorious.org/mediagoblin/mediagoblin.git -And setup the in-package virtualenv: :: +And setup the in-package virtualenv:: - cd mediagoblin - virtualenv . && ./bin/python setup.py develop + cd mediagoblin + virtualenv . && ./bin/python setup.py develop .. note:: @@ -127,16 +134,16 @@ more reliable and considerably easier to configure and illustrate. If you're familiar with Python packaging you may consider deploying with your preferred the method. -Assuming you are going to deploy with fastcgi, you should also install -flup: :: +Assuming you are going to deploy with FastCGI, you should also install +flup:: - ./bin/easy_install flup + ./bin/easy_install flup This concludes the initial configuration of the development environment. In the future, if at any point you want update your -codebase, you should also run: :: +codebase, you should also run:: - ./bin/python setup.py develop --upgrade && ./bin/gmg migrate. + ./bin/python setup.py develop --upgrade && ./bin/gmg migrate. Deploy MediaGoblin Services --------------------------- @@ -145,9 +152,9 @@ Test the Server ~~~~~~~~~~~~~~~ At this point MediaGoblin should be properly installed. You can -test the deployment with the following command: :: +test the deployment with the following command:: - ./lazyserver.sh --server-name=broadcast + ./lazyserver.sh --server-name=broadcast You should be able to connect to the machine on port 6543 in your browser to confirm that the service is operable. @@ -156,7 +163,7 @@ Connect the Webserver to MediaGoblin with FastCGI ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This section describes how to configure MediaGoblin to work via -fastcgi. Our configuration example will use nginx, however, you may +FastCGI. Our configuration example will use nginx, however, you may use any webserver of your choice as long as it supports the FastCGI protocol. If you do not already have a web server, consider nginx, as the configuration files may be more clear than the @@ -166,75 +173,78 @@ Create a configuration file at ``/srv/mediagoblin.example.org/nginx.conf`` and create a symbolic link into a directory that will be included in your ``nginx`` configuration (e.g. "``/etc/nginx/sites-enabled`` or ``/etc/nginx/conf.d``) with -one of the following commands (as the root user:) :: +one of the following commands (as the root user):: - ln -s /srv/mediagoblin.example.org/nginx.conf /etc/nginx/conf.d/ - ln -s /srv/mediagoblin.example.org/nginx.conf /etc/nginx/sites-enabled/ + ln -s /srv/mediagoblin.example.org/nginx.conf /etc/nginx/conf.d/ + ln -s /srv/mediagoblin.example.org/nginx.conf /etc/nginx/sites-enabled/ Modify these commands and locations depending on your preferences and the existing configuration of your nginx instance. The contents of -this ``nginx.conf`` file should be modeled on the following: :: - - server { - ################################################# - # Stock useful config options, but ignore them :) - ################################################# - include /etc/nginx/mime.types; - - autoindex off; - default_type application/octet-stream; - sendfile on; - - # Gzip - gzip on; - gzip_min_length 1024; - gzip_buffers 4 32k; - gzip_types text/plain text/html application/x-javascript text/javascript text/xml text/css; - - ##################################### - # Mounting MediaGoblin stuff - # This is the section you should read - ##################################### - - server_name mediagoblin.example.org www.mediagoblin.example.org; - access_log /var/log/nginx/mediagoblin.example.access.log; - error_log /var/log/nginx/mediagoblin.example.error.log; - - # MediaGoblin's stock static files: CSS, JS, etc. - location /mgoblin_static/ { - alias /srv/mediagoblin.example.org/mediagoblin/mediagoblin/static/; - } - - # Instance specific media: - location /mgoblin_media/ { - alias /srv/mediagoblin.example.org/mediagoblin/user_dev/media/public/; - } - - # Mounting MediaGoblin itself via fastcgi. - location / { - fastcgi_pass 127.0.0.1:26543; - include /etc/nginx/fastcgi_params; - - # our understanding vs nginx's handling of script_name vs - # path_info don't match :) - fastcgi_param PATH_INFO $fastcgi_script_name; - fastcgi_param SCRIPT_NAME ""; - } +this ``nginx.conf`` file should be modeled on the following:: + + server { + ################################################# + # Stock useful config options, but ignore them :) + ################################################# + include /etc/nginx/mime.types; + + autoindex off; + default_type application/octet-stream; + sendfile on; + + # Gzip + gzip on; + gzip_min_length 1024; + gzip_buffers 4 32k; + gzip_types text/plain text/html application/x-javascript text/javascript text/xml text/css; + + ##################################### + # Mounting MediaGoblin stuff + # This is the section you should read + ##################################### + + # Change this to update the upload size limit for your users + client_max_body_size 8m; + + server_name mediagoblin.example.org www.mediagoblin.example.org; + access_log /var/log/nginx/mediagoblin.example.access.log; + error_log /var/log/nginx/mediagoblin.example.error.log; + + # MediaGoblin's stock static files: CSS, JS, etc. + location /mgoblin_static/ { + alias /srv/mediagoblin.example.org/mediagoblin/mediagoblin/static/; + } + + # Instance specific media: + location /mgoblin_media/ { + alias /srv/mediagoblin.example.org/mediagoblin/user_dev/media/public/; + } + + # Mounting MediaGoblin itself via FastCGI. + location / { + fastcgi_pass 127.0.0.1:26543; + include /etc/nginx/fastcgi_params; + + # our understanding vs nginx's handling of script_name vs + # path_info don't match :) + fastcgi_param PATH_INFO $fastcgi_script_name; + fastcgi_param SCRIPT_NAME ""; } + } Now, nginx instance is configured to serve the MediaGoblin application. Perform a quick test to ensure that this configuration works. Restart nginx so it picks up your changes, with a command that -resembles one of the following (as the root user:) :: +resembles one of the following (as the root user):: - sudo /etc/init.d/nginx restart - sudo /etc/rc.d/nginx restart + sudo /etc/init.d/nginx restart + sudo /etc/rc.d/nginx restart Now start MediaGoblin. Use the following command sequence as an -example: :: +example:: - cd /srv/mediagoblin.example.org/mediagoblin/ - ./lazyserver.sh --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543 + cd /srv/mediagoblin.example.org/mediagoblin/ + ./lazyserver.sh --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543 Visit the site you've set up in your browser by visiting <http://mediagobilin.example.org>. You should see MediaGoblin! diff --git a/docs/source/foreword.rst b/docs/source/foreword.rst index 835a7e7a..aa27647f 100644 --- a/docs/source/foreword.rst +++ b/docs/source/foreword.rst @@ -5,14 +5,14 @@ Foreword About the MediaGoblin Manual ============================ -This is the user manual for MediaGoblin. It covers how to set up and -configure MediaGoblin and the kind of information that someone running -MediaGoblin would need to know. +This is the site administrator manual for MediaGoblin. It covers how +to set up and configure MediaGoblin and the kind of information that +someone running MediaGoblin would need to know. We have other documentation at: * http://mediagoblin.org/join/ for general "join us" information -* http://wiki.mediagoblin.org/ for our contributor-focused wiki +* http://wiki.mediagoblin.org/ for our contributor/developer-focused wiki Improving the MediaGobiin Manual diff --git a/docs/source/index.rst b/docs/source/index.rst index 6ffe0974..f9c9285d 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -16,6 +16,7 @@ Table of Contents: deploying production-deployments configuration + media-types help theming codebase diff --git a/docs/source/media-types.rst b/docs/source/media-types.rst new file mode 100644 index 00000000..76478143 --- /dev/null +++ b/docs/source/media-types.rst @@ -0,0 +1,34 @@ +.. _media-types-chapter: + +==================== +Enabling Media Types +==================== + +In the future, there will be all sorts of media types you can enable, +but in the meanwhile there's only one additional media type: video. + +First, you should probably read ":doc:`configuration`" to make sure +you know how to modify the mediagoblin config file. + +Video +===== + +To enable video, first install gstreamer and the python-gstreamer +bindings (as well as whatever gstremaer extensions you want, +good/bad/ugly). On Debianoid systems:: + + sudo apt-get install python-gst0.10 + +Next, modify (and possibly copy over from ``mediagoblin.ini``) your +``mediagoblin_local.ini``. Uncomment this line in the ``[mediagoblin]`` +section:: + + media_types = mediagoblin.media_types.image, mediagoblin.media_types.video + +Now you should be able to submit videos, and mediagoblin should +transcode them. + +Note that you almost certainly want to separate Celery from the normal +paste process or your users will probably find that their connections +time out as the video transcodes. To set that up, check out the +":doc:`production-deployments`" section of this manual. diff --git a/docs/source/production-deployments.rst b/docs/source/production-deployments.rst index 7bf26169..ef0bcad6 100644 --- a/docs/source/production-deployments.rst +++ b/docs/source/production-deployments.rst @@ -4,8 +4,7 @@ Considerations for Production Deployments This document contains a number of suggestions for deploying MediaGoblin in actual production environments. Consider -":doc:`deploying`" for a basic overview of how to deploy Media -Goblin. +":doc:`deploying`" for a basic overview of how to deploy MediaGoblin. Deploy with Paste ----------------- @@ -17,11 +16,11 @@ process. Use the following command as the basis for such a script: :: - CELERY_ALWAYS_EAGER=true \ - /srv/mediagoblin.example.org/mediagoblin/bin/paster serve \ - /srv/mediagoblin.example.org/mediagoblin/paste.ini \ - --pid-file=/var/run/mediagoblin.pid \ - --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543 \ + CELERY_ALWAYS_EAGER=true \ + /srv/mediagoblin.example.org/mediagoblin/bin/paster serve \ + /srv/mediagoblin.example.org/mediagoblin/paste.ini \ + --pid-file=/var/run/mediagoblin.pid \ + --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543 The above configuration places MediaGoblin in "always eager" mode with Celery, this means that submissions of content will be processed @@ -31,11 +30,11 @@ the user will be able to immediately return to the MediaGoblin site while processing is ongoing. In these cases, use the following command as the basis for your script: :: - CELERY_ALWAYS_EAGER=false \ - /srv/mediagoblin.example.org/mediagoblin/bin/paster serve \ - /srv/mediagoblin.example.org/mediagoblin/paste.ini \ - --pid-file=/var/run/mediagoblin.pid \ - --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543 \ + CELERY_ALWAYS_EAGER=false \ + /srv/mediagoblin.example.org/mediagoblin/bin/paster serve \ + /srv/mediagoblin.example.org/mediagoblin/paste.ini \ + --pid-file=/var/run/mediagoblin.pid \ + --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543 Separate Celery --------------- @@ -57,9 +56,9 @@ such as "ASCII art" or icon sharing, you will need to run ``celeryd`` as a separate process. Build an :ref:`init script <init-script>` around the following -command. +command:: - CELERY_CONFIG_MODULE=mediagoblin.init.celery.from_celery ./bin/celeryd + CELERY_CONFIG_MODULE=mediagoblin.init.celery.from_celery ./bin/celeryd Modify your existing MediaGoblin and application init scripts, if necessary, to prevent them from starting their own ``celeryd`` @@ -77,6 +76,6 @@ distribution/operating system. In the future, MediaGoblin will provide example scripts as examples. .. TODO insert init script here -.. TODO are additional concernts ? +.. TODO are additional concerns ? .. Other Concerns .. -------------- diff --git a/docs/source/themes/mg/layout.html b/docs/source/themes/mg/layout.html new file mode 100644 index 00000000..891ed64c --- /dev/null +++ b/docs/source/themes/mg/layout.html @@ -0,0 +1,29 @@ +{# + default/layout.html + ~~~~~~~~~~~~~~~~~~~ + + Sphinx layout template for the default theme. + + :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. + :license: BSD, see LICENSE for details. +#} +{% extends "basic/layout.html" %} + +{% if theme_collapsiblesidebar|tobool %} +{% set script_files = script_files + ['_static/sidebar.js'] %} +{% endif %} + +{%- block footer %} + <div class="footer"> + <div> + +MediaGoblin documentation released into the public domain via <a href="http://creativecommons.org/publicdomain/zero/1.0/">CC0</a>. + + {%- if last_updated %} + {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %} + {%- endif %} + + {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %} + </div> + </div> +{%- endblock %} diff --git a/docs/source/themes/mg/theme.conf b/docs/source/themes/mg/theme.conf new file mode 100644 index 00000000..f4fbd8cc --- /dev/null +++ b/docs/source/themes/mg/theme.conf @@ -0,0 +1,5 @@ +[theme] +inherit = default +stylesheet = default.css +pygments_style = sphinx + diff --git a/lazyserver.sh b/lazyserver.sh index 63818a6a..4ca073b5 100755 --- a/lazyserver.sh +++ b/lazyserver.sh @@ -16,6 +16,10 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +# +# This runs Mediagoblin using Paste with Celery set to always eager mode. +# + if [ "$1" = "-h" ] then echo "$0 [-h] [-c paste.ini] [ARGS_to_paster ...]" diff --git a/mediagoblin/_version.py b/mediagoblin/_version.py index d6c6e20d..5e3f4e5a 100644 --- a/mediagoblin/_version.py +++ b/mediagoblin/_version.py @@ -14,4 +14,4 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -__version__ = "0.1.0" +__version__ = "0.3.0-dev" diff --git a/mediagoblin/config_spec.ini b/mediagoblin/config_spec.ini index 13ce925e..eb22bc1b 100644 --- a/mediagoblin/config_spec.ini +++ b/mediagoblin/config_spec.ini @@ -61,6 +61,11 @@ storage_class = string(default="mediagoblin.storage.filestorage:BasicFileStorage base_dir = string(default="%(here)s/user_dev/media/queue") +# Should we keep the original file? +[media_type:mediagoblin.media_types.video] +keep_original = boolean(default=False) + + [beaker.cache] type = string(default="file") data_dir = string(default="%(here)s/user_dev/beaker/cache/data") diff --git a/mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.mo b/mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.mo Binary files differindex f7562eaa..a01abf9c 100644 --- a/mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.mo +++ b/mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.mo diff --git a/mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.po b/mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.po index 7d7e0ee9..e2765357 100644 --- a/mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.po +++ b/mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.po @@ -17,8 +17,8 @@ msgstr "" "Project-Id-Version: GNU MediaGoblin\n" "Report-Msgid-Bugs-To: http://bugs.foocorp.net/projects/mediagoblin/issues\n" "POT-Creation-Date: 2011-12-04 10:24-0600\n" -"PO-Revision-Date: 2011-12-04 16:26+0000\n" -"Last-Translator: elrond <elrond+mediagoblin.org@samba-tng.org>\n" +"PO-Revision-Date: 2011-12-06 21:16+0000\n" +"Last-Translator: gandaro <jakob.kramer@gmx.de>\n" "Language-Team: German (http://www.transifex.net/projects/p/mediagoblin/team/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -185,7 +185,7 @@ msgstr "Yeeeaaah! Geschafft!" #: mediagoblin/submit/views.py:133 msgid "Invalid file type." -msgstr "" +msgstr "Ungültiger Dateityp." #: mediagoblin/templates/mediagoblin/404.html:21 msgid "Oops!" @@ -284,7 +284,7 @@ msgstr "Bestätigen" #: mediagoblin/templates/mediagoblin/auth/forgot_password.html:27 msgid "Recover password" -msgstr "" +msgstr "Passwort wiederherstellen" #: mediagoblin/templates/mediagoblin/auth/forgot_password.html:30 msgid "Send instructions" @@ -409,7 +409,7 @@ msgstr "<a href=\"%(user_url)s\">%(username)s</a>s Medien" #: mediagoblin/templates/mediagoblin/user_pages/media.html:57 #, python-format msgid "By <a href=\"%(user_url)s\">%(username)s</a> on %(date)s" -msgstr "" +msgstr "Von <a href=\"%(user_url)s\">%(username)s</a> am %(date)s" #: mediagoblin/templates/mediagoblin/user_pages/media.html:67 msgid "Post a comment" diff --git a/mediagoblin/i18n/eo/LC_MESSAGES/mediagoblin.mo b/mediagoblin/i18n/eo/LC_MESSAGES/mediagoblin.mo Binary files differindex 8f37922f..3e0a84bf 100644 --- a/mediagoblin/i18n/eo/LC_MESSAGES/mediagoblin.mo +++ b/mediagoblin/i18n/eo/LC_MESSAGES/mediagoblin.mo diff --git a/mediagoblin/i18n/eo/LC_MESSAGES/mediagoblin.po b/mediagoblin/i18n/eo/LC_MESSAGES/mediagoblin.po index e5c6356e..c3c29b89 100644 --- a/mediagoblin/i18n/eo/LC_MESSAGES/mediagoblin.po +++ b/mediagoblin/i18n/eo/LC_MESSAGES/mediagoblin.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: GNU MediaGoblin\n" "Report-Msgid-Bugs-To: http://bugs.foocorp.net/projects/mediagoblin/issues\n" "POT-Creation-Date: 2011-12-04 10:24-0600\n" -"PO-Revision-Date: 2011-12-04 19:15+0000\n" +"PO-Revision-Date: 2011-12-06 20:04+0000\n" "Last-Translator: aleksejrs <deletesoftware@yandex.ru>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "MIME-Version: 1.0\n" @@ -252,7 +252,7 @@ msgid "" "To add your own media, place comments, save your favourites and more, you " "can log in with your MediaGoblin account." msgstr "" -"Por aldoni viajn proprajn dosierojn, fari liston de plej plaĉantaj por vi, " +"Por aldoni viajn proprajn dosierojn, fari al vi liston de la plej plaĉaj, " "ks, vi povas ensaluti je via MediaGoblina konto." #: mediagoblin/templates/mediagoblin/root.html:31 @@ -272,7 +272,7 @@ msgstr "" #: mediagoblin/templates/mediagoblin/root.html:44 msgid "Most recent media" -msgstr "Plej nove aldonitaj dosieroj" +msgstr "Laste aldonitaj dosieroj" #: mediagoblin/templates/mediagoblin/auth/change_fp.html:29 msgid "Enter your new password" diff --git a/mediagoblin/i18n/es/LC_MESSAGES/mediagoblin.mo b/mediagoblin/i18n/es/LC_MESSAGES/mediagoblin.mo Binary files differindex bed6aab8..0f7f4026 100644 --- a/mediagoblin/i18n/es/LC_MESSAGES/mediagoblin.mo +++ b/mediagoblin/i18n/es/LC_MESSAGES/mediagoblin.mo diff --git a/mediagoblin/i18n/es/LC_MESSAGES/mediagoblin.po b/mediagoblin/i18n/es/LC_MESSAGES/mediagoblin.po index 460c074c..406e1923 100644 --- a/mediagoblin/i18n/es/LC_MESSAGES/mediagoblin.po +++ b/mediagoblin/i18n/es/LC_MESSAGES/mediagoblin.po @@ -16,7 +16,7 @@ msgstr "" "Project-Id-Version: GNU MediaGoblin\n" "Report-Msgid-Bugs-To: http://bugs.foocorp.net/projects/mediagoblin/issues\n" "POT-Creation-Date: 2011-12-04 10:24-0600\n" -"PO-Revision-Date: 2011-12-04 16:49+0000\n" +"PO-Revision-Date: 2011-12-05 23:20+0000\n" "Last-Translator: manolinux <mu@member.fsf.org>\n" "Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/mediagoblin/team/es/)\n" "MIME-Version: 1.0\n" @@ -83,12 +83,12 @@ msgstr "" #: mediagoblin/auth/views.py:203 msgid "You must be logged in so we know who to send the email to!" msgstr "" -"Debes iniciar sesión para que podamos saber a quién le enviamos el correo " +"¡Debes iniciar sesión para que podamos saber a quién le enviamos el correo " "electrónico!" #: mediagoblin/auth/views.py:211 msgid "You've already verified your email address!" -msgstr "Ya haz verificado tu dirección de email!" +msgstr "¡Ya has verificado tu dirección de correo!" #: mediagoblin/auth/views.py:224 msgid "Resent your verification email." @@ -113,7 +113,7 @@ msgstr "Etiquetas" #: mediagoblin/edit/forms.py:30 mediagoblin/submit/forms.py:34 msgid "Seperate tags by commas." -msgstr "Separar etiquetas por comas." +msgstr "Separa las etiquetas con comas." #: mediagoblin/edit/forms.py:33 msgid "Slug" @@ -164,7 +164,7 @@ msgstr "Contraseña incorrecta" #: mediagoblin/edit/views.py:192 msgid "Profile edited!" -msgstr "Perfil editado!" +msgstr "¡Perfil editado!" #: mediagoblin/media_types/__init__.py:65 msgid "Could not find any file extension in \"{filename}\"" @@ -184,7 +184,7 @@ msgstr "Debes proporcionar un archivo." #: mediagoblin/submit/views.py:127 msgid "Woohoo! Submitted!" -msgstr "¡Woohoo! ¡Enviado!" +msgstr "¡Yujú! ¡Enviado!" #: mediagoblin/submit/views.py:133 msgid "Invalid file type." @@ -192,7 +192,7 @@ msgstr "Tipo de archivo inválido." #: mediagoblin/templates/mediagoblin/404.html:21 msgid "Oops!" -msgstr "Ups!" +msgstr "¡Ups!" #: mediagoblin/templates/mediagoblin/404.html:24 msgid "There doesn't seem to be a page at this address. Sorry!" @@ -220,7 +220,7 @@ msgstr "Enviar contenido" #: mediagoblin/templates/mediagoblin/base.html:65 msgid "Verify your email!" -msgstr "Verifica tu email!" +msgstr "¡Verifica tu email!" #: mediagoblin/templates/mediagoblin/base.html:72 msgid "log out" @@ -246,7 +246,7 @@ msgstr "Explorar" #: mediagoblin/templates/mediagoblin/root.html:27 msgid "Hi there, welcome to this MediaGoblin site!" -msgstr "Hola, bienvenido a este sitio de MediaGoblin!" +msgstr "Hola, ¡bienvenido a este sitio de MediaGoblin!" #: mediagoblin/templates/mediagoblin/root.html:28 msgid "" @@ -267,7 +267,7 @@ msgstr "" #: mediagoblin/templates/mediagoblin/root.html:31 msgid "Don't have one yet? It's easy!" -msgstr "Aún no tienes una? Es fácil!" +msgstr "¿Aún no tienes una? ¡Es fácil!" #: mediagoblin/templates/mediagoblin/root.html:32 #, python-format @@ -325,10 +325,13 @@ msgid "" "If you think this is an error, just ignore this email and continue being\n" "a happy goblin!" msgstr "" -"Hola %(username)s , para cambiar su contraseña de GNU MediaGoblin, abra la " -"siguiente URL en su navegador: %(verification_url)s Si usted piensa que " -"esto es un error, simplemente ignore este mensaje y siga siendo un duende " -"feliz!" +"Hola %(username)s,\n" +"\n" +"Para cambiar tu contraseña de GNU MediaGoblin, abre la siguiente URL en un navegador:\n" +"\n" +"%(verification_url)s \n" +"\n" +"Si piensas que esto es un error, simplemente ignora este mensaje y sigue siendo un trasgo feliz." #: mediagoblin/templates/mediagoblin/auth/login.html:30 msgid "Logging in failed!" @@ -373,7 +376,7 @@ msgstr "" #: mediagoblin/templates/mediagoblin/edit/edit.html:29 #, python-format msgid "Editing %(media_title)s" -msgstr "Edición %(media_title)s " +msgstr "Editando %(media_title)s " #: mediagoblin/templates/mediagoblin/edit/edit.html:36 #: mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html:49 @@ -442,7 +445,7 @@ msgstr "Borrar" #: mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html:30 #, python-format msgid "Really delete %(title)s?" -msgstr "Realmente deseas eliminar %(title)s ?" +msgstr "¿Realmente deseas eliminar %(title)s?" #: mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html:50 msgid "Delete Permanently" @@ -488,7 +491,7 @@ msgstr "Es necesario un correo electrónico de verificación" #: mediagoblin/templates/mediagoblin/user_pages/user.html:53 msgid "Almost done! Your account still needs to be activated." -msgstr "Casi terminas! Solo falta activar la cuenta." +msgstr "¡Casi hemos terminado! Solo falta activar la cuenta." #: mediagoblin/templates/mediagoblin/user_pages/user.html:58 msgid "" diff --git a/mediagoblin/i18n/pt_BR/LC_MESSAGES/mediagoblin.mo b/mediagoblin/i18n/pt_BR/LC_MESSAGES/mediagoblin.mo Binary files differindex 95d6d0ae..87e62764 100644 --- a/mediagoblin/i18n/pt_BR/LC_MESSAGES/mediagoblin.mo +++ b/mediagoblin/i18n/pt_BR/LC_MESSAGES/mediagoblin.mo diff --git a/mediagoblin/i18n/pt_BR/LC_MESSAGES/mediagoblin.po b/mediagoblin/i18n/pt_BR/LC_MESSAGES/mediagoblin.po index daa65e0f..f1c044d2 100644 --- a/mediagoblin/i18n/pt_BR/LC_MESSAGES/mediagoblin.po +++ b/mediagoblin/i18n/pt_BR/LC_MESSAGES/mediagoblin.po @@ -10,8 +10,8 @@ msgstr "" "Project-Id-Version: GNU MediaGoblin\n" "Report-Msgid-Bugs-To: http://bugs.foocorp.net/projects/mediagoblin/issues\n" "POT-Creation-Date: 2011-12-04 10:24-0600\n" -"PO-Revision-Date: 2011-12-04 16:23+0000\n" -"Last-Translator: cwebber <cwebber@dustycloud.org>\n" +"PO-Revision-Date: 2011-12-04 23:32+0000\n" +"Last-Translator: osc <snd.noise@gmail.com>\n" "Language-Team: Portuguese (Brazilian) (http://www.transifex.net/projects/p/mediagoblin/team/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -59,7 +59,7 @@ msgstr "Desculpe, um usuário com este nome já existe." #: mediagoblin/auth/views.py:77 msgid "Sorry, a user with that email address already exists." -msgstr "" +msgstr "Desculpe, um usuário com esse email já esta cadastrado" #: mediagoblin/auth/views.py:179 msgid "" @@ -75,11 +75,11 @@ msgstr "A chave de verificação ou nome usuário estão incorretos." #: mediagoblin/auth/views.py:203 msgid "You must be logged in so we know who to send the email to!" -msgstr "" +msgstr " " #: mediagoblin/auth/views.py:211 msgid "You've already verified your email address!" -msgstr "" +msgstr "Você já verifico seu email!" #: mediagoblin/auth/views.py:224 msgid "Resent your verification email." @@ -103,7 +103,7 @@ msgstr "Etiquetas" #: mediagoblin/edit/forms.py:30 mediagoblin/submit/forms.py:34 msgid "Seperate tags by commas." -msgstr "" +msgstr "Separar tags por virgulas." #: mediagoblin/edit/forms.py:33 msgid "Slug" @@ -129,11 +129,11 @@ msgstr "Website" #: mediagoblin/edit/forms.py:49 msgid "Old password" -msgstr "" +msgstr "Senha antiga" #: mediagoblin/edit/forms.py:52 msgid "New Password" -msgstr "" +msgstr "Nova Senha" #: mediagoblin/edit/views.py:65 msgid "An entry with that slug already exists for this user." @@ -149,15 +149,15 @@ msgstr "Você está editando um perfil de usuário. Tenha cuidado." #: mediagoblin/edit/views.py:171 msgid "Wrong password" -msgstr "" +msgstr "Senha errada" #: mediagoblin/edit/views.py:192 msgid "Profile edited!" -msgstr "" +msgstr "Perfil editado!" #: mediagoblin/media_types/__init__.py:65 msgid "Could not find any file extension in \"{filename}\"" -msgstr "" +msgstr " " #: mediagoblin/submit/forms.py:25 msgid "File" @@ -177,7 +177,7 @@ msgstr "Eba! Enviado!" #: mediagoblin/submit/views.py:133 msgid "Invalid file type." -msgstr "" +msgstr "Tipo de arquivo inválido." #: mediagoblin/templates/mediagoblin/404.html:21 msgid "Oops!" @@ -209,11 +209,11 @@ msgstr "Enviar mídia" #: mediagoblin/templates/mediagoblin/base.html:65 msgid "Verify your email!" -msgstr "" +msgstr "Verifique seu email!" #: mediagoblin/templates/mediagoblin/base.html:72 msgid "log out" -msgstr "" +msgstr "Sair" #: mediagoblin/templates/mediagoblin/base.html:75 #: mediagoblin/templates/mediagoblin/auth/login.html:27 @@ -235,7 +235,7 @@ msgstr "Explorar" #: mediagoblin/templates/mediagoblin/root.html:27 msgid "Hi there, welcome to this MediaGoblin site!" -msgstr "" +msgstr "Olá, bemvindo ao site de MediaGoblin." #: mediagoblin/templates/mediagoblin/root.html:28 msgid "" @@ -247,11 +247,11 @@ msgstr "" msgid "" "To add your own media, place comments, save your favourites and more, you " "can log in with your MediaGoblin account." -msgstr "" +msgstr " " #: mediagoblin/templates/mediagoblin/root.html:31 msgid "Don't have one yet? It's easy!" -msgstr "" +msgstr " " #: mediagoblin/templates/mediagoblin/root.html:32 #, python-format @@ -276,11 +276,11 @@ msgstr "Enviar" #: mediagoblin/templates/mediagoblin/auth/forgot_password.html:27 msgid "Recover password" -msgstr "" +msgstr "Recuperar senha" #: mediagoblin/templates/mediagoblin/auth/forgot_password.html:30 msgid "Send instructions" -msgstr "" +msgstr "Mandar instruções" #: mediagoblin/templates/mediagoblin/auth/fp_changed_success.html:22 msgid "Your password has been changed. Try to log in now." @@ -383,7 +383,7 @@ msgstr "" #: mediagoblin/templates/mediagoblin/media_displays/video.html:19 msgid "Original" -msgstr "" +msgstr "Original" #: mediagoblin/templates/mediagoblin/submit/start.html:26 msgid "Submit yer media" @@ -406,7 +406,7 @@ msgstr "" #: mediagoblin/templates/mediagoblin/user_pages/media.html:67 msgid "Post a comment" -msgstr "" +msgstr "Postar um comentário" #: mediagoblin/templates/mediagoblin/user_pages/media.html:85 msgid "at" @@ -414,15 +414,15 @@ msgstr "" #: mediagoblin/templates/mediagoblin/user_pages/media.html:102 msgid "Post comment!" -msgstr "" +msgstr "Postar comentário!" #: mediagoblin/templates/mediagoblin/user_pages/media.html:124 msgid "Edit" -msgstr "" +msgstr "Editar" #: mediagoblin/templates/mediagoblin/user_pages/media.html:130 msgid "Delete" -msgstr "" +msgstr "Apagar" #: mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html:30 #, python-format @@ -556,7 +556,7 @@ msgstr "Mais velho" #: mediagoblin/templates/mediagoblin/utils/pagination.html:50 msgid "Go to page:" -msgstr "" +msgstr "Ir a página:" #: mediagoblin/templates/mediagoblin/utils/tags.html:20 msgid "Tagged with" @@ -564,7 +564,7 @@ msgstr "" #: mediagoblin/templates/mediagoblin/utils/tags.html:25 msgid "and" -msgstr "" +msgstr "e" #: mediagoblin/user_pages/forms.py:24 msgid "Comment" @@ -576,15 +576,15 @@ msgstr "Eu tenho certeza de que quero pagar isso" #: mediagoblin/user_pages/views.py:155 msgid "Oops, your comment was empty." -msgstr "" +msgstr "Opa, seu comentáio estava vazio." #: mediagoblin/user_pages/views.py:161 msgid "Your comment has been posted!" -msgstr "" +msgstr "Seu comentário foi postado!" #: mediagoblin/user_pages/views.py:183 msgid "You deleted the media." -msgstr "" +msgstr "Você deletou a mídia." #: mediagoblin/user_pages/views.py:190 msgid "The media was not deleted because you didn't check that you were sure." diff --git a/mediagoblin/i18n/ru/LC_MESSAGES/mediagoblin.mo b/mediagoblin/i18n/ru/LC_MESSAGES/mediagoblin.mo Binary files differindex 0e34144d..7e62de83 100644 --- a/mediagoblin/i18n/ru/LC_MESSAGES/mediagoblin.mo +++ b/mediagoblin/i18n/ru/LC_MESSAGES/mediagoblin.mo diff --git a/mediagoblin/i18n/ru/LC_MESSAGES/mediagoblin.po b/mediagoblin/i18n/ru/LC_MESSAGES/mediagoblin.po index c615cde2..098ea38c 100644 --- a/mediagoblin/i18n/ru/LC_MESSAGES/mediagoblin.po +++ b/mediagoblin/i18n/ru/LC_MESSAGES/mediagoblin.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: GNU MediaGoblin\n" "Report-Msgid-Bugs-To: http://bugs.foocorp.net/projects/mediagoblin/issues\n" "POT-Creation-Date: 2011-12-04 10:24-0600\n" -"PO-Revision-Date: 2011-12-04 17:53+0000\n" +"PO-Revision-Date: 2011-12-04 19:58+0000\n" "Last-Translator: aleksejrs <deletesoftware@yandex.ru>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "MIME-Version: 1.0\n" @@ -251,7 +251,7 @@ msgid "" "To add your own media, place comments, save your favourites and more, you " "can log in with your MediaGoblin account." msgstr "" -"Для добавления собственных файлов, комментирования, ведения списка любиых " +"Для добавления собственных файлов, комментирования, ведения списка любимых " "файлов и т. п. вы можете представиться с помощью вашей MediaGoblin’овой " "учётной записи." diff --git a/mediagoblin/i18n/sk/LC_MESSAGES/mediagoblin.mo b/mediagoblin/i18n/sk/LC_MESSAGES/mediagoblin.mo Binary files differindex 4e71eaa7..5ab7befa 100644 --- a/mediagoblin/i18n/sk/LC_MESSAGES/mediagoblin.mo +++ b/mediagoblin/i18n/sk/LC_MESSAGES/mediagoblin.mo diff --git a/mediagoblin/i18n/sk/LC_MESSAGES/mediagoblin.po b/mediagoblin/i18n/sk/LC_MESSAGES/mediagoblin.po index a44f7866..34cf1679 100644 --- a/mediagoblin/i18n/sk/LC_MESSAGES/mediagoblin.po +++ b/mediagoblin/i18n/sk/LC_MESSAGES/mediagoblin.po @@ -9,8 +9,8 @@ msgstr "" "Project-Id-Version: GNU MediaGoblin\n" "Report-Msgid-Bugs-To: http://bugs.foocorp.net/projects/mediagoblin/issues\n" "POT-Creation-Date: 2011-12-04 10:24-0600\n" -"PO-Revision-Date: 2011-12-04 16:23+0000\n" -"Last-Translator: cwebber <cwebber@dustycloud.org>\n" +"PO-Revision-Date: 2011-12-10 23:09+0000\n" +"Last-Translator: martin <zatroch.martin@gmail.com>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -57,7 +57,7 @@ msgstr "Prepáč, rovnaké prihlasovacie meno už niekto používa." #: mediagoblin/auth/views.py:77 msgid "Sorry, a user with that email address already exists." -msgstr "" +msgstr "Prepáč, používateľ s rovnakou e-mailovou adresou už existuje." #: mediagoblin/auth/views.py:179 msgid "" @@ -73,11 +73,11 @@ msgstr "Nesprávny overovací kľúč alebo používateľské ID" #: mediagoblin/auth/views.py:203 msgid "You must be logged in so we know who to send the email to!" -msgstr "" +msgstr "Aby sme ti mohli zaslať e-mail, je potrebné byť prihláseným!" #: mediagoblin/auth/views.py:211 msgid "You've already verified your email address!" -msgstr "" +msgstr "Tvoja e-mailová adresa už bola raz overená!" #: mediagoblin/auth/views.py:224 msgid "Resent your verification email." @@ -101,7 +101,7 @@ msgstr "Štítky" #: mediagoblin/edit/forms.py:30 mediagoblin/submit/forms.py:34 msgid "Seperate tags by commas." -msgstr "" +msgstr "Oddeľ štítky pomocou čiarky." #: mediagoblin/edit/forms.py:33 msgid "Slug" @@ -126,11 +126,11 @@ msgstr "Webstránka" #: mediagoblin/edit/forms.py:49 msgid "Old password" -msgstr "" +msgstr "Staré heslo" #: mediagoblin/edit/forms.py:52 msgid "New Password" -msgstr "" +msgstr "Nové heslo" #: mediagoblin/edit/views.py:65 msgid "An entry with that slug already exists for this user." @@ -146,15 +146,15 @@ msgstr "Upravuješ používateľský profil. Pristupuj opatrne." #: mediagoblin/edit/views.py:171 msgid "Wrong password" -msgstr "" +msgstr "Nesprávne heslo" #: mediagoblin/edit/views.py:192 msgid "Profile edited!" -msgstr "" +msgstr "Profil upravený!" #: mediagoblin/media_types/__init__.py:65 msgid "Could not find any file extension in \"{filename}\"" -msgstr "" +msgstr "Nebolo možné nájsť žiadnu príponu v súbore \"{filename}\"" #: mediagoblin/submit/forms.py:25 msgid "File" @@ -174,7 +174,7 @@ msgstr "Juchú! Úspešne vložené!" #: mediagoblin/submit/views.py:133 msgid "Invalid file type." -msgstr "" +msgstr "Nesprávny typ súboru." #: mediagoblin/templates/mediagoblin/404.html:21 msgid "Oops!" @@ -206,11 +206,11 @@ msgstr "Vložiť výtvor" #: mediagoblin/templates/mediagoblin/base.html:65 msgid "Verify your email!" -msgstr "" +msgstr "Over si e-mail!" #: mediagoblin/templates/mediagoblin/base.html:72 msgid "log out" -msgstr "" +msgstr "odhlásenie" #: mediagoblin/templates/mediagoblin/base.html:75 #: mediagoblin/templates/mediagoblin/auth/login.html:27 @@ -232,23 +232,27 @@ msgstr "Preskúmať" #: mediagoblin/templates/mediagoblin/root.html:27 msgid "Hi there, welcome to this MediaGoblin site!" -msgstr "" +msgstr "Ahoj, vitaj na tejto MediaGoblin stránke!" #: mediagoblin/templates/mediagoblin/root.html:28 msgid "" "This site is running <a href=\"http://mediagoblin.org\">MediaGoblin</a>, an " "extraordinarily great piece of media hosting software." msgstr "" +"Táto stránka používa <a href=\"http://mediagoblin.org\">MediaGoblin</a>, " +"výnimočne skvelý kus softvéru na hostovanie médií." #: mediagoblin/templates/mediagoblin/root.html:29 msgid "" "To add your own media, place comments, save your favourites and more, you " "can log in with your MediaGoblin account." msgstr "" +"Pre pridanie vlastných výtvorov, vloženie komentárov, uloženie svojich " +"obľúbených položiek a viac, sa musíš prihlásiť so svojim MediaGoblin účtom." #: mediagoblin/templates/mediagoblin/root.html:31 msgid "Don't have one yet? It's easy!" -msgstr "" +msgstr "Ešte žiaden nemáš? Je to jednoduché!" #: mediagoblin/templates/mediagoblin/root.html:32 #, python-format @@ -257,6 +261,9 @@ msgid "" " or\n" " <a class=\"button_action\" href=\"http://wiki.mediagoblin.org/HackingHowto\">Set up MediaGoblin on your own server</a>" msgstr "" +"<a class=\"header_submit_highlight\" href=\"%(register_url)s\">Vytvoriť bezplatný účet</a>\n" +" alebo\n" +" <a class=\"header_submit\" href=\"http://wiki.mediagoblin.org/HackingHowto\">Sprevádzkovať MediaGoblin na vlastnom serveri</a>" #: mediagoblin/templates/mediagoblin/root.html:44 msgid "Most recent media" @@ -273,11 +280,11 @@ msgstr "Vložiť" #: mediagoblin/templates/mediagoblin/auth/forgot_password.html:27 msgid "Recover password" -msgstr "" +msgstr "Obnoviť heslo" #: mediagoblin/templates/mediagoblin/auth/forgot_password.html:30 msgid "Send instructions" -msgstr "" +msgstr "Zaslať inštrukcie" #: mediagoblin/templates/mediagoblin/auth/fp_changed_success.html:22 msgid "Your password has been changed. Try to log in now." @@ -377,11 +384,11 @@ msgstr "Úprava profilu, ktorý vlastní %(username)s" #: mediagoblin/templates/mediagoblin/listings/tag.html:35 #, python-format msgid "Media tagged with: %(tag_name)s" -msgstr "" +msgstr "Výtvory označené s: %(tag_name)s" #: mediagoblin/templates/mediagoblin/media_displays/video.html:19 msgid "Original" -msgstr "" +msgstr "Originál" #: mediagoblin/templates/mediagoblin/submit/start.html:26 msgid "Submit yer media" @@ -390,7 +397,7 @@ msgstr "Vlož svoj výtvor" #: mediagoblin/templates/mediagoblin/user_pages/gallery.html:30 #, python-format msgid "%(username)s's media" -msgstr "" +msgstr "Výtvory používateľa %(username)s" #: mediagoblin/templates/mediagoblin/user_pages/gallery.html:37 #, python-format @@ -400,27 +407,27 @@ msgstr "<a href=\"%(user_url)s\">Výtvory, ktoré vlastní %(username)s</a>" #: mediagoblin/templates/mediagoblin/user_pages/media.html:57 #, python-format msgid "By <a href=\"%(user_url)s\">%(username)s</a> on %(date)s" -msgstr "" +msgstr "Od <a href=\"%(user_url)s\">%(username)s</a> v čase %(date)s" #: mediagoblin/templates/mediagoblin/user_pages/media.html:67 msgid "Post a comment" -msgstr "" +msgstr "Zaslať komentár" #: mediagoblin/templates/mediagoblin/user_pages/media.html:85 msgid "at" -msgstr "" +msgstr "o" #: mediagoblin/templates/mediagoblin/user_pages/media.html:102 msgid "Post comment!" -msgstr "" +msgstr "Zaslať komentár!" #: mediagoblin/templates/mediagoblin/user_pages/media.html:124 msgid "Edit" -msgstr "" +msgstr "Upraviť" #: mediagoblin/templates/mediagoblin/user_pages/media.html:130 msgid "Delete" -msgstr "" +msgstr "Odstrániť" #: mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html:30 #, python-format @@ -552,15 +559,15 @@ msgstr "Staršie" #: mediagoblin/templates/mediagoblin/utils/pagination.html:50 msgid "Go to page:" -msgstr "" +msgstr "Ísť na stránku:" #: mediagoblin/templates/mediagoblin/utils/tags.html:20 msgid "Tagged with" -msgstr "" +msgstr "Označené s" #: mediagoblin/templates/mediagoblin/utils/tags.html:25 msgid "and" -msgstr "" +msgstr "a" #: mediagoblin/user_pages/forms.py:24 msgid "Comment" @@ -572,19 +579,19 @@ msgstr "Jednoznačne to chcem odstrániť" #: mediagoblin/user_pages/views.py:155 msgid "Oops, your comment was empty." -msgstr "" +msgstr "Ajaj, tvoj komentár bol prázdny." #: mediagoblin/user_pages/views.py:161 msgid "Your comment has been posted!" -msgstr "" +msgstr "Tvoj komentár bol zaslaný!" #: mediagoblin/user_pages/views.py:183 msgid "You deleted the media." -msgstr "" +msgstr "Výtvor bol odstránený tebou." #: mediagoblin/user_pages/views.py:190 msgid "The media was not deleted because you didn't check that you were sure." -msgstr "" +msgstr "Výtvor nebol odstránený, nakoľko chýbala tvoja konfirmácia." #: mediagoblin/user_pages/views.py:198 msgid "You are about to delete another user's media. Proceed with caution." diff --git a/mediagoblin/media_types/video/processing.py b/mediagoblin/media_types/video/processing.py index 93f16e86..7d261226 100644 --- a/mediagoblin/media_types/video/processing.py +++ b/mediagoblin/media_types/video/processing.py @@ -41,6 +41,8 @@ def process_video(entry): and attaches callbacks to that child process, hopefully, the entry-complete callback will be called when the video is done. """ + video_config = mgg.global_config['media_type:mediagoblin.media_types.video'] + workbench = mgg.workbench_manager.create_workbench() queued_filepath = entry['queued_media_file'] @@ -94,25 +96,24 @@ def process_video(entry): entry['media_files']['thumb'] = thumbnail_filepath + if video_config['keep_original']: + # Push original file to public storage + queued_file = file(queued_filename, 'rb') - # Push original file to public storage - queued_file = file(queued_filename, 'rb') - - with queued_file: - original_filepath = create_pub_filepath( - entry, - queued_filepath[-1]) + with queued_file: + original_filepath = create_pub_filepath( + entry, + queued_filepath[-1]) - with mgg.public_store.get_file(original_filepath, 'wb') as \ - original_file: - _log.debug('Saving original...') - original_file.write(queued_file.read()) - _log.debug('Saved original') + with mgg.public_store.get_file(original_filepath, 'wb') as \ + original_file: + _log.debug('Saving original...') + original_file.write(queued_file.read()) + _log.debug('Saved original') - entry['media_files']['original'] = original_filepath + entry['media_files']['original'] = original_filepath mgg.queue_store.delete_file(queued_filepath) - # Save the MediaEntry entry.save() diff --git a/mediagoblin/templates/mediagoblin/media_displays/video.html b/mediagoblin/templates/mediagoblin/media_displays/video.html index 5b8ec789..5ef1a782 100644 --- a/mediagoblin/templates/mediagoblin/media_displays/video.html +++ b/mediagoblin/templates/mediagoblin/media_displays/video.html @@ -21,5 +21,5 @@ {%- endtrans -%} </a> </p> - {% endif %} + {% endif %} {% endblock %} diff --git a/mediagoblin/templates/mediagoblin/utils/prev_next.html b/mediagoblin/templates/mediagoblin/utils/prev_next.html index 3363891b..b0c01963 100644 --- a/mediagoblin/templates/mediagoblin/utils/prev_next.html +++ b/mediagoblin/templates/mediagoblin/utils/prev_next.html @@ -25,23 +25,23 @@ {# There are no previous entries for the very first media entry #} {% if prev_entry_url %} <a class="navigation_button navigation_left" href="{{ prev_entry_url }}"> - ← newer + ← {% trans %}newer{% endtrans %} </a> {% else %} {# This is the first entry. display greyed-out 'previous' image #} <p class="navigation_button navigation_left"> - ← newer + ← {% trans %}newer{% endtrans %} </p> {% endif %} {# Likewise, this could be the very last media entry #} {% if next_entry_url %} <a class="navigation_button" href="{{ next_entry_url }}"> - older → + {% trans %}older{% endtrans %} → </a> {% else %} {# This is the last entry. display greyed-out 'next' image #} <p class="navigation_button"> - older → + {% trans %}older{% endtrans %} → </p> {% endif %} </div> diff --git a/runtests.sh b/runtests.sh index 1dfbf093..4265326c 100755 --- a/runtests.sh +++ b/runtests.sh @@ -23,7 +23,8 @@ elif which nosetests > /dev/null; then echo "Using nosetests from \$PATH"; export NOSETESTS="nosetests"; else - echo "No nosetests found, exiting! X_X"; + echo "nosetests not found. X_X"; + echo "Please install 'nose'. Exiting."; exit 1 fi |