Spell-check the entire documentation.

This commit is contained in:
Ben Sturmfels 2016-09-18 00:48:32 +10:00 committed by Boris Bobrov
parent 821686372c
commit 9650aa394b
25 changed files with 176 additions and 180 deletions

View File

@ -144,7 +144,7 @@ Only set client_id for update.
Only set client_secret for update. Only set client_secret for update.
This should only be given when you update. This should only be given when you update.
Logo URL <url> is not a valid URL Logo URL <URL> is not a valid URL
This is when the URL specified did not meet the validation. This is when the URL specified did not meet the validation.
contacts must be a string of space-separated email addresses. contacts must be a string of space-separated email addresses.
@ -171,7 +171,7 @@ We are not using OAuth2 as we want to stay completely compatible with pump.io.
Endpoints Endpoints
--------- ---------
These are the endpoints you need to use for the oauth requests: These are the endpoints you need to use for the OAuth requests:
`/oauth/request_token` is for getting the request token. `/oauth/request_token` is for getting the request token.

View File

@ -19,7 +19,7 @@ Objects
Using any the APIs mentioned in this document you will required Using any the APIs mentioned in this document you will required
:doc:`authentication`. There are many ways to interact with objects, some of :doc:`authentication`. There are many ways to interact with objects, some of
which aren't supported yet by mediagoblin such as liking or sharing objects which aren't supported yet by MediaGoblin such as liking or sharing objects
however you can interact with them by updating them, deleting them and however you can interact with them by updating them, deleting them and
commenting on them. commenting on them.
@ -49,16 +49,16 @@ timestamps or any other data the server creates. My activity comment is::
This should be posted to the users feed (outbox) which you can find out about This should be posted to the users feed (outbox) which you can find out about
:doc:`activities`. You will get back the full activity containing all of :doc:`activities`. You will get back the full activity containing all of
attributes including ID, urls, etc. attributes including ID, URLs, etc.
Posting Media Posting Media
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
Posting media is a special case from posting all other objects. This is because Posting media is a special case from posting all other objects. This is because
you need to submit more than just the JSON image representation, you need to you need to submit more than just the JSON image representation, you need to
actually subject the image itself. There is also strange behavour around media actually subject the image itself. There is also strange behavior around media
postings where if you want to give the media you're posting a title or postings where if you want to give the media you're posting a title or
description you need to peform an update too. A full media posting in order of description you need to perform an update too. A full media posting in order of
steps to do is as follows: steps to do is as follows:
1) Uploads the data to the server 1) Uploads the data to the server
@ -74,7 +74,7 @@ To upload media you should use the URL `/api/user/<username>/uploads`.
A POST request should be made to the media upload URL submitting at least two A POST request should be made to the media upload URL submitting at least two
headers: headers:
* `Content-Type` - This being a valid mimetype for the media. * `Content-Type` - This being a valid MIME type for the media.
* `Content-Length` - size in bytes of the media. * `Content-Length` - size in bytes of the media.
The media data should be submitted as POST data to the image upload URL. The media data should be submitted as POST data to the image upload URL.
@ -196,8 +196,8 @@ You should get the full delete activity in response.
.. warning:: .. warning::
While deletion works, currently because of the way deletion is implemented While deletion works, currently because of the way deletion is implemented
deletion either via the API or the webUI causes any activities to be broken deletion either via the API or the web UI causes any activities to be broken
and will be skipped and unaccessible. A migration to remove the broken and will be skipped and inaccessible. A migration to remove the broken
activities will come in a future release when soft-deletion has been activities will come in a future release when soft-deletion has been
implemented. implemented.

View File

@ -44,7 +44,7 @@ development.
What's where What's where
============ ============
After you've run checked out mediagoblin and followed the virtualenv After you've run checked out MediaGoblin and followed the virtualenv
instantiation instructions, you're faced with the following directory instantiation instructions, you're faced with the following directory
tree:: tree::
@ -86,8 +86,8 @@ As you can see, all the code for GNU MediaGoblin is in the
Here are some interesting files and what they do: Here are some interesting files and what they do:
:routing.py: maps url paths to views :routing.py: maps URL paths to views
:views.py: views handle http requests :views.py: views handle HTTP requests
:forms.py: wtforms stuff for this submodule :forms.py: wtforms stuff for this submodule
You'll notice that there are several sub-directories: tests, You'll notice that there are several sub-directories: tests,
@ -97,7 +97,7 @@ templates, auth, submit, ...
``templates`` holds all the templates for the output. ``templates`` holds all the templates for the output.
``auth`` and ``submit`` are modules that enacpsulate authentication ``auth`` and ``submit`` are modules that encapsulate authentication
and media item submission. If you look in these directories, you'll and media item submission. If you look in these directories, you'll
see they have their own ``routing.py``, ``view.py``, and forms.py in see they have their own ``routing.py``, ``view.py``, and forms.py in
addition to some other code. addition to some other code.
@ -123,15 +123,15 @@ Software Stack
for unit tests for unit tests
* `virtualenv <http://www.virtualenv.org/>`_: for setting up an * `virtualenv <http://www.virtualenv.org/>`_: for setting up an
isolated environment to keep mediagoblin and related packages isolated environment to keep MediaGoblin and related packages
(potentially not required if MediaGoblin is packaged for your (potentially not required if MediaGoblin is packaged for your
distro) distro)
* Data storage * Data storage
* `SQLAlchemy <http://sqlalchemy.org/>`_: SQL ORM and database * `SQLAlchemy <http://sqlalchemy.org/>`_: SQL ORM and database
interaction library for Python. Currently we support sqlite and interaction library for Python. Currently we support SQLite and
postgress as backends. PostgreSQL as backends.
* Web application * Web application
@ -158,10 +158,10 @@ Software Stack
* `Markdown (for python) <http://pypi.python.org/pypi/Markdown>`_: * `Markdown (for python) <http://pypi.python.org/pypi/Markdown>`_:
implementation of `Markdown <http://daringfireball.net/projects/markdown/>`_ implementation of `Markdown <http://daringfireball.net/projects/markdown/>`_
text-to-html tool to make it easy for people to write richtext text-to-html tool to make it easy for people to write rich text
comments, descriptions, and etc. comments, descriptions, and etc.
* `lxml <http://lxml.de/>`_: nice xml and html processing for * `lxml <http://lxml.de/>`_: nice XML and HTML processing for
python. python.
* Media processing libraries * Media processing libraries
@ -174,10 +174,10 @@ Software Stack
future, probably audio too. future, probably audio too.
* `chardet <http://pypi.python.org/pypi/chardet>`_: (Optional, for * `chardet <http://pypi.python.org/pypi/chardet>`_: (Optional, for
ascii art hosting sites only) Used to make ascii art thumbnails. ASCII art hosting sites only) Used to make ASCII art thumbnails.
* Front end * Front end
* `JQuery <http://jquery.com/>`_: for groovy JavaScript things * `jQuery <http://jquery.com/>`_: for groovy JavaScript things

View File

@ -31,7 +31,7 @@ There's a few things you need to know:
- We use `Alembic <https://bitbucket.org/zzzeek/alembic>`_ to run - We use `Alembic <https://bitbucket.org/zzzeek/alembic>`_ to run
migrations. We also make heavy use of the migrations. We also make heavy use of the
`branching model <http://alembic.readthedocs.org/en/latest/branches.html>`_ `branching model <http://alembic.readthedocs.org/en/latest/branches.html>`_
for our plugins. Every plugin gets its own migration branc. for our plugins. Every plugin gets its own migration branch.
- We used to use `sqlalchemy-migrate - We used to use `sqlalchemy-migrate
<http://code.google.com/p/sqlalchemy-migrate/>`_. <http://code.google.com/p/sqlalchemy-migrate/>`_.
See `their docs <https://sqlalchemy-migrate.readthedocs.org/>`_. See `their docs <https://sqlalchemy-migrate.readthedocs.org/>`_.
@ -41,7 +41,7 @@ There's a few things you need to know:
- SQLAlchemy has two parts to it, the ORM and the "core" interface. - SQLAlchemy has two parts to it, the ORM and the "core" interface.
We DO NOT use the ORM when running migrations. Think about it: the We DO NOT use the ORM when running migrations. Think about it: the
ORM is set up with an expectation that the models already reflect a ORM is set up with an expectation that the models already reflect a
certain pattern. But if a person is moving from their old patern certain pattern. But if a person is moving from their old pattern
and are running tools to *get to* the current pattern, of course and are running tools to *get to* the current pattern, of course
their current database structure doesn't match the state of the ORM! their current database structure doesn't match the state of the ORM!
Anyway, Alembic has its own conventions for migrations; follow those. Anyway, Alembic has its own conventions for migrations; follow those.

View File

@ -38,7 +38,7 @@ Chris and Will on "Why GNU MediaGoblin":
.. figure:: ../_static/goblin.png .. figure:: ../_static/goblin.png
:alt: Cute goblin with a beret. :alt: Cute goblin with a beret.
*Figure 1: Cute goblin with a beret. llustrated by Chris *Figure 1: Cute goblin with a beret. Illustrated by Chris
Webber* Webber*
.. figure:: ../_static/snugglygoblin.png .. figure:: ../_static/snugglygoblin.png
@ -61,7 +61,7 @@ Chris and Will on "Why GNU MediaGoblin":
1. "GNU MediaGoblin" is the name we're going to use in all official 1. "GNU MediaGoblin" is the name we're going to use in all official
capacities: web site, documentation, press releases, ... capacities: web site, documentation, press releases, ...
2. In casual conversation, it's ok to use more casual names. 2. In casual conversation, it's OK to use more casual names.
3. If you're writing about the project, we ask that you call it GNU 3. If you're writing about the project, we ask that you call it GNU
MediaGoblin. MediaGoblin.
@ -113,7 +113,7 @@ Why WSGI Minimalism
Chris Webber on "Why WSGI Minimalism": Chris Webber on "Why WSGI Minimalism":
If you notice in the technology list I list a lot of components If you notice in the technology list I list a lot of components
that are very "django-like", but not actually `Django`_ that are very "Django-like", but not actually `Django`_
components. What can I say, I really like a lot of the ideas in components. What can I say, I really like a lot of the ideas in
Django! Which leads to the question: why not just use Django? Django! Which leads to the question: why not just use Django?
@ -176,7 +176,7 @@ Chris Webber on "Why MongoDB":
ideal universe where everyone ran servers out of their own ideal universe where everyone ran servers out of their own
housing. As a memory-mapped database, MongoDB is pretty hungry, housing. As a memory-mapped database, MongoDB is pretty hungry,
so actually I spent a lot of time debating whether the inability so actually I spent a lot of time debating whether the inability
to scale down as nicely as something like SQL has with sqlite to scale down as nicely as something like SQL has with SQLite
meant that it was out. meant that it was out.
But I decided in the end that I really want MongoDB, not for But I decided in the end that I really want MongoDB, not for
@ -199,7 +199,7 @@ Chris Webber on "Why MongoDB":
Being able to just dump media-specific information in a media_data Being able to just dump media-specific information in a media_data
hashtable is pretty great, and even better is having a plugin hash table is pretty great, and even better is having a plugin
system where you can just let plugins have their own entire system where you can just let plugins have their own entire
key-value space cleanly inside the document that doesn't interfere key-value space cleanly inside the document that doesn't interfere
with anyone else's stuff. If we were to let plugins to deposit with anyone else's stuff. If we were to let plugins to deposit

View File

@ -21,7 +21,7 @@ are:
+ **public_store:** After your media goes through processing it gets + **public_store:** After your media goes through processing it gets
moved to the public store. This is also a StorageInterface moved to the public store. This is also a StorageInterface
implelementation, and is for stuff that's intended to be seen by implementation, and is for stuff that's intended to be seen by
site visitors. site visitors.
The workbench The workbench
@ -43,11 +43,9 @@ Static assets / staticdirect
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On top of all that, there is some static media that comes bundled with your On top of all that, there is some static media that comes bundled with your
application. This stuff is kept in: application. This stuff is kept in ``mediagoblin/static/``.
mediagoblin/static/ These files are for MediaGoblin base assets. Things like the CSS files,
These files are for mediagoblin base assets. Things like the CSS files,
logos, etc. You can mount these at whatever location is appropriate to you logos, etc. You can mount these at whatever location is appropriate to you
(see the direct_remote_path option in the config file) so if your users (see the direct_remote_path option in the config file) so if your users
are keeping their static assets at http://static.mgoblin.example.org/ but are keeping their static assets at http://static.mgoblin.example.org/ but
@ -55,7 +53,7 @@ their actual site is at http://mgoblin.example.org/, you need to be able
to get your static files in a where-it's-mounted agnostic way. There's a to get your static files in a where-it's-mounted agnostic way. There's a
"staticdirector" attached to the request object. It's pretty easy to use; "staticdirector" attached to the request object. It's pretty easy to use;
just look at this bit taken from the just look at this bit taken from the
mediagoblin/templates/mediagoblin/base.html main template: mediagoblin/templates/mediagoblin/base.html main template::
<link rel="stylesheet" type="text/css" <link rel="stylesheet" type="text/css"
href="Template:Request.staticdirect('/css/extlib/text.css')"/> href="Template:Request.staticdirect('/css/extlib/text.css')"/>
@ -76,9 +74,7 @@ So, the StorageInterface!
So, the public and queue stores both use StorageInterface implementations So, the public and queue stores both use StorageInterface implementations
... but what does that mean? It's not too hard. ... but what does that mean? It's not too hard.
Open up: Open up ``mediagoblin/storage.py``.
mediagoblin/storage.py
In here you'll see a couple of things. First of all, there's the In here you'll see a couple of things. First of all, there's the
StorageInterface class. What you'll see is that this is just a very simple StorageInterface class. What you'll see is that this is just a very simple
@ -95,12 +91,12 @@ also the default storage system used. As expected, this stores files
locally on your machine. locally on your machine.
There's also a CloudFileStorage system. This provides a mapping to There's also a CloudFileStorage system. This provides a mapping to
[OpenStack's swift http://swift.openstack.org/] storage system (used by [OpenStack's Swift http://swift.openstack.org/] storage system (used by
RackSpace Cloud files and etc). RackSpace Cloud files and etc).
Between these two examples you should be able to get a pretty good idea of Between these two examples you should be able to get a pretty good idea of
how to write your own storage systems, for storing data across your how to write your own storage systems, for storing data across your
beowulf cluster of radioactive monkey brains, whatever. Beowulf cluster of radioactive monkey brains, whatever.
Writing code to store stuff Writing code to store stuff
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -112,10 +108,10 @@ https://docs.djangoproject.com/en/dev/ref/files/storage/]... with some
differences. differences.
Basically, you access files on "file paths", which aren't exactly like Basically, you access files on "file paths", which aren't exactly like
unix file paths, but are close. If you wanted to store a file on a path Unix file paths, but are close. If you wanted to store a file on a path
like dir1/dir2/filename.jpg you'd actually write that file path like: like dir1/dir2/filename.jpg you'd actually write that file path like::
['dir1', 'dir2', 'filename.jpg'] ['dir1', 'dir2', 'filename.jpg']
This way we can be *sure* that each component is actually a component of This way we can be *sure* that each component is actually a component of
the path that's expected... we do some filename cleaning on each component. the path that's expected... we do some filename cleaning on each component.

View File

@ -20,7 +20,7 @@ GNU MediaGoblin is a platform for sharing photos, video and other media
in an environment that respects our freedom and independence. in an environment that respects our freedom and independence.
This is a Free Software project. It is built by contributors for all This is a Free Software project. It is built by contributors for all
to use and enjoy. If you're intrested in contributing, see `the wiki to use and enjoy. If you're interested in contributing, see `the wiki
<http://wiki.mediagoblin.org/>`_ which has pages that talk about the <http://wiki.mediagoblin.org/>`_ which has pages that talk about the
ways someone can contribute. ways someone can contribute.

View File

@ -83,7 +83,7 @@ can use a shortcut to get your plugin's config section::
>>> floobie_dir = floobie_config['floobie_dir'] >>> floobie_dir = floobie_config['floobie_dir']
A tip: you have access to the `%(here)s` variable in your config, A tip: you have access to the `%(here)s` variable in your config,
which is the directory that the user's mediagoblin config is running which is the directory that the user's MediaGoblin config is running
out of. So for example, your plugin may need a "floobie" directory to out of. So for example, your plugin may need a "floobie" directory to
store floobs in. You could give them a reasonable default that makes store floobs in. You could give them a reasonable default that makes
use of the default `user_dev` location, but allow users to override use of the default `user_dev` location, but allow users to override
@ -92,7 +92,7 @@ it, like so::
[plugin_spec] [plugin_spec]
floobie_dir = string(default="%(here)s/user_dev/floobs/") floobie_dir = string(default="%(here)s/user_dev/floobs/")
Note, this is relative to the user's mediagoblin config directory, Note, this is relative to the user's MediaGoblin config directory,
*not* your plugin directory! *not* your plugin directory!
@ -178,7 +178,7 @@ Adding static resources
----------------------- -----------------------
It's possible to add static resources for your plugin. Say your It's possible to add static resources for your plugin. Say your
plugin needs some special javascript and images... how to provide plugin needs some special JavaScript and images... how to provide
them? Then how to access them? MediaGoblin has a way! them? Then how to access them? MediaGoblin has a way!
@ -230,7 +230,7 @@ the MediaGoblin repository.
WTForms hooks WTForms hooks
+++++++++++++ +++++++++++++
We haven't totally settled on a way to tranform wtforms form objects, We haven't totally settled on a way to transform wtforms form objects,
but here's one way. In your view:: but here's one way. In your view::
from mediagoblin.foo.forms import SomeForm from mediagoblin.foo.forms import SomeForm

View File

@ -44,7 +44,7 @@ This hook is called in ``mediagoblin.auth.views`` in both the ``login`` and
if :ref:`basic_auth-chapter` is not enabled, the user will be redirected to the if :ref:`basic_auth-chapter` is not enabled, the user will be redirected to the
correct login and registration views for your plugin. correct login and registration views for your plugin.
The code assumes that it can generate a valid url given The code assumes that it can generate a valid URL given
``mediagoblin.plugins.{{ your_plugin_here }}.login`` and ``mediagoblin.plugins.{{ your_plugin_here }}.login`` and
``mediagoblin.plugins.{{ your_plugin_here }}.register``. This is only needed if ``mediagoblin.plugins.{{ your_plugin_here }}.register``. This is only needed if
you will not be using the ``login`` and ``register`` views in you will not be using the ``login`` and ``register`` views in
@ -82,5 +82,5 @@ the ``stored_hash`` and return either ``True`` or ``False``.
This hook is called in ``mediagoblin.auth.tools.check_login_simple``. It is This hook is called in ``mediagoblin.auth.tools.check_login_simple``. It is
called if a user is not found and should do something that takes the same amount called if a user is not found and should do something that takes the same amount
of time as your ``check_password`` function. This is to help prevent timining of time as your ``check_password`` function. This is to help prevent timing
attacks. attacks.

View File

@ -24,7 +24,7 @@ Accessing Existing Data
======================= =======================
If your plugin wants to access existing data, this is quite If your plugin wants to access existing data, this is quite
straight forward. Just import the appropiate models and use straight forward. Just import the appropriate models and use
the full power of SQLAlchemy. Take a look at the (upcoming) the full power of SQLAlchemy. Take a look at the (upcoming)
database section in the Developer's Chapter. database section in the Developer's Chapter.
@ -134,13 +134,13 @@ plugin's models.py and then run::
./bin/gmg alembic --with-plugins revision \ ./bin/gmg alembic --with-plugins revision \
--head REVISION_HERE \ --head REVISION_HERE \
--autogenerate \ --autogenerate \
-m "YOUR_PLUGIN_NAME: Change explaination here." -m "YOUR_PLUGIN_NAME: Change explanation here."
Once again, this will dump the migration into the wrong place, so move Once again, this will dump the migration into the wrong place, so move
to your plugin's migrations directory. Open the file, adjust to your plugin's migrations directory. Open the file, adjust
accordingly, and read carefully! Now you should also test your accordingly, and read carefully! Now you should also test your
migration with some real data. Be sure to test it both on sqlite migration with some real data. Be sure to test it both on SQLite
*AND* on postgresql! *AND* on PostgreSQL!
One last *very critical* note: you must never, never modify core One last *very critical* note: you must never, never modify core
tables with your plugin. To do that is to put you and all your users tables with your plugin. To do that is to put you and all your users

View File

@ -28,7 +28,7 @@ What hooks are available?
This hook is used by ``add_media_to_collection`` This hook is used by ``add_media_to_collection``
in ``mediagoblin.user_pages.lib``. in ``mediagoblin.user_pages.lib``.
It gets a ``CollectionItem`` as its argument. It gets a ``CollectionItem`` as its argument.
It's the newly created item just before getting commited. It's the newly created item just before getting committed.
So the item can be modified by the hook, if needed. So the item can be modified by the hook, if needed.
Changing the session regarding this item is currently Changing the session regarding this item is currently
undefined behaviour, as the SQL Session might contain other undefined behaviour, as the SQL Session might contain other

View File

@ -19,7 +19,7 @@ Here's a brief guide to writing unit tests for plugins. However, it
isn't really ideal. It also hasn't been well tested... yes, there's isn't really ideal. It also hasn't been well tested... yes, there's
some irony there :) some irony there :)
Some notes: we're using py.test and webtest for unit testing stuff. Some notes: we're using py.test and WebTest for unit testing stuff.
Keep that in mind. Keep that in mind.
My suggestion is to mime the behavior of `mediagoblin/tests/` and put My suggestion is to mime the behavior of `mediagoblin/tests/` and put
@ -44,7 +44,7 @@ In any test module in your tests directory you can then do::
# real code goes here # real code goes here
pass pass
And you'll get a mediagoblin application wrapped in webtest passed in And you'll get a MediaGoblin application wrapped in WebTest passed in
to your environment. to your environment.
If your plugin needs to define multiple configuration setups, you can If your plugin needs to define multiple configuration setups, you can
@ -52,8 +52,8 @@ actually set up multiple fixtures very easily for this. You can just
set up multiple fixtures with different names that point to different set up multiple fixtures with different names that point to different
configs and pass them in as that named argument. configs and pass them in as that named argument.
To run the tests, from mediagoblin's directory (make sure that your To run the tests, from MediaGoblin's directory (make sure that your
plugin has been added to your mediagoblin checkout's virtualenv!) do:: plugin has been added to your MediaGoblin checkout's virtualenv!) do::
./runtests.sh /path/to/myplugin/tests/ ./runtests.sh /path/to/myplugin/tests/

View File

@ -65,14 +65,14 @@ The above is an example of a very simple metadata.csv file. The batchaddmedia
script would read this and attempt to upload only two pieces of media, and would script would read this and attempt to upload only two pieces of media, and would
be able to automatically name them appropriately. be able to automatically name them appropriately.
The csv file The CSV file
============ ============
The location column The location column
------------------- -------------------
The location column is the one column that is absolutely necessary for The location column is the one column that is absolutely necessary for
uploading your media. This gives a path to each piece of media you upload. This uploading your media. This gives a path to each piece of media you upload. This
can either a path to a local file or a direct link to remote media (with the can either a path to a local file or a direct link to remote media (with the
link in http format). As you can see in the example above the (fake) media was link in HTTP format). As you can see in the example above the (fake) media was
stored remotely on "www.example.net". stored remotely on "www.example.net".
Other internal nodes Other internal nodes
@ -83,8 +83,8 @@ provide default information for your media entry, but as you'll see below, it's
just as easy to provide this information through the correct metadata columns. just as easy to provide this information through the correct metadata columns.
- **id** is used to identify the media entry to the user in case of an error in the batchaddmedia script. - **id** is used to identify the media entry to the user in case of an error in the batchaddmedia script.
- **license** is used to set a license for your piece a media for mediagoblin's use. This must be a URI. - **license** is used to set a license for your piece a media for MediaGoblin's use. This must be a URI.
- **title** will set the title displayed to mediagoblin users. - **title** will set the title displayed to MediaGoblin users.
- **description** will set a description of your media. - **description** will set a description of your media.
Metadata columns Metadata columns
@ -106,7 +106,7 @@ information of uploaded media entries.
- **dc:title** sets a title for your media entry. - **dc:title** sets a title for your media entry.
- **dc:description** sets a description of your media entry. - **dc:description** sets a description of your media entry.
If both a metadata column and an internal node for the title are provided, mediagoblin If both a metadata column and an internal node for the title are provided, MediaGoblin
will use the internal node as the media entry's display name. This makes it so will use the internal node as the media entry's display name. This makes it so
that if you want to display a piece of media with a different title that if you want to display a piece of media with a different title
than the one provided in its metadata, you can just provide different data for than the one provided in its metadata, you can just provide different data for

View File

@ -39,12 +39,12 @@ paste.ini
<http://pythonpaste.org/script/>`_). It also sets up some <http://pythonpaste.org/script/>`_). It also sets up some
middleware that you can mostly ignore, except to configure middleware that you can mostly ignore, except to configure
sessions... more on that later. If you are adding a different 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. it here. You probably won't need to change this file very much.
There's one more file that you certainly won't change unless you're There's one more file that you certainly won't change unless you're
making coding contributions to mediagoblin, but which can be useful to making coding contributions to MediaGoblin, but which can be useful to
read and reference: read and reference:
mediagoblin/config_spec.ini mediagoblin/config_spec.ini
@ -128,7 +128,7 @@ If you use ``lazyserver.sh`` you need to change the ``paste.ini`` file::
[app:mediagoblin] [app:mediagoblin]
/mgoblin_media = /var/mediagoblin/user_data /mgoblin_media = /var/mediagoblin/user_data
If you use nginx you need to change the config:: If you use Nginx you need to change the config::
# Instance specific media: # Instance specific media:
location /mgoblin_media/ { location /mgoblin_media/ {

View File

@ -25,7 +25,7 @@ will take you step-by-step through setting up your own instance of MediaGoblin.
Of course, when it comes to setting up web applications like MediaGoblin, Of course, when it comes to setting up web applications like MediaGoblin,
there's an almost infinite way to deploy things, so for now, we'll keep it there's an almost infinite way to deploy things, so for now, we'll keep it
simple with some assumptions. We recommend a setup that combines MediaGoblin + simple with some assumptions. We recommend a setup that combines MediaGoblin +
virtualenv + fastcgi + nginx on a .deb- or .rpm-based GNU/Linux distro. virtualenv + FastCGI + Nginx on a .deb- or .rpm-based GNU/Linux distro.
Other deployment options (e.g., deploying on FreeBSD, Arch Linux, using Other deployment options (e.g., deploying on FreeBSD, Arch Linux, using
Apache, etc.) are possible, though! If you'd prefer a different deployment Apache, etc.) are possible, though! If you'd prefer a different deployment
@ -94,7 +94,7 @@ Configure PostgreSQL
For medium to large deployments we recommend PostgreSQL. For medium to large deployments we recommend PostgreSQL.
If you don't want/need postgres, skip this section. If you don't want/need PostgreSQL, skip this section.
These are the packages needed for Debian Jessie (stable):: These are the packages needed for Debian Jessie (stable)::
@ -105,7 +105,7 @@ These are the packages needed for an RPM-based system::
sudo yum install postgresql postgresql-server python-psycopg2 sudo yum install postgresql postgresql-server python-psycopg2
An rpm-based system also requires that you initialize and start the An rpm-based system also requires that you initialize and start the
PostgresSQL database with a few commands. The following commands are PostgreSQL database with a few commands. The following commands are
not needed on a Debian-based platform, however:: not needed on a Debian-based platform, however::
sudo /usr/bin/postgresql-setup initdb sudo /usr/bin/postgresql-setup initdb
@ -113,8 +113,8 @@ not needed on a Debian-based platform, however::
sudo systemctl start postgresql sudo systemctl start postgresql
The installation process will create a new *system* user named ``postgres``, The installation process will create a new *system* user named ``postgres``,
which will have privilegies sufficient to manage the database. We will create a which will have privileges sufficient to manage the database. We will create a
new database user with restricted privilegies and a new database owned by our new database user with restricted privileges and a new database owned by our
restricted database user for our MediaGoblin instance. restricted database user for our MediaGoblin instance.
In this example, the database user will be ``mediagoblin`` and the database In this example, the database user will be ``mediagoblin`` and the database
@ -200,10 +200,10 @@ Create a MediaGoblin Directory
You should create a working directory for MediaGoblin. This document You should create a working directory for MediaGoblin. This document
assumes your local git repository will be located at assumes your local git repository will be located at
``/srv/mediagoblin.example.org/mediagoblin/``. ``/srv/mediagoblin.example.org/mediagoblin/``.
Substitute your prefered local deployment path as needed. Substitute your preferred local deployment path as needed.
Setting up the working directory requires that we first create the directory Setting up the working directory requires that we first create the directory
with elevated priviledges, and then assign ownership of the directory with elevated privileges, and then assign ownership of the directory
to the unprivileged system account. to the unprivileged system account.
To do this, enter the following command, changing the defaults to suit your To do this, enter the following command, changing the defaults to suit your
@ -325,13 +325,13 @@ Then edit mediagoblin_local.ini:
the sender for system-generated emails the sender for system-generated emails
- Edit ``direct_remote_path``, ``base_dir``, and ``base_url`` if - Edit ``direct_remote_path``, ``base_dir``, and ``base_url`` if
your mediagoblin directory is not the root directory of your your mediagoblin directory is not the root directory of your
vhost. site.
Configure MediaGoblin to use the PostgreSQL database Configure MediaGoblin to use the PostgreSQL database
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you are using postgres, edit the ``[mediagoblin]`` section in your If you are using PostgreSQL, edit the ``[mediagoblin]`` section in your
``mediagoblin_local.ini`` and put in:: ``mediagoblin_local.ini`` and put in::
sql_engine = postgresql:///mediagoblin sql_engine = postgresql:///mediagoblin
@ -361,7 +361,7 @@ test the deployment with the following command::
You should be able to connect to the machine on port 6543 in your You should be able to connect to the machine on port 6543 in your
browser to confirm that the service is operable. browser to confirm that the service is operable.
The next series of commands will need to be run as a priviledged user. Type The next series of commands will need to be run as a privileged user. Type
exit to return to the root/sudo account.:: exit to return to the root/sudo account.::
exit exit
@ -372,9 +372,9 @@ exit to return to the root/sudo account.::
FastCGI and nginx FastCGI and nginx
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
This configuration example will use nginx, however, you may This configuration example will use Nginx, however, you may
use any webserver of your choice as long as it supports the FastCGI 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 protocol. If you do not already have a web server, consider Nginx, as
the configuration files may be more clear than the the configuration files may be more clear than the
alternatives. alternatives.
@ -397,7 +397,7 @@ following commands::
sudo systemctl enable nginx sudo systemctl enable nginx
You can modify these commands and locations depending on your preferences and You can modify these commands and locations depending on your preferences and
the existing configuration of your nginx instance. The contents of the existing configuration of your Nginx instance. The contents of
this ``nginx.conf`` file should be modeled on the following:: this ``nginx.conf`` file should be modeled on the following::
server { server {
@ -457,7 +457,7 @@ this ``nginx.conf`` file should be modeled on the following::
fastcgi_pass 127.0.0.1:26543; fastcgi_pass 127.0.0.1:26543;
include /etc/nginx/fastcgi_params; include /etc/nginx/fastcgi_params;
# our understanding vs nginx's handling of script_name vs # our understanding vs Nginx's handling of script_name vs
# path_info don't match :) # path_info don't match :)
fastcgi_param PATH_INFO $fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param SCRIPT_NAME ""; fastcgi_param SCRIPT_NAME "";
@ -481,8 +481,8 @@ test to ensure that this configuration works::
nginx -t nginx -t
If you encounter any errors, review your nginx configuration files, and try to If you encounter any errors, review your Nginx configuration files, and try to
resolve them. If you do not encounter any errors, you can start your nginx resolve them. If you do not encounter any errors, you can start your Nginx
server with one of the following commands (depending on your environment):: server with one of the following commands (depending on your environment)::
sudo /etc/init.d/nginx restart sudo /etc/init.d/nginx restart
@ -529,7 +529,7 @@ a) Disable registration on your instance and just make
[mediagoblin] [mediagoblin]
allow_registration = false allow_registration = false
b) Enable a captcha plugin. But unfortunately, though some captcha b) Enable a CAPTCHA plugin. But unfortunately, though some CAPTCHA
plugins exist, for various reasons we do not have any general plugins exist, for various reasons we do not have any general
recommendations we can make at this point. recommendations we can make at this point.

View File

@ -19,10 +19,10 @@ Media Types
In the future, there will be all sorts of media types you can enable, In the future, there will be all sorts of media types you can enable,
but in the meanwhile there are six additional media types: video, audio, but in the meanwhile there are six additional media types: video, audio,
raw image, ascii art, STL/3d models, PDF and Document. raw image, ASCII art, STL/3D models, PDF and Document.
First, you should probably read ":doc:`configuration`" to make sure First, you should probably read ":doc:`configuration`" to make sure
you know how to modify the mediagoblin config file. you know how to modify the MediaGoblin config file.
Enabling Media Types Enabling Media Types
==================== ====================
@ -30,7 +30,7 @@ Enabling Media Types
.. note:: .. note::
Media types are now plugins Media types are now plugins
Media types are enabled in your mediagoblin configuration file, typically it is Media types are enabled in your MediaGoblin configuration file, typically it is
created by copying ``mediagoblin.ini`` to ``mediagoblin_local.ini`` and then created by copying ``mediagoblin.ini`` to ``mediagoblin_local.ini`` and then
applying your changes to ``mediagoblin_local.ini``. If you don't already have a applying your changes to ``mediagoblin_local.ini``. If you don't already have a
``mediagoblin_local.ini``, create one in the way described. ``mediagoblin_local.ini``, create one in the way described.
@ -81,8 +81,8 @@ instance the ``video`` media type configuration can be found in
Video Video
===== =====
To enable video, first install gstreamer and the python-gstreamer To enable video, first install GStreamer and the python-gstreamer
bindings (as well as whatever gstremaer extensions you want, bindings (as well as whatever GStreamer extensions you want,
good/bad/ugly). On Debianoid systems good/bad/ugly). On Debianoid systems
.. code-block:: bash .. code-block:: bash
@ -107,7 +107,7 @@ Run
./bin/gmg dbupdate ./bin/gmg dbupdate
Now you should be able to submit videos, and mediagoblin should Now you should be able to submit videos, and MediaGoblin should
transcode them. transcode them.
.. note:: .. note::
@ -121,8 +121,8 @@ transcode them.
Audio Audio
===== =====
To enable audio, install the gstreamer and python-gstreamer bindings (as well To enable audio, install the GStreamer and python-gstreamer bindings (as well
as whatever gstreamer plugins you want, good/bad/ugly), scipy and numpy are as whatever GStreamer plugins you want, good/bad/ugly), SciPy and NumPy are
also needed for the audio spectrograms. also needed for the audio spectrograms.
To install these on Debianoid systems, run:: To install these on Debianoid systems, run::
@ -168,16 +168,16 @@ Run
./bin/gmg dbupdate ./bin/gmg dbupdate
Now you should be able to submit raw images, and mediagoblin should Now you should be able to submit raw images, and MediaGoblin should
extract the JPEG preview from them. extract the JPEG preview from them.
Ascii art ASCII art
========= =========
To enable ascii art support, first install the To enable ASCII art support, first install the
`chardet <http://pypi.python.org/pypi/chardet>`_ `chardet <http://pypi.python.org/pypi/chardet>`_
library, which is necessary for creating thumbnails of ascii art library, which is necessary for creating thumbnails of ASCII art
.. code-block:: bash .. code-block:: bash
@ -194,14 +194,14 @@ Run
./bin/gmg dbupdate ./bin/gmg dbupdate
Now any .txt file you uploaded will be processed as ascii art! Now any .txt file you uploaded will be processed as ASCII art!
STL / 3d model support STL / 3D model support
====================== ======================
To enable the "STL" 3d model support plugin, first make sure you have To enable the "STL" 3D model support plugin, first make sure you have
a recentish `Blender <http://blender.org>`_ installed and available on a recent `Blender <http://blender.org>`_ installed and available on
your execution path. This feature has been tested with Blender 2.63. your execution path. This feature has been tested with Blender 2.63.
It may work on some earlier versions, but that is not guaranteed (and It may work on some earlier versions, but that is not guaranteed (and
is surely not to work prior to Blender 2.5X). is surely not to work prior to Blender 2.5X).
@ -223,9 +223,9 @@ PDF and Document
To enable the "PDF and Document" support plugin, you need: To enable the "PDF and Document" support plugin, you need:
1. pdftocairo and pdfinfo for pdf only support. 1. pdftocairo and pdfinfo for PDF only support.
2. unoconv with headless support to support converting libreoffice supported 2. unoconv with headless support to support converting LibreOffice supported
documents as well, such as doc/ppt/xls/odf/odg/odp and more. documents as well, such as doc/ppt/xls/odf/odg/odp and more.
For the full list see mediagoblin/media_types/pdf/processing.py, For the full list see mediagoblin/media_types/pdf/processing.py,
unoconv_supported. unoconv_supported.
@ -238,7 +238,7 @@ To install this on Fedora:
sudo yum install -y poppler-utils unoconv libreoffice-headless sudo yum install -y poppler-utils unoconv libreoffice-headless
Note: You can leave out unoconv and libreoffice-headless if you want only pdf Note: You can leave out unoconv and libreoffice-headless if you want only PDF
support. This will result in a much smaller list of dependencies. support. This will result in a much smaller list of dependencies.
pdf.js relies on git submodules, so be sure you have fetched them: pdf.js relies on git submodules, so be sure you have fetched them:
@ -271,7 +271,7 @@ Blog (HIGHLY EXPERIMENTAL)
MediaGoblin has a blog media type, which you might notice by looking MediaGoblin has a blog media type, which you might notice by looking
through the docs! However, it is *highly experimental*. We have not through the docs! However, it is *highly experimental*. We have not
security reviewed this, and it acts in a way that is not like normal security reviewed this, and it acts in a way that is not like normal
blogs (the blogposts are themselves media types!). blogs (the blog posts are themselves media types!).
So you can play with this, but it is not necessarily recommended yet So you can play with this, but it is not necessarily recommended yet
for production use! :) for production use! :)

View File

@ -111,7 +111,7 @@ Check the plugin's documentation for what configuration options are
available. available.
Once you've set up your plugin, you should be sure to update the Once you've set up your plugin, you should be sure to update the
database to accomodate the new plugins:: database to accommodate the new plugins::
./bin/gmg dbupdate ./bin/gmg dbupdate
@ -121,7 +121,7 @@ Deactivating plugins
You should be aware that once you enable a plugin, deactivating it You should be aware that once you enable a plugin, deactivating it
might be a bit tricky, for migrations reasons. In the future we may might be a bit tricky, for migrations reasons. In the future we may
produce better tooling to accomodate this. In short, you will need to produce better tooling to accommodate this. In short, you will need to
do a bit of database surgery by: do a bit of database surgery by:
- Removing all tables and indexes installed by the plugin - Removing all tables and indexes installed by the plugin

View File

@ -24,10 +24,10 @@ Deploy with paste
The MediaGoblin WSGI application instance you get with ``./lazyserver.sh`` is The MediaGoblin WSGI application instance you get with ``./lazyserver.sh`` is
not ideal for a production MediaGoblin deployment. Ideally, you should be able not ideal for a production MediaGoblin deployment. Ideally, you should be able
to use a systemd service file or an init script to launch and restart the to use a Systemd service file or an init script to launch and restart the
MediaGoblin process. MediaGoblin process.
We will explore setting up MediaGoblin systemd service files and init scripts, We will explore setting up MediaGoblin Systemd service files and init scripts,
but first we need to create the directory that will store the MediaGoblin logs. but first we need to create the directory that will store the MediaGoblin logs.
@ -45,10 +45,10 @@ proper permissions::
.. _systemd-service-files: .. _systemd-service-files:
Use systemd service files Use Systemd service files
------------------------- -------------------------
If your operating system uses systemd, you can use systemd ``service files`` If your operating system uses Systemd, you can use Systemd ``service files``
to manage both the Celery and Paste processes. Place the following service to manage both the Celery and Paste processes. Place the following service
files in the ``/etc/systemd/system/`` directory. files in the ``/etc/systemd/system/`` directory.
@ -62,7 +62,7 @@ modify it to suit your environment's setup:
# If using Fedora/CentOS/Red Hat, mkdir and chown are located in /usr/bin/mkdir and /usr/bin/chown, respectively. # If using Fedora/CentOS/Red Hat, mkdir and chown are located in /usr/bin/mkdir and /usr/bin/chown, respectively.
[Unit] [Unit]
Description=Mediagoblin Celeryd Description=MediaGoblin Celeryd
[Service] [Service]
User=mediagoblin User=mediagoblin
@ -156,7 +156,7 @@ processes again.
Use an init script Use an init script
------------------ ------------------
If your system does not use systemd, you can use the following command as the If your system does not use Systemd, you can use the following command as the
basis for an init script: basis for an init script:
.. code-block:: bash .. code-block:: bash
@ -244,7 +244,7 @@ To launch Celery separately from the MediaGoblin WSGI application:
CELERY_CONFIG_MODULE=mediagoblin.init.celery.from_celery ./bin/celeryd CELERY_CONFIG_MODULE=mediagoblin.init.celery.from_celery ./bin/celeryd
If you use our example systemd ``service files``, Celery will be set to the If you use our example Systemd ``service files``, Celery will be set to the
"CELERY_ALWAYS_EAGER=false" value by default. This will provide your users "CELERY_ALWAYS_EAGER=false" value by default. This will provide your users
with the best user experience, as all media processing will be done in the with the best user experience, as all media processing will be done in the
background. background.

View File

@ -27,7 +27,7 @@ carefully, or at least skim over it.
running migrations! That way if something goes wrong, we can fix running migrations! That way if something goes wrong, we can fix
things! things!
And be sure to shut down your current mediagoblin/celery processes And be sure to shut down your current MediaGoblin/Celery processes
before upgrading! before upgrading!
.. note:: .. note::
@ -162,11 +162,11 @@ prior upgrade guides!
Additionally: Additionally:
- Are you using audio or video media types? In that case, you'll need - Are you using audio or video media types? In that case, you'll need
to update your Gstreamer instance to 1.0. to update your GStreamer instance to 1.0.
- The Pump API needs some data passed through to the WSGI application, - The Pump API needs some data passed through to the WSGI application,
so if you are using apache with mod_wsgi you should be sure to make so if you are using Apache with mod_wsgi you should be sure to make
sure to add "WSGIPassAuthorization On" to your config. (Using the sure to add "WSGIPassAuthorization On" to your config. (Using the
default MediaGoblin documnetation and config, things should work default MediaGoblin documentation and config, things should work
as-is.) as-is.)
@ -181,12 +181,12 @@ Additionally:
- Clearer documentation on permissions and installation - Clearer documentation on permissions and installation
- Switched from Transifex, which had become proprietary, to an - Switched from Transifex, which had become proprietary, to an
instance of Pootle hosted for GNU instance of Pootle hosted for GNU
- Moved to Gstreamer 1.0! This also adds a new thumbnailer which - Moved to GStreamer 1.0! This also adds a new thumbnailer which
gives much better results in gives much better results in
- Removed terrible check-javascript-dependencies-into-your-application - Removed terrible check-JavaScript-dependencies-into-your-application
setup, now using Bower for dependency tracking setup, now using Bower for dependency tracking
- Put some scaffolding in place for Alembic, which will be used for - Put some scaffolding in place for Alembic, which will be used for
future mitration work future migration work
- Automatically create a fresh mediagoblin.ini from - Automatically create a fresh mediagoblin.ini from
mediagoblin.ini.example mediagoblin.ini.example
- no more need for mediagoblin_local.ini (though it's still supported) - no more need for mediagoblin_local.ini (though it's still supported)
@ -199,7 +199,7 @@ Additionally:
This is a purely bugfix release. Important changes happened since This is a purely bugfix release. Important changes happened since
0.7.0; if running MediaGoblin 0.7.0, an upgrade is highly recommended; 0.7.0; if running MediaGoblin 0.7.0, an upgrade is highly recommended;
see below. This release is especially useful if you have been running see below. This release is especially useful if you have been running
postgres and have been receiving seemingly random database transaction PostgreSQL and have been receiving seemingly random database transaction
errors. errors.
**Do this to upgrade** **Do this to upgrade**
@ -220,9 +220,9 @@ That's it, probably! If you run into problems, don't hesitate to
database transaction issues. (These should be back by 0.8.0.) database transaction issues. (These should be back by 0.8.0.)
+ Disabled the "checking if the database is up to date at + Disabled the "checking if the database is up to date at
mediagoblin startup" feature MediaGoblin startup" feature
+ Disabled the garbage collection stuff by default for now + Disabled the garbage collection stuff by default for now
(You can set garbage_collection under the config mediagoblin (You can set garbage_collection under the config MediaGoblin
header to something other than 0 to turn it back on for now, but header to something other than 0 to turn it back on for now, but
it's potentially risky for the moment.) it's potentially risky for the moment.)
@ -231,7 +231,7 @@ That's it, probably! If you run into problems, don't hesitate to
- Added support for cr2 files in raw_image media type - Added support for cr2 files in raw_image media type
- Added a description to setup.py - Added a description to setup.py
- Collection and CollectionItem objects now have nicer in-python representations - Collection and CollectionItem objects now have nicer in-python representations
- Fixed unicode error with raw image mediatype logging - Fixed Unicode error with raw image mediatype logging
- Fixed #945 "Host metadata does not confirm to spec (/.well-known/meta-data)" - Fixed #945 "Host metadata does not confirm to spec (/.well-known/meta-data)"
+ Add XRD+XML formatting for /.well-known/host-meta + Add XRD+XML formatting for /.well-known/host-meta
@ -268,7 +268,7 @@ That's it, probably! If you run into problems, don't hesitate to
(which will be the foundation for MediaGoblin's federation) (which will be the foundation for MediaGoblin's federation)
- New theme: Sandy 70s Speedboat! - New theme: Sandy 70s Speedboat!
- Metadata features! We also now have a json-ld context. - Metadata features! We also now have a JSON-LD context.
- Many improvements for archival institutions, including metadata - Many improvements for archival institutions, including metadata
support and featuring items on the homepage. With the (new!) support and featuring items on the homepage. With the (new!)
@ -283,7 +283,7 @@ That's it, probably! If you run into problems, don't hesitate to
uploading many files at once. This is aimed to be useful for uploading many files at once. This is aimed to be useful for
archival institutions and groups where there is an already existing archival institutions and groups where there is an already existing
and large set of available media that needs to be included. and large set of available media that needs to be included.
- Speaking of, the call to postgres in the makefile is fixed. - Speaking of, the call to PostgreSQL in the makefile is fixed.
- We have a new, generic media-page context hook that allows for - We have a new, generic media-page context hook that allows for
adding context depending on the type of media. adding context depending on the type of media.
- Tired of video thumbnails breaking during processing all the time? - Tired of video thumbnails breaking during processing all the time?
@ -310,10 +310,10 @@ That's it, probably! If you run into problems, don't hesitate to
data. It's basically the same thing as before, but packaged data. It's basically the same thing as before, but packaged
separately from MediaGoblin. separately from MediaGoblin.
- Many improvements to internationalization. Also (still rudimentary, - Many improvements to internationalization. Also (still rudimentary,
but existant!) RTL language support! but existent!) RTL language support!
**Known issues:** **Known issues:**
- The host-meta is now json by default; in the spec it should be xml by - The host-meta is now JSON by default; in the spec it should be XML by
default. We have done this because of compatibility with the pump default. We have done this because of compatibility with the pump
API. We are checking with upstream to see if there is a way to API. We are checking with upstream to see if there is a way to
resolve this discrepancy. resolve this discrepancy.
@ -360,7 +360,7 @@ nickname "Lore of the Admin"!
- New tools to control how much users can upload, both as a general - New tools to control how much users can upload, both as a general
user limit, or per file. user limit, or per file.
You can set this with the following options in your mediagoblin You can set this with the following options in your MediaGoblin
config file: `upload_limit` and `max_file_size`. Both are integers config file: `upload_limit` and `max_file_size`. Both are integers
in megabytes. in megabytes.
@ -368,7 +368,7 @@ nickname "Lore of the Admin"!
upload too, though an interface for this is not yet exposed. See upload too, though an interface for this is not yet exposed. See
the "uploaded" field on the core__users table. the "uploaded" field on the core__users table.
- MediaGoblin now contains an authentication plugin for ldap! You - MediaGoblin now contains an authentication plugin for LDAP! You
can turn on the mediagoblin.plugins.ldap plugin to make use of can turn on the mediagoblin.plugins.ldap plugin to make use of
this. See the documentation: :ref:`ldap-plugin` this. See the documentation: :ref:`ldap-plugin`
@ -423,8 +423,8 @@ v0.5.1 is a bugfix release... the steps are the same as for 0.5.1.
===== =====
**NOTE:** If using the API is important to you, we're in a state of **NOTE:** If using the API is important to you, we're in a state of
ransition towards a new API via the Pump API. As such, though the old transition towards a new API via the Pump API. As such, though the old
API still probably works, some changes have happened to the way oauth API still probably works, some changes have happened to the way OAuth
works to make it more Pump-compatible. If you're heavily using works to make it more Pump-compatible. If you're heavily using
clients using the old API, you may wish to hold off on upgrading for clients using the old API, you may wish to hold off on upgrading for
now. Otherwise, jump in and have fun! :) now. Otherwise, jump in and have fun! :)
@ -469,21 +469,21 @@ If you run into problems, don't hesitate to
* Comment preview! * Comment preview!
* Users now have the ability to change their email associated with their * Users now have the ability to change their email associated with their
account. account.
* New oauth code as we move closer to federation support. * New OAuth code as we move closer to federation support.
* Experimental pyconfigure support for GNU-style configue and makefile * Experimental pyconfigure support for GNU-style configure and makefile
deployment. deployment.
* Database foundations! You can now pre-populate the database models. * Database foundations! You can now pre-populate the database models.
* Way faster unit test run-time via in-memory database. * Way faster unit test run-time via in-memory database.
* All mongokit stuff has been cleaned up. * All mongokit stuff has been cleaned up.
* Fixes for non-ascii filenames. * Fixes for non-ASCII filenames.
* The option to stay logged in. * The option to stay logged in.
* Mediagoblin has been upgraded to use the latest `celery <http://celeryproject.org/>`_ * MediaGoblin has been upgraded to use the latest `Celery <http://celeryproject.org/>`_
version. version.
* You can now add jinja2 extensions to your config file to use in custom * You can now add jinja2 extensions to your config file to use in custom
templates. templates.
* Fixed video permission issues. * Fixed video permission issues.
* Mediagoblin docs are now hosted with multiple versions. * MediaGoblin docs are now hosted with multiple versions.
* We removed redundent tooltips from the STL media display. * We removed redundant tooltips from the STL media display.
* We are now using itsdangerous for verification tokens. * We are now using itsdangerous for verification tokens.
@ -495,7 +495,7 @@ fix in the newly released document support which prevented the
"conversion via libreoffice" feature. "conversion via libreoffice" feature.
If you were running 0.4.0 you can upgrade to v0.4.1 via a simple If you were running 0.4.0 you can upgrade to v0.4.1 via a simple
switch and restarting mediagoblin/celery with no other actions. switch and restarting MediaGoblin/Celery with no other actions.
Otherwise, follow 0.4.0 instructions. Otherwise, follow 0.4.0 instructions.
@ -514,7 +514,7 @@ Otherwise, follow 0.4.0 instructions.
Keep on reading to hear more about new plugin features. Keep on reading to hear more about new plugin features.
4. If you want to take advantage of new plugins that have statically 4. If you want to take advantage of new plugins that have statically
served assets, you are going to need to add the new "plugin_static" served assets, you are going to need to add the new "plugin_static"
section to your nginx config. Basically the following for nginx:: section to your Nginx config. Basically the following for Nginx::
# Plugin static files (usually symlinked in) # Plugin static files (usually symlinked in)
location /plugin_static/ { location /plugin_static/ {
@ -557,7 +557,7 @@ please note the following:
date of an image when available (available as the date of an image when available (available as the
"original_date_visible" variable) "original_date_visible" variable)
* Moved unit testing system from nosetests to py.test so we can better * Moved unit testing system from nosetests to py.test so we can better
handle issues with sqlalchemy exploding with different database handle issues with SQLAlchemy exploding with different database
configurations. Long story :) configurations. Long story :)
* You can now disable the ability to post comments. * You can now disable the ability to post comments.
* Tags now can be up to length 255 characters by default. * Tags now can be up to length 255 characters by default.
@ -587,7 +587,7 @@ you run into problems, don't hesitate to
* New dropdown menu for accessing various features. * New dropdown menu for accessing various features.
* Significantly improved URL generation. Now mediagoblin won't give * Significantly improved URL generation. Now MediaGoblin won't give
up on making a slug if it looks like there will be a duplicate; up on making a slug if it looks like there will be a duplicate;
it'll try extra hard to generate a meaningful one instead. it'll try extra hard to generate a meaningful one instead.
@ -595,13 +595,13 @@ you run into problems, don't hesitate to
linking to a slug; /u/username/m/id:35/ is the kind of reference we linking to a slug; /u/username/m/id:35/ is the kind of reference we
now use to linking to entries with ids. However, old links with now use to linking to entries with ids. However, old links with
entries that linked to ids should work just fine with our migration. entries that linked to ids should work just fine with our migration.
The only urls that might break in this release are ones using colons The only URLs that might break in this release are ones using colons
or equal signs. or equal signs.
* New template hooks for plugin authoring. * New template hooks for plugin authoring.
* As a demonstration of new template hooks for plugin authoring, * As a demonstration of new template hooks for plugin authoring,
openstreetmap support now moved to a plugin! OpenStreetMap support now moved to a plugin!
* Method to add media to collections switched from icon of paperclip * Method to add media to collections switched from icon of paperclip
to button with "add to collection" text. to button with "add to collection" text.
@ -612,9 +612,9 @@ you run into problems, don't hesitate to
waste gobs of memory. waste gobs of memory.
* Video transcoding now optional for videos that meet certain * Video transcoding now optional for videos that meet certain
criteria. By default, MediaGoblin will not transcode webm videos criteria. By default, MediaGoblin will not transcode WebM videos
that are smaller in resolution than the MediaGoblin defaults, and that are smaller in resolution than the MediaGoblin defaults, and
MediaGoblin can also be configured to allow theora files to not be MediaGoblin can also be configured to allow Theora files to not be
transcoded as well. transcoded as well.
* Per-user license preference option; always want your uploads to be * Per-user license preference option; always want your uploads to be
@ -644,7 +644,7 @@ MongoDB-based MediaGoblin instance to the newer SQL-based system.
**Do this to upgrade** **Do this to upgrade**
# directory of your mediagoblin install # directory of your MediaGoblin install
cd /srv/mediagoblin.example.org cd /srv/mediagoblin.example.org
# copy source for this release # copy source for this release
@ -664,13 +664,13 @@ MongoDB-based MediaGoblin instance to the newer SQL-based system.
* **3d model support!** * **3d model support!**
You can now upload STL and OBJ files and display them in You can now upload STL and OBJ files and display them in
MediaGoblin. Requires a recent-ish Blender; for details see: MediaGoblin. Requires a recent Blender; for details see:
:ref:`deploying-chapter` :ref:`deploying-chapter`
* **trim_whitespace** * **trim_whitespace**
We bundle the optional plugin trim_whitespace which reduces the size We bundle the optional plugin trim_whitespace which reduces the size
of the delivered html output by reducing redundant whitespace. of the delivered HTML output by reducing redundant whitespace.
See :ref:`core-plugin-section` for plugin documentation See :ref:`core-plugin-section` for plugin documentation
@ -684,7 +684,7 @@ MongoDB-based MediaGoblin instance to the newer SQL-based system.
and `OMGMG <https://github.com/jwandborg/omgmg>`_, an example of and `OMGMG <https://github.com/jwandborg/omgmg>`_, an example of
a web application hooking up to the API. a web application hooking up to the API.
This is a plugin, so you have to enable it in your mediagoblin This is a plugin, so you have to enable it in your MediaGoblin
config file by adding a section under [plugins] like:: config file by adding a section under [plugins] like::
[plugins] [plugins]
@ -697,7 +697,7 @@ MongoDB-based MediaGoblin instance to the newer SQL-based system.
For applications that use OAuth to connect to the API. For applications that use OAuth to connect to the API.
This is a plugin, so you have to enable it in your mediagoblin This is a plugin, so you have to enable it in your MediaGoblin
config file by adding a section under [plugins] like:: config file by adding a section under [plugins] like::
[plugins] [plugins]
@ -717,7 +717,7 @@ MongoDB-based MediaGoblin instance to the newer SQL-based system.
Geolocation is also now on by default. Geolocation is also now on by default.
* **Miscelaneous visual improvements** * **Miscellaneous visual improvements**
We've made a number of small visual improvements including newer and We've made a number of small visual improvements including newer and
nicer looking thumbnails and improved checkbox placement. nicer looking thumbnails and improved checkbox placement.
@ -732,7 +732,7 @@ MongoDB-based MediaGoblin instance to the newer SQL-based system.
1. Make sure to run ``bin/gmg dbuptdate`` after upgrading. 1. Make sure to run ``bin/gmg dbuptdate`` after upgrading.
2. If you set up your server config with an older version of 2. If you set up your server config with an older version of
mediagoblin and the mediagoblin docs, it's possible you don't MediaGoblin and the MediaGoblin docs, it's possible you don't
have the "theme static files" alias, so double check to make have the "theme static files" alias, so double check to make
sure that section is there if you are having problems. sure that section is there if you are having problems.

View File

@ -73,9 +73,9 @@ want to install this theme! Don't worry, it's fairly painless.
Set up your webserver to serve theme assets Set up your webserver to serve theme assets
------------------------------------------- -------------------------------------------
If you followed the nginx setup example in :ref:`webserver-config` you If you followed the Nginx setup example in :ref:`webserver-config` you
should already have theme asset setup. However, if you set up your should already have theme asset setup. However, if you set up your
server config with an older version of mediagoblin and the mediagoblin server config with an older version of MediaGoblin and the MediaGoblin
docs, it's possible you don't have the "theme static files" alias, so docs, it's possible you don't have the "theme static files" alias, so
double check to make sure that section is there if you are having double check to make sure that section is there if you are having
problems. problems.
@ -103,7 +103,7 @@ Other variables you may consider setting:
`theme_web_path` `theme_web_path`
When theme-specific assets are specified, this is where MediaGoblin When theme-specific assets are specified, this is where MediaGoblin
will set the urls. By default this is ``"/theme_static/"`` so in will set the URLs. By default this is ``"/theme_static/"`` so in
the case that your theme was trying to access its file the case that your theme was trying to access its file
``"images/shiny_button.png"`` MediaGoblin would link ``"images/shiny_button.png"`` MediaGoblin would link
to ``/theme_static/images/shiny_button.png``. to ``/theme_static/images/shiny_button.png``.
@ -136,7 +136,7 @@ if necessary)::
| | |- im_a_hedgehog.png # hedgehog-containing image used by theme | | |- im_a_hedgehog.png # hedgehog-containing image used by theme
| | '- custom_logo.png # your theme's custom logo | | '- custom_logo.png # your theme's custom logo
| '- css/ | '- css/
| '- hedgehog.css # your site's hedgehog-specific css | '- hedgehog.css # your site's hedgehog-specific CSS
|- README.txt # Optionally, a readme file (not required) |- README.txt # Optionally, a readme file (not required)
|- AGPLv3.txt # AGPL license file for your theme. (good practice) |- AGPLv3.txt # AGPL license file for your theme. (good practice)
'- CC0_1.0.txt # CC0 1.0 legalcode for the assets [if appropriate!] '- CC0_1.0.txt # CC0 1.0 legalcode for the assets [if appropriate!]
@ -164,7 +164,7 @@ Only a few things need to go in here::
[theme] [theme]
name = Hedgehog-ification name = Hedgehog-ification
description = For hedgehog lovers ONLY description = For hedgehog lovers ONLY
licensing = AGPLv3 or later templates; assets (images/css) waived under CC0 1.0 licensing = AGPLv3 or later templates; assets (images/CSS) waived under CC0 1.0
The name and description fields here are to give users an idea of what The name and description fields here are to give users an idea of what
your theme is about. For the moment, we don't have any listing your theme is about. For the moment, we don't have any listing
@ -232,7 +232,7 @@ You should include AGPLv3.txt with your theme as this is required for
the assets. You can copy this from ``mediagoblin/licenses/``. the assets. You can copy this from ``mediagoblin/licenses/``.
In the above example, we also use CC0 to waive our copyrights to In the above example, we also use CC0 to waive our copyrights to
images and css, so we also included CC0_1.0.txt images and CSS, so we also included CC0_1.0.txt
A README.txt file A README.txt file
@ -247,7 +247,7 @@ Simple theming by adding CSS
---------------------------- ----------------------------
Many themes won't require anything other than the ability to override Many themes won't require anything other than the ability to override
some of MediaGoblin's core css. Thankfully, doing so is easy if you some of MediaGoblin's core CSS. Thankfully, doing so is easy if you
combine the above steps! combine the above steps!
In your theme, do the following (make sure you make the necessary In your theme, do the following (make sure you make the necessary
@ -260,7 +260,7 @@ Great, now open that file and add something like this at the end::
<link rel="stylesheet" type="text/css" <link rel="stylesheet" type="text/css"
href="{{ request.staticdirect('/css/theme.css', 'theme') }}"/> href="{{ request.staticdirect('/css/theme.css', 'theme') }}"/>
You can name the css file whatever you like. Now make the directory You can name the CSS file whatever you like. Now make the directory
for ``assets/css/`` and add the file ``assets/css/theme.css``. for ``assets/css/`` and add the file ``assets/css/theme.css``.
You can now put custom CSS files in here and any CSS you add will You can now put custom CSS files in here and any CSS you add will

View File

@ -5,7 +5,7 @@
=================== ===================
The basic_auth plugin is enabled by default in mediagoblin.ini. This plugin The basic_auth plugin is enabled by default in mediagoblin.ini. This plugin
provides basic username and password authentication for GNU Mediagoblin. provides basic username and password authentication for GNU MediaGoblin.
This plugin can be enabled alongside :ref:`openid-chapter` and This plugin can be enabled alongside :ref:`openid-chapter` and
:ref:`persona-chapter`. :ref:`persona-chapter`.

View File

@ -57,7 +57,7 @@ Examples: ``flatpages-about``, ``about-view``, ``contact-view``, ...
The value has two parts separated by commas: The value has two parts separated by commas:
1. **route path**: This is the url that this route matches. 1. **route path**: This is the URL that this route matches.
Examples: ``/about``, ``/contact``, ``/pages/about``, ... Examples: ``/about``, ``/contact``, ``/pages/about``, ...
@ -74,7 +74,7 @@ The value has two parts separated by commas:
For example: ``'/siteadmin/{adminname:\w+}'`` For example: ``'/siteadmin/{adminname:\w+}'``
2. **template**: The template to use for this url. The template is in 2. **template**: The template to use for this URL. The template is in
the flatpagesfile template directory, so you just need to specify the flatpagesfile template directory, so you just need to specify
the file name. the file name.
@ -139,10 +139,10 @@ template::
Recipes Recipes
======= =======
Url variables URL variables
------------- -------------
You can handle urls like ``/about/{name}`` and access the name that's You can handle URLs like ``/about/{name}`` and access the name that's
passed in in the template. passed in in the template.
Sample route:: Sample route::

View File

@ -14,16 +14,16 @@
.. _ldap-plugin: .. _ldap-plugin:
============= =============
ldap plugin LDAP plugin
============= =============
.. Warning:: .. Warning::
This plugin is not compatible with the other authentication plugins. This plugin is not compatible with the other authentication plugins.
This plugin allow your GNU Mediagoblin instance to authenticate against an This plugin allow your GNU MediaGoblin instance to authenticate against an
LDAP server. LDAP server.
Set up the ldap plugin Set up the LDAP plugin
====================== ======================
1. Install the ``python-ldap`` package. 1. Install the ``python-ldap`` package.
@ -32,13 +32,13 @@ Set up the ldap plugin
[[mediagoblin.plugins.ldap]] [[mediagoblin.plugins.ldap]]
Configuring the ldap plugin Configuring the LDAP plugin
=========================== ===========================
This plugin allows you to use multiple ldap servers for authentication. This plugin allows you to use multiple LDAP servers for authentication.
In order to configure a server, add the following to you MediaGoblin .ini file In order to configure a server, add the following to you MediaGoblin .ini file
under the ldap plugin:: under the LDAP plugin::
[[mediagoblin.plugins.ldap]] [[mediagoblin.plugins.ldap]]
[[[server1]]] [[[server1]]]
@ -50,15 +50,15 @@ under the ldap plugin::
Make any necessary changes to the above to work with your sever. Make sure Make any necessary changes to the above to work with your sever. Make sure
``{username}`` is where the username should be in LDAP_USER_DN_TEMPLATE. ``{username}`` is where the username should be in LDAP_USER_DN_TEMPLATE.
If you would like to fetch the users email from the ldap server upon account If you would like to fetch the users email from the LDAP server upon account
registration, add ``LDAP_SEARCH_BASE = 'ou=users,dc=testathon,dc=net'`` and registration, add ``LDAP_SEARCH_BASE = 'ou=users,dc=testathon,dc=net'`` and
``EMAIL_SEARCH_FIELD = 'mail'`` under you server configuration in your ``EMAIL_SEARCH_FIELD = 'mail'`` under you server configuration in your
MediaGoblin .ini file. MediaGoblin .ini file.
.. Warning:: .. Warning::
By default, this plugin provides no encryption when communicating with the By default, this plugin provides no encryption when communicating with the
ldap servers. If you would like to use an SSL connection, change LDAP servers. If you would like to use an SSL connection, change
LDAP_SERVER_URI to use ``ldaps://`` and whichever port you use. Default ldap LDAP_SERVER_URI to use ``ldaps://`` and whichever port you use. Default LDAP
port for SSL connections is 636. If you would like to use a TLS connection, port for SSL connections is 636. If you would like to use a TLS connection,
add ``LDAP_START_TLS = 'true'`` under your server configuration in your add ``LDAP_START_TLS = 'true'`` under your server configuration in your
MediaGoblin .ini file. MediaGoblin .ini file.

View File

@ -1,23 +1,23 @@
.. _openid-chapter: .. _openid-chapter:
=================== ===================
openid plugin OpenID plugin
=================== ===================
The openid plugin allows user to login to your GNU Mediagoblin instance using The OpenID plugin allows user to login to your GNU MediaGoblin instance using
their openid url. their OpenID URL.
This plugin can be enabled alongside :ref:`basic_auth-chapter` and This plugin can be enabled alongside :ref:`basic_auth-chapter` and
:ref:`persona-chapter`. :ref:`persona-chapter`.
.. note:: .. note::
When :ref:`basic_auth-chapter` is enabled alongside this openid plugin, and When :ref:`basic_auth-chapter` is enabled alongside this OpenID plugin, and
a user creates an account using their openid. If they would like to add a a user creates an account using their OpenID. If they would like to add a
password to their account, they can use the forgot password feature to do password to their account, they can use the forgot password feature to do
so. so.
Set up the openid plugin Set up the OpenID plugin
============================ ============================
1. Install the ``python-openid`` package. 1. Install the ``python-openid`` package.

View File

@ -2,7 +2,7 @@
Trim whitespace plugin Trim whitespace plugin
======================= =======================
Mediagoblin templates are written with 80 char limit for better MediaGoblin templates are written with 80 char limit for better
readability. However that means that the HTML output is very verbose readability. However that means that the HTML output is very verbose
containing *lots* of whitespace. This plugin inserts a middleware that containing *lots* of whitespace. This plugin inserts a middleware that
filters out whitespace from the returned HTML in the ``Response()`` filters out whitespace from the returned HTML in the ``Response()``