-
From d75b6b18450c5b2627f7f1da1478b1c47639a1df Mon Sep 17 00:00:00 2001
From: Ben Sturmfels <ben@sturm.com.au>
Date: Sun, 18 Sep 2016 00:48:32 +1000
Subject: [PATCH] Spell-check the entire documentation.
---
docs/source/api/authentication.rst | 4 +-
docs/source/api/objects.rst | 14 ++---
docs/source/devel/codebase.rst | 22 +++----
docs/source/devel/migrations.rst | 4 +-
docs/source/devel/originaldesigndecisions.rst | 10 +--
docs/source/devel/storage.rst | 24 +++----
docs/source/index.rst | 2 +-
docs/source/pluginwriter/api.rst | 8 +--
docs/source/pluginwriter/authhooks.rst | 4 +-
docs/source/pluginwriter/database.rst | 8 +--
docs/source/pluginwriter/hooks.rst | 2 +-
docs/source/pluginwriter/tests.rst | 8 +--
docs/source/siteadmin/commandline-upload.rst | 10 +--
docs/source/siteadmin/configuration.rst | 6 +-
docs/source/siteadmin/deploying.rst | 34 +++++-----
docs/source/siteadmin/media-types.rst | 40 ++++++------
docs/source/siteadmin/plugins.rst | 4 +-
docs/source/siteadmin/production-deployments.rst | 14 ++---
docs/source/siteadmin/relnotes.rst | 80 ++++++++++++------------
docs/source/siteadmin/theming.rst | 16 ++---
mediagoblin/plugins/basic_auth/README.rst | 2 +-
mediagoblin/plugins/flatpagesfile/README.rst | 8 +--
mediagoblin/plugins/ldap/README.rst | 18 +++---
mediagoblin/plugins/openid/README.rst | 12 ++--
mediagoblin/plugins/trim_whitespace/README.rst | 2 +-
25 files changed, 176 insertions(+), 180 deletions(-)
diff --git a/docs/source/api/authentication.rst b/docs/source/api/authentication.rst
index 1d52d30..2db4a7b 100644
a
|
b
|
Only set client_id for update.
|
144 | 144 | Only set client_secret for update. |
145 | 145 | This should only be given when you update. |
146 | 146 | |
147 | | Logo URL <url> is not a valid URL |
| 147 | Logo URL <URL> is not a valid URL |
148 | 148 | This is when the URL specified did not meet the validation. |
149 | 149 | |
150 | 150 | contacts must be a string of space-separated email addresses. |
… |
… |
We are not using OAuth2 as we want to stay completely compatible with pump.io.
|
171 | 171 | Endpoints |
172 | 172 | --------- |
173 | 173 | |
174 | | These are the endpoints you need to use for the oauth requests: |
| 174 | These are the endpoints you need to use for the OAuth requests: |
175 | 175 | |
176 | 176 | `/oauth/request_token` is for getting the request token. |
177 | 177 | |
-
diff --git a/docs/source/api/objects.rst b/docs/source/api/objects.rst
index 4c19961..854febe 100644
a
|
b
|
Objects
|
19 | 19 | |
20 | 20 | Using any the APIs mentioned in this document you will required |
21 | 21 | :doc:`authentication`. There are many ways to interact with objects, some of |
22 | | which aren't supported yet by mediagoblin such as liking or sharing objects |
| 22 | which aren't supported yet by MediaGoblin such as liking or sharing objects |
23 | 23 | however you can interact with them by updating them, deleting them and |
24 | 24 | commenting on them. |
25 | 25 | |
… |
… |
timestamps or any other data the server creates. My activity comment is::
|
49 | 49 | |
50 | 50 | This should be posted to the users feed (outbox) which you can find out about |
51 | 51 | :doc:`activities`. You will get back the full activity containing all of |
52 | | attributes including ID, urls, etc. |
| 52 | attributes including ID, URLs, etc. |
53 | 53 | |
54 | 54 | Posting Media |
55 | 55 | ~~~~~~~~~~~~~ |
56 | 56 | |
57 | 57 | Posting media is a special case from posting all other objects. This is because |
58 | 58 | you need to submit more than just the JSON image representation, you need to |
59 | | actually subject the image itself. There is also strange behavour around media |
| 59 | actually subject the image itself. There is also strange behavior around media |
60 | 60 | postings where if you want to give the media you're posting a title or |
61 | | description you need to peform an update too. A full media posting in order of |
| 61 | description you need to perform an update too. A full media posting in order of |
62 | 62 | steps to do is as follows: |
63 | 63 | |
64 | 64 | 1) Uploads the data to the server |
… |
… |
To upload media you should use the URL `/api/user/<username>/uploads`.
|
74 | 74 | A POST request should be made to the media upload URL submitting at least two |
75 | 75 | headers: |
76 | 76 | |
77 | | * `Content-Type` - This being a valid mimetype for the media. |
| 77 | * `Content-Type` - This being a valid MIME type for the media. |
78 | 78 | * `Content-Length` - size in bytes of the media. |
79 | 79 | |
80 | 80 | The media data should be submitted as POST data to the image upload URL. |
… |
… |
You should get the full delete activity in response.
|
196 | 196 | |
197 | 197 | .. warning:: |
198 | 198 | While deletion works, currently because of the way deletion is implemented |
199 | | deletion either via the API or the webUI causes any activities to be broken |
200 | | and will be skipped and unaccessible. A migration to remove the broken |
| 199 | deletion either via the API or the web UI causes any activities to be broken |
| 200 | and will be skipped and inaccessible. A migration to remove the broken |
201 | 201 | activities will come in a future release when soft-deletion has been |
202 | 202 | implemented. |
203 | 203 | |
-
diff --git a/docs/source/devel/codebase.rst b/docs/source/devel/codebase.rst
index 122a329..068c187 100644
a
|
b
|
development.
|
44 | 44 | What's where |
45 | 45 | ============ |
46 | 46 | |
47 | | After you've run checked out mediagoblin and followed the virtualenv |
| 47 | After you've run checked out MediaGoblin and followed the virtualenv |
48 | 48 | instantiation instructions, you're faced with the following directory |
49 | 49 | tree:: |
50 | 50 | |
… |
… |
As you can see, all the code for GNU MediaGoblin is in the
|
86 | 86 | |
87 | 87 | Here are some interesting files and what they do: |
88 | 88 | |
89 | | :routing.py: maps url paths to views |
90 | | :views.py: views handle http requests |
| 89 | :routing.py: maps URL paths to views |
| 90 | :views.py: views handle HTTP requests |
91 | 91 | :forms.py: wtforms stuff for this submodule |
92 | 92 | |
93 | 93 | You'll notice that there are several sub-directories: tests, |
… |
… |
templates, auth, submit, ...
|
97 | 97 | |
98 | 98 | ``templates`` holds all the templates for the output. |
99 | 99 | |
100 | | ``auth`` and ``submit`` are modules that enacpsulate authentication |
| 100 | ``auth`` and ``submit`` are modules that encapsulate authentication |
101 | 101 | and media item submission. If you look in these directories, you'll |
102 | 102 | see they have their own ``routing.py``, ``view.py``, and forms.py in |
103 | 103 | addition to some other code. |
… |
… |
Software Stack
|
123 | 123 | for unit tests |
124 | 124 | |
125 | 125 | * `virtualenv <http://www.virtualenv.org/>`_: for setting up an |
126 | | isolated environment to keep mediagoblin and related packages |
| 126 | isolated environment to keep MediaGoblin and related packages |
127 | 127 | (potentially not required if MediaGoblin is packaged for your |
128 | 128 | distro) |
129 | 129 | |
130 | 130 | * Data storage |
131 | 131 | |
132 | 132 | * `SQLAlchemy <http://sqlalchemy.org/>`_: SQL ORM and database |
133 | | interaction library for Python. Currently we support sqlite and |
134 | | postgress as backends. |
| 133 | interaction library for Python. Currently we support SQLite and |
| 134 | PostgreSQL as backends. |
135 | 135 | |
136 | 136 | * Web application |
137 | 137 | |
… |
… |
Software Stack
|
158 | 158 | |
159 | 159 | * `Markdown (for python) <http://pypi.python.org/pypi/Markdown>`_: |
160 | 160 | implementation of `Markdown <http://daringfireball.net/projects/markdown/>`_ |
161 | | text-to-html tool to make it easy for people to write richtext |
| 161 | text-to-html tool to make it easy for people to write rich text |
162 | 162 | comments, descriptions, and etc. |
163 | 163 | |
164 | | * `lxml <http://lxml.de/>`_: nice xml and html processing for |
| 164 | * `lxml <http://lxml.de/>`_: nice XML and HTML processing for |
165 | 165 | python. |
166 | 166 | |
167 | 167 | * Media processing libraries |
… |
… |
Software Stack
|
174 | 174 | future, probably audio too. |
175 | 175 | |
176 | 176 | * `chardet <http://pypi.python.org/pypi/chardet>`_: (Optional, for |
177 | | ascii art hosting sites only) Used to make ascii art thumbnails. |
| 177 | ASCII art hosting sites only) Used to make ASCII art thumbnails. |
178 | 178 | |
179 | 179 | * Front end |
180 | 180 | |
181 | | * `JQuery <http://jquery.com/>`_: for groovy JavaScript things |
| 181 | * `jQuery <http://jquery.com/>`_: for groovy JavaScript things |
182 | 182 | |
183 | 183 | |
-
diff --git a/docs/source/devel/migrations.rst b/docs/source/devel/migrations.rst
index 5e0a6be..ec0f7d2 100644
a
|
b
|
There's a few things you need to know:
|
31 | 31 | - We use `Alembic <https://bitbucket.org/zzzeek/alembic>`_ to run |
32 | 32 | migrations. We also make heavy use of the |
33 | 33 | `branching model <http://alembic.readthedocs.org/en/latest/branches.html>`_ |
34 | | for our plugins. Every plugin gets its own migration branc. |
| 34 | for our plugins. Every plugin gets its own migration branch. |
35 | 35 | - We used to use `sqlalchemy-migrate |
36 | 36 | <http://code.google.com/p/sqlalchemy-migrate/>`_. |
37 | 37 | See `their docs <https://sqlalchemy-migrate.readthedocs.org/>`_. |
… |
… |
There's a few things you need to know:
|
41 | 41 | - SQLAlchemy has two parts to it, the ORM and the "core" interface. |
42 | 42 | We DO NOT use the ORM when running migrations. Think about it: the |
43 | 43 | ORM is set up with an expectation that the models already reflect a |
44 | | certain pattern. But if a person is moving from their old patern |
| 44 | certain pattern. But if a person is moving from their old pattern |
45 | 45 | and are running tools to *get to* the current pattern, of course |
46 | 46 | their current database structure doesn't match the state of the ORM! |
47 | 47 | Anyway, Alembic has its own conventions for migrations; follow those. |
-
diff --git a/docs/source/devel/originaldesigndecisions.rst b/docs/source/devel/originaldesigndecisions.rst
index 2843870..b60db77 100644
a
|
b
|
Chris and Will on "Why GNU MediaGoblin":
|
38 | 38 | .. figure:: ../_static/goblin.png |
39 | 39 | :alt: Cute goblin with a beret. |
40 | 40 | |
41 | | *Figure 1: Cute goblin with a beret. llustrated by Chris |
| 41 | *Figure 1: Cute goblin with a beret. Illustrated by Chris |
42 | 42 | Webber* |
43 | 43 | |
44 | 44 | .. figure:: ../_static/snugglygoblin.png |
… |
… |
Chris and Will on "Why GNU MediaGoblin":
|
61 | 61 | 1. "GNU MediaGoblin" is the name we're going to use in all official |
62 | 62 | capacities: web site, documentation, press releases, ... |
63 | 63 | |
64 | | 2. In casual conversation, it's ok to use more casual names. |
| 64 | 2. In casual conversation, it's OK to use more casual names. |
65 | 65 | |
66 | 66 | 3. If you're writing about the project, we ask that you call it GNU |
67 | 67 | MediaGoblin. |
… |
… |
Why WSGI Minimalism
|
113 | 113 | Chris Webber on "Why WSGI Minimalism": |
114 | 114 | |
115 | 115 | If you notice in the technology list I list a lot of components |
116 | | that are very "django-like", but not actually `Django`_ |
| 116 | that are very "Django-like", but not actually `Django`_ |
117 | 117 | components. What can I say, I really like a lot of the ideas in |
118 | 118 | Django! Which leads to the question: why not just use Django? |
119 | 119 | |
… |
… |
Chris Webber on "Why MongoDB":
|
176 | 176 | ideal universe where everyone ran servers out of their own |
177 | 177 | housing. As a memory-mapped database, MongoDB is pretty hungry, |
178 | 178 | so actually I spent a lot of time debating whether the inability |
179 | | to scale down as nicely as something like SQL has with sqlite |
| 179 | to scale down as nicely as something like SQL has with SQLite |
180 | 180 | meant that it was out. |
181 | 181 | |
182 | 182 | But I decided in the end that I really want MongoDB, not for |
… |
… |
Chris Webber on "Why MongoDB":
|
199 | 199 | |
200 | 200 | |
201 | 201 | Being able to just dump media-specific information in a media_data |
202 | | hashtable is pretty great, and even better is having a plugin |
| 202 | hash table is pretty great, and even better is having a plugin |
203 | 203 | system where you can just let plugins have their own entire |
204 | 204 | key-value space cleanly inside the document that doesn't interfere |
205 | 205 | with anyone else's stuff. If we were to let plugins to deposit |
-
diff --git a/docs/source/devel/storage.rst b/docs/source/devel/storage.rst
index 215f957..46e163d 100644
a
|
b
|
are:
|
21 | 21 | |
22 | 22 | + **public_store:** After your media goes through processing it gets |
23 | 23 | moved to the public store. This is also a StorageInterface |
24 | | implelementation, and is for stuff that's intended to be seen by |
| 24 | implementation, and is for stuff that's intended to be seen by |
25 | 25 | site visitors. |
26 | 26 | |
27 | 27 | The workbench |
… |
… |
Static assets / staticdirect
|
43 | 43 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
44 | 44 | |
45 | 45 | On top of all that, there is some static media that comes bundled with your |
46 | | application. This stuff is kept in: |
| 46 | application. This stuff is kept in ``mediagoblin/static/``. |
47 | 47 | |
48 | | mediagoblin/static/ |
49 | | |
50 | | These files are for mediagoblin base assets. Things like the CSS files, |
| 48 | These files are for MediaGoblin base assets. Things like the CSS files, |
51 | 49 | logos, etc. You can mount these at whatever location is appropriate to you |
52 | 50 | (see the direct_remote_path option in the config file) so if your users |
53 | 51 | are keeping their static assets at http://static.mgoblin.example.org/ but |
… |
… |
their actual site is at http://mgoblin.example.org/, you need to be able
|
55 | 53 | to get your static files in a where-it's-mounted agnostic way. There's a |
56 | 54 | "staticdirector" attached to the request object. It's pretty easy to use; |
57 | 55 | just look at this bit taken from the |
58 | | mediagoblin/templates/mediagoblin/base.html main template: |
| 56 | mediagoblin/templates/mediagoblin/base.html main template:: |
59 | 57 | |
60 | 58 | <link rel="stylesheet" type="text/css" |
61 | 59 | href="Template:Request.staticdirect('/css/extlib/text.css')"/> |
… |
… |
So, the StorageInterface!
|
76 | 74 | So, the public and queue stores both use StorageInterface implementations |
77 | 75 | ... but what does that mean? It's not too hard. |
78 | 76 | |
79 | | Open up: |
80 | | |
81 | | mediagoblin/storage.py |
| 77 | Open up ``mediagoblin/storage.py``. |
82 | 78 | |
83 | 79 | In here you'll see a couple of things. First of all, there's the |
84 | 80 | StorageInterface class. What you'll see is that this is just a very simple |
… |
… |
also the default storage system used. As expected, this stores files
|
95 | 91 | locally on your machine. |
96 | 92 | |
97 | 93 | There's also a CloudFileStorage system. This provides a mapping to |
98 | | [OpenStack's swift http://swift.openstack.org/] storage system (used by |
| 94 | [OpenStack's Swift http://swift.openstack.org/] storage system (used by |
99 | 95 | RackSpace Cloud files and etc). |
100 | 96 | |
101 | 97 | Between these two examples you should be able to get a pretty good idea of |
102 | 98 | how to write your own storage systems, for storing data across your |
103 | | beowulf cluster of radioactive monkey brains, whatever. |
| 99 | Beowulf cluster of radioactive monkey brains, whatever. |
104 | 100 | |
105 | 101 | Writing code to store stuff |
106 | 102 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
… |
… |
https://docs.djangoproject.com/en/dev/ref/files/storage/]... with some
|
112 | 108 | differences. |
113 | 109 | |
114 | 110 | Basically, you access files on "file paths", which aren't exactly like |
115 | | unix file paths, but are close. If you wanted to store a file on a path |
116 | | like dir1/dir2/filename.jpg you'd actually write that file path like: |
| 111 | Unix file paths, but are close. If you wanted to store a file on a path |
| 112 | like dir1/dir2/filename.jpg you'd actually write that file path like:: |
117 | 113 | |
118 | | ['dir1', 'dir2', 'filename.jpg'] |
| 114 | ['dir1', 'dir2', 'filename.jpg'] |
119 | 115 | |
120 | 116 | This way we can be *sure* that each component is actually a component of |
121 | 117 | the path that's expected... we do some filename cleaning on each component. |
-
diff --git a/docs/source/index.rst b/docs/source/index.rst
index a4fd245..fbc5715 100644
a
|
b
|
GNU MediaGoblin is a platform for sharing photos, video and other media
|
20 | 20 | in an environment that respects our freedom and independence. |
21 | 21 | |
22 | 22 | This is a Free Software project. It is built by contributors for all |
23 | | to use and enjoy. If you're intrested in contributing, see `the wiki |
| 23 | to use and enjoy. If you're interested in contributing, see `the wiki |
24 | 24 | <http://wiki.mediagoblin.org/>`_ which has pages that talk about the |
25 | 25 | ways someone can contribute. |
26 | 26 | |
-
diff --git a/docs/source/pluginwriter/api.rst b/docs/source/pluginwriter/api.rst
index a220eac..03761a3 100644
a
|
b
|
can use a shortcut to get your plugin's config section::
|
83 | 83 | >>> floobie_dir = floobie_config['floobie_dir'] |
84 | 84 | |
85 | 85 | A tip: you have access to the `%(here)s` variable in your config, |
86 | | which is the directory that the user's mediagoblin config is running |
| 86 | which is the directory that the user's MediaGoblin config is running |
87 | 87 | out of. So for example, your plugin may need a "floobie" directory to |
88 | 88 | store floobs in. You could give them a reasonable default that makes |
89 | 89 | use of the default `user_dev` location, but allow users to override |
… |
… |
it, like so::
|
92 | 92 | [plugin_spec] |
93 | 93 | floobie_dir = string(default="%(here)s/user_dev/floobs/") |
94 | 94 | |
95 | | Note, this is relative to the user's mediagoblin config directory, |
| 95 | Note, this is relative to the user's MediaGoblin config directory, |
96 | 96 | *not* your plugin directory! |
97 | 97 | |
98 | 98 | |
… |
… |
Adding static resources
|
178 | 178 | ----------------------- |
179 | 179 | |
180 | 180 | It's possible to add static resources for your plugin. Say your |
181 | | plugin needs some special javascript and images... how to provide |
| 181 | plugin needs some special JavaScript and images... how to provide |
182 | 182 | them? Then how to access them? MediaGoblin has a way! |
183 | 183 | |
184 | 184 | |
… |
… |
the MediaGoblin repository.
|
230 | 230 | WTForms hooks |
231 | 231 | +++++++++++++ |
232 | 232 | |
233 | | We haven't totally settled on a way to tranform wtforms form objects, |
| 233 | We haven't totally settled on a way to transform wtforms form objects, |
234 | 234 | but here's one way. In your view:: |
235 | 235 | |
236 | 236 | from mediagoblin.foo.forms import SomeForm |
-
diff --git a/docs/source/pluginwriter/authhooks.rst b/docs/source/pluginwriter/authhooks.rst
index 9721d72..66d9b9d 100644
a
|
b
|
This hook is called in ``mediagoblin.auth.views`` in both the ``login`` and
|
44 | 44 | if :ref:`basic_auth-chapter` is not enabled, the user will be redirected to the |
45 | 45 | correct login and registration views for your plugin. |
46 | 46 | |
47 | | The code assumes that it can generate a valid url given |
| 47 | The code assumes that it can generate a valid URL given |
48 | 48 | ``mediagoblin.plugins.{{ your_plugin_here }}.login`` and |
49 | 49 | ``mediagoblin.plugins.{{ your_plugin_here }}.register``. This is only needed if |
50 | 50 | you will not be using the ``login`` and ``register`` views in |
… |
… |
the ``stored_hash`` and return either ``True`` or ``False``.
|
82 | 82 | |
83 | 83 | This hook is called in ``mediagoblin.auth.tools.check_login_simple``. It is |
84 | 84 | called if a user is not found and should do something that takes the same amount |
85 | | of time as your ``check_password`` function. This is to help prevent timining |
| 85 | of time as your ``check_password`` function. This is to help prevent timing |
86 | 86 | attacks. |
-
diff --git a/docs/source/pluginwriter/database.rst b/docs/source/pluginwriter/database.rst
index c0698a2..90c2cee 100644
a
|
b
|
Accessing Existing Data
|
24 | 24 | ======================= |
25 | 25 | |
26 | 26 | If your plugin wants to access existing data, this is quite |
27 | | straight forward. Just import the appropiate models and use |
| 27 | straight forward. Just import the appropriate models and use |
28 | 28 | the full power of SQLAlchemy. Take a look at the (upcoming) |
29 | 29 | database section in the Developer's Chapter. |
30 | 30 | |
… |
… |
plugin's models.py and then run::
|
134 | 134 | ./bin/gmg alembic --with-plugins revision \ |
135 | 135 | --head REVISION_HERE \ |
136 | 136 | --autogenerate \ |
137 | | -m "YOUR_PLUGIN_NAME: Change explaination here." |
| 137 | -m "YOUR_PLUGIN_NAME: Change explanation here." |
138 | 138 | |
139 | 139 | Once again, this will dump the migration into the wrong place, so move |
140 | 140 | to your plugin's migrations directory. Open the file, adjust |
141 | 141 | accordingly, and read carefully! Now you should also test your |
142 | | migration with some real data. Be sure to test it both on sqlite |
143 | | *AND* on postgresql! |
| 142 | migration with some real data. Be sure to test it both on SQLite |
| 143 | *AND* on PostgreSQL! |
144 | 144 | |
145 | 145 | One last *very critical* note: you must never, never modify core |
146 | 146 | tables with your plugin. To do that is to put you and all your users |
-
diff --git a/docs/source/pluginwriter/hooks.rst b/docs/source/pluginwriter/hooks.rst
index 4aa062e..66fe3b4 100644
a
|
b
|
What hooks are available?
|
28 | 28 | This hook is used by ``add_media_to_collection`` |
29 | 29 | in ``mediagoblin.user_pages.lib``. |
30 | 30 | It gets a ``CollectionItem`` as its argument. |
31 | | It's the newly created item just before getting commited. |
| 31 | It's the newly created item just before getting committed. |
32 | 32 | So the item can be modified by the hook, if needed. |
33 | 33 | Changing the session regarding this item is currently |
34 | 34 | undefined behaviour, as the SQL Session might contain other |
-
diff --git a/docs/source/pluginwriter/tests.rst b/docs/source/pluginwriter/tests.rst
index fe99688..560a889 100644
a
|
b
|
Here's a brief guide to writing unit tests for plugins. However, it
|
19 | 19 | isn't really ideal. It also hasn't been well tested... yes, there's |
20 | 20 | some irony there :) |
21 | 21 | |
22 | | Some notes: we're using py.test and webtest for unit testing stuff. |
| 22 | Some notes: we're using py.test and WebTest for unit testing stuff. |
23 | 23 | Keep that in mind. |
24 | 24 | |
25 | 25 | My suggestion is to mime the behavior of `mediagoblin/tests/` and put |
… |
… |
In any test module in your tests directory you can then do::
|
44 | 44 | # real code goes here |
45 | 45 | pass |
46 | 46 | |
47 | | And you'll get a mediagoblin application wrapped in webtest passed in |
| 47 | And you'll get a MediaGoblin application wrapped in WebTest passed in |
48 | 48 | to your environment. |
49 | 49 | |
50 | 50 | If your plugin needs to define multiple configuration setups, you can |
… |
… |
actually set up multiple fixtures very easily for this. You can just
|
52 | 52 | set up multiple fixtures with different names that point to different |
53 | 53 | configs and pass them in as that named argument. |
54 | 54 | |
55 | | To run the tests, from mediagoblin's directory (make sure that your |
56 | | plugin has been added to your mediagoblin checkout's virtualenv!) do:: |
| 55 | To run the tests, from MediaGoblin's directory (make sure that your |
| 56 | plugin has been added to your MediaGoblin checkout's virtualenv!) do:: |
57 | 57 | |
58 | 58 | ./runtests.sh /path/to/myplugin/tests/ |
59 | 59 | |
-
diff --git a/docs/source/siteadmin/commandline-upload.rst b/docs/source/siteadmin/commandline-upload.rst
index 6909831..659b58b 100644
a
|
b
|
The above is an example of a very simple metadata.csv file. The batchaddmedia
|
65 | 65 | script would read this and attempt to upload only two pieces of media, and would |
66 | 66 | be able to automatically name them appropriately. |
67 | 67 | |
68 | | The csv file |
| 68 | The CSV file |
69 | 69 | ============ |
70 | 70 | The location column |
71 | 71 | ------------------- |
72 | 72 | The location column is the one column that is absolutely necessary for |
73 | 73 | uploading your media. This gives a path to each piece of media you upload. This |
74 | 74 | can either a path to a local file or a direct link to remote media (with the |
75 | | link in http format). As you can see in the example above the (fake) media was |
| 75 | link in HTTP format). As you can see in the example above the (fake) media was |
76 | 76 | stored remotely on "www.example.net". |
77 | 77 | |
78 | 78 | Other internal nodes |
… |
… |
provide default information for your media entry, but as you'll see below, it's
|
83 | 83 | just as easy to provide this information through the correct metadata columns. |
84 | 84 | |
85 | 85 | - **id** is used to identify the media entry to the user in case of an error in the batchaddmedia script. |
86 | | - **license** is used to set a license for your piece a media for mediagoblin's use. This must be a URI. |
87 | | - **title** will set the title displayed to mediagoblin users. |
| 86 | - **license** is used to set a license for your piece a media for MediaGoblin's use. This must be a URI. |
| 87 | - **title** will set the title displayed to MediaGoblin users. |
88 | 88 | - **description** will set a description of your media. |
89 | 89 | |
90 | 90 | Metadata columns |
… |
… |
information of uploaded media entries.
|
106 | 106 | - **dc:title** sets a title for your media entry. |
107 | 107 | - **dc:description** sets a description of your media entry. |
108 | 108 | |
109 | | If both a metadata column and an internal node for the title are provided, mediagoblin |
| 109 | If both a metadata column and an internal node for the title are provided, MediaGoblin |
110 | 110 | will use the internal node as the media entry's display name. This makes it so |
111 | 111 | that if you want to display a piece of media with a different title |
112 | 112 | than the one provided in its metadata, you can just provide different data for |
-
diff --git a/docs/source/siteadmin/configuration.rst b/docs/source/siteadmin/configuration.rst
index dd0d6cd..6b8cd22 100644
a
|
b
|
paste.ini
|
39 | 39 | <http://pythonpaste.org/script/>`_). It also sets up some |
40 | 40 | middleware that you can mostly ignore, except to configure |
41 | 41 | sessions... more on that later. If you are adding a different |
42 | | Python server other than fastcgi / plain HTTP, you might configure |
| 42 | Python server other than FastCGI / plain HTTP, you might configure |
43 | 43 | it here. You probably won't need to change this file very much. |
44 | 44 | |
45 | 45 | |
46 | 46 | There's one more file that you certainly won't change unless you're |
47 | | making coding contributions to mediagoblin, but which can be useful to |
| 47 | making coding contributions to MediaGoblin, but which can be useful to |
48 | 48 | read and reference: |
49 | 49 | |
50 | 50 | mediagoblin/config_spec.ini |
… |
… |
If you use ``lazyserver.sh`` you need to change the ``paste.ini`` file::
|
128 | 128 | [app:mediagoblin] |
129 | 129 | /mgoblin_media = /var/mediagoblin/user_data |
130 | 130 | |
131 | | If you use nginx you need to change the config:: |
| 131 | If you use Nginx you need to change the config:: |
132 | 132 | |
133 | 133 | # Instance specific media: |
134 | 134 | location /mgoblin_media/ { |
-
diff --git a/docs/source/siteadmin/deploying.rst b/docs/source/siteadmin/deploying.rst
index 47901da..80b6064 100644
a
|
b
|
will take you step-by-step through setting up your own instance of MediaGoblin.
|
25 | 25 | Of course, when it comes to setting up web applications like MediaGoblin, |
26 | 26 | there's an almost infinite way to deploy things, so for now, we'll keep it |
27 | 27 | simple with some assumptions. We recommend a setup that combines MediaGoblin + |
28 | | virtualenv + fastcgi + nginx on a .deb- or .rpm-based GNU/Linux distro. |
| 28 | virtualenv + FastCGI + Nginx on a .deb- or .rpm-based GNU/Linux distro. |
29 | 29 | |
30 | 30 | Other deployment options (e.g., deploying on FreeBSD, Arch Linux, using |
31 | 31 | Apache, etc.) are possible, though! If you'd prefer a different deployment |
… |
… |
Configure PostgreSQL
|
94 | 94 | |
95 | 95 | For medium to large deployments we recommend PostgreSQL. |
96 | 96 | |
97 | | If you don't want/need postgres, skip this section. |
| 97 | If you don't want/need PostgreSQL, skip this section. |
98 | 98 | |
99 | 99 | These are the packages needed for Debian Jessie (stable):: |
100 | 100 | |
… |
… |
These are the packages needed for an RPM-based system::
|
105 | 105 | sudo yum install postgresql postgresql-server python-psycopg2 |
106 | 106 | |
107 | 107 | An rpm-based system also requires that you initialize and start the |
108 | | PostgresSQL database with a few commands. The following commands are |
| 108 | PostgreSQL database with a few commands. The following commands are |
109 | 109 | not needed on a Debian-based platform, however:: |
110 | 110 | |
111 | 111 | sudo /usr/bin/postgresql-setup initdb |
… |
… |
not needed on a Debian-based platform, however::
|
113 | 113 | sudo systemctl start postgresql |
114 | 114 | |
115 | 115 | The installation process will create a new *system* user named ``postgres``, |
116 | | which will have privilegies sufficient to manage the database. We will create a |
117 | | new database user with restricted privilegies and a new database owned by our |
| 116 | which will have privileges sufficient to manage the database. We will create a |
| 117 | new database user with restricted privileges and a new database owned by our |
118 | 118 | restricted database user for our MediaGoblin instance. |
119 | 119 | |
120 | 120 | In this example, the database user will be ``mediagoblin`` and the database |
… |
… |
Create a MediaGoblin Directory
|
200 | 200 | You should create a working directory for MediaGoblin. This document |
201 | 201 | assumes your local git repository will be located at |
202 | 202 | ``/srv/mediagoblin.example.org/mediagoblin/``. |
203 | | Substitute your prefered local deployment path as needed. |
| 203 | Substitute your preferred local deployment path as needed. |
204 | 204 | |
205 | 205 | Setting up the working directory requires that we first create the directory |
206 | | with elevated priviledges, and then assign ownership of the directory |
| 206 | with elevated privileges, and then assign ownership of the directory |
207 | 207 | to the unprivileged system account. |
208 | 208 | |
209 | 209 | To do this, enter the following command, changing the defaults to suit your |
… |
… |
Then edit mediagoblin_local.ini:
|
325 | 325 | the sender for system-generated emails |
326 | 326 | - Edit ``direct_remote_path``, ``base_dir``, and ``base_url`` if |
327 | 327 | your mediagoblin directory is not the root directory of your |
328 | | vhost. |
| 328 | site. |
329 | 329 | |
330 | 330 | |
331 | 331 | Configure MediaGoblin to use the PostgreSQL database |
332 | 332 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
333 | 333 | |
334 | | If you are using postgres, edit the ``[mediagoblin]`` section in your |
| 334 | If you are using PostgreSQL, edit the ``[mediagoblin]`` section in your |
335 | 335 | ``mediagoblin_local.ini`` and put in:: |
336 | 336 | |
337 | 337 | sql_engine = postgresql:///mediagoblin |
… |
… |
test the deployment with the following command::
|
361 | 361 | You should be able to connect to the machine on port 6543 in your |
362 | 362 | browser to confirm that the service is operable. |
363 | 363 | |
364 | | The next series of commands will need to be run as a priviledged user. Type |
| 364 | The next series of commands will need to be run as a privileged user. Type |
365 | 365 | exit to return to the root/sudo account.:: |
366 | 366 | |
367 | 367 | exit |
… |
… |
exit to return to the root/sudo account.::
|
372 | 372 | FastCGI and nginx |
373 | 373 | ~~~~~~~~~~~~~~~~~ |
374 | 374 | |
375 | | This configuration example will use nginx, however, you may |
| 375 | This configuration example will use Nginx, however, you may |
376 | 376 | use any webserver of your choice as long as it supports the FastCGI |
377 | | protocol. If you do not already have a web server, consider nginx, as |
| 377 | protocol. If you do not already have a web server, consider Nginx, as |
378 | 378 | the configuration files may be more clear than the |
379 | 379 | alternatives. |
380 | 380 | |
… |
… |
following commands::
|
397 | 397 | sudo systemctl enable nginx |
398 | 398 | |
399 | 399 | You can modify these commands and locations depending on your preferences and |
400 | | the existing configuration of your nginx instance. The contents of |
| 400 | the existing configuration of your Nginx instance. The contents of |
401 | 401 | this ``nginx.conf`` file should be modeled on the following:: |
402 | 402 | |
403 | 403 | server { |
… |
… |
this ``nginx.conf`` file should be modeled on the following::
|
457 | 457 | fastcgi_pass 127.0.0.1:26543; |
458 | 458 | include /etc/nginx/fastcgi_params; |
459 | 459 | |
460 | | # our understanding vs nginx's handling of script_name vs |
| 460 | # our understanding vs Nginx's handling of script_name vs |
461 | 461 | # path_info don't match :) |
462 | 462 | fastcgi_param PATH_INFO $fastcgi_script_name; |
463 | 463 | fastcgi_param SCRIPT_NAME ""; |
… |
… |
test to ensure that this configuration works::
|
481 | 481 | |
482 | 482 | nginx -t |
483 | 483 | |
484 | | If you encounter any errors, review your nginx configuration files, and try to |
485 | | resolve them. If you do not encounter any errors, you can start your nginx |
| 484 | If you encounter any errors, review your Nginx configuration files, and try to |
| 485 | resolve them. If you do not encounter any errors, you can start your Nginx |
486 | 486 | server with one of the following commands (depending on your environment):: |
487 | 487 | |
488 | 488 | sudo /etc/init.d/nginx restart |
… |
… |
a) Disable registration on your instance and just make
|
529 | 529 | [mediagoblin] |
530 | 530 | allow_registration = false |
531 | 531 | |
532 | | b) Enable a captcha plugin. But unfortunately, though some captcha |
| 532 | b) Enable a CAPTCHA plugin. But unfortunately, though some CAPTCHA |
533 | 533 | plugins exist, for various reasons we do not have any general |
534 | 534 | recommendations we can make at this point. |
535 | 535 | |
-
diff --git a/docs/source/siteadmin/media-types.rst b/docs/source/siteadmin/media-types.rst
index 3877063..146e1aa 100644
a
|
b
|
Media Types
|
19 | 19 | |
20 | 20 | In the future, there will be all sorts of media types you can enable, |
21 | 21 | but in the meanwhile there are six additional media types: video, audio, |
22 | | raw image, ascii art, STL/3d models, PDF and Document. |
| 22 | raw image, ASCII art, STL/3D models, PDF and Document. |
23 | 23 | |
24 | 24 | First, you should probably read ":doc:`configuration`" to make sure |
25 | | you know how to modify the mediagoblin config file. |
| 25 | you know how to modify the MediaGoblin config file. |
26 | 26 | |
27 | 27 | Enabling Media Types |
28 | 28 | ==================== |
… |
… |
Enabling Media Types
|
30 | 30 | .. note:: |
31 | 31 | Media types are now plugins |
32 | 32 | |
33 | | Media types are enabled in your mediagoblin configuration file, typically it is |
| 33 | Media types are enabled in your MediaGoblin configuration file, typically it is |
34 | 34 | created by copying ``mediagoblin.ini`` to ``mediagoblin_local.ini`` and then |
35 | 35 | applying your changes to ``mediagoblin_local.ini``. If you don't already have a |
36 | 36 | ``mediagoblin_local.ini``, create one in the way described. |
… |
… |
instance the ``video`` media type configuration can be found in
|
81 | 81 | Video |
82 | 82 | ===== |
83 | 83 | |
84 | | To enable video, first install gstreamer and the python-gstreamer |
85 | | bindings (as well as whatever gstremaer extensions you want, |
| 84 | To enable video, first install GStreamer and the python-gstreamer |
| 85 | bindings (as well as whatever GStreamer extensions you want, |
86 | 86 | good/bad/ugly). On Debianoid systems |
87 | 87 | |
88 | 88 | .. code-block:: bash |
… |
… |
Run
|
107 | 107 | |
108 | 108 | ./bin/gmg dbupdate |
109 | 109 | |
110 | | Now you should be able to submit videos, and mediagoblin should |
| 110 | Now you should be able to submit videos, and MediaGoblin should |
111 | 111 | transcode them. |
112 | 112 | |
113 | 113 | .. note:: |
… |
… |
transcode them.
|
121 | 121 | Audio |
122 | 122 | ===== |
123 | 123 | |
124 | | To enable audio, install the gstreamer and python-gstreamer bindings (as well |
125 | | as whatever gstreamer plugins you want, good/bad/ugly), scipy and numpy are |
| 124 | To enable audio, install the GStreamer and python-gstreamer bindings (as well |
| 125 | as whatever GStreamer plugins you want, good/bad/ugly), SciPy and NumPy are |
126 | 126 | also needed for the audio spectrograms. |
127 | 127 | To install these on Debianoid systems, run:: |
128 | 128 | |
… |
… |
Run
|
168 | 168 | |
169 | 169 | ./bin/gmg dbupdate |
170 | 170 | |
171 | | Now you should be able to submit raw images, and mediagoblin should |
| 171 | Now you should be able to submit raw images, and MediaGoblin should |
172 | 172 | extract the JPEG preview from them. |
173 | 173 | |
174 | 174 | |
175 | | Ascii art |
| 175 | ASCII art |
176 | 176 | ========= |
177 | 177 | |
178 | | To enable ascii art support, first install the |
| 178 | To enable ASCII art support, first install the |
179 | 179 | `chardet <http://pypi.python.org/pypi/chardet>`_ |
180 | | library, which is necessary for creating thumbnails of ascii art |
| 180 | library, which is necessary for creating thumbnails of ASCII art |
181 | 181 | |
182 | 182 | .. code-block:: bash |
183 | 183 | |
… |
… |
Run
|
194 | 194 | |
195 | 195 | ./bin/gmg dbupdate |
196 | 196 | |
197 | | Now any .txt file you uploaded will be processed as ascii art! |
| 197 | Now any .txt file you uploaded will be processed as ASCII art! |
198 | 198 | |
199 | 199 | |
200 | | STL / 3d model support |
| 200 | STL / 3D model support |
201 | 201 | ====================== |
202 | 202 | |
203 | | To enable the "STL" 3d model support plugin, first make sure you have |
204 | | a recentish `Blender <http://blender.org>`_ installed and available on |
| 203 | To enable the "STL" 3D model support plugin, first make sure you have |
| 204 | a recent `Blender <http://blender.org>`_ installed and available on |
205 | 205 | your execution path. This feature has been tested with Blender 2.63. |
206 | 206 | It may work on some earlier versions, but that is not guaranteed (and |
207 | 207 | is surely not to work prior to Blender 2.5X). |
… |
… |
PDF and Document
|
223 | 223 | |
224 | 224 | To enable the "PDF and Document" support plugin, you need: |
225 | 225 | |
226 | | 1. pdftocairo and pdfinfo for pdf only support. |
| 226 | 1. pdftocairo and pdfinfo for PDF only support. |
227 | 227 | |
228 | | 2. unoconv with headless support to support converting libreoffice supported |
| 228 | 2. unoconv with headless support to support converting LibreOffice supported |
229 | 229 | documents as well, such as doc/ppt/xls/odf/odg/odp and more. |
230 | 230 | For the full list see mediagoblin/media_types/pdf/processing.py, |
231 | 231 | unoconv_supported. |
… |
… |
To install this on Fedora:
|
238 | 238 | |
239 | 239 | sudo yum install -y poppler-utils unoconv libreoffice-headless |
240 | 240 | |
241 | | Note: You can leave out unoconv and libreoffice-headless if you want only pdf |
| 241 | Note: You can leave out unoconv and libreoffice-headless if you want only PDF |
242 | 242 | support. This will result in a much smaller list of dependencies. |
243 | 243 | |
244 | 244 | pdf.js relies on git submodules, so be sure you have fetched them: |
… |
… |
Blog (HIGHLY EXPERIMENTAL)
|
271 | 271 | MediaGoblin has a blog media type, which you might notice by looking |
272 | 272 | through the docs! However, it is *highly experimental*. We have not |
273 | 273 | security reviewed this, and it acts in a way that is not like normal |
274 | | blogs (the blogposts are themselves media types!). |
| 274 | blogs (the blog posts are themselves media types!). |
275 | 275 | |
276 | 276 | So you can play with this, but it is not necessarily recommended yet |
277 | 277 | for production use! :) |
-
diff --git a/docs/source/siteadmin/plugins.rst b/docs/source/siteadmin/plugins.rst
index 67c8bad..8682b0c 100644
a
|
b
|
Check the plugin's documentation for what configuration options are
|
111 | 111 | available. |
112 | 112 | |
113 | 113 | Once you've set up your plugin, you should be sure to update the |
114 | | database to accomodate the new plugins:: |
| 114 | database to accommodate the new plugins:: |
115 | 115 | |
116 | 116 | ./bin/gmg dbupdate |
117 | 117 | |
… |
… |
Deactivating plugins
|
121 | 121 | |
122 | 122 | You should be aware that once you enable a plugin, deactivating it |
123 | 123 | might be a bit tricky, for migrations reasons. In the future we may |
124 | | produce better tooling to accomodate this. In short, you will need to |
| 124 | produce better tooling to accommodate this. In short, you will need to |
125 | 125 | do a bit of database surgery by: |
126 | 126 | |
127 | 127 | - Removing all tables and indexes installed by the plugin |
-
diff --git a/docs/source/siteadmin/production-deployments.rst b/docs/source/siteadmin/production-deployments.rst
index b741721..ee91557 100644
a
|
b
|
Deploy with paste
|
24 | 24 | |
25 | 25 | The MediaGoblin WSGI application instance you get with ``./lazyserver.sh`` is |
26 | 26 | not ideal for a production MediaGoblin deployment. Ideally, you should be able |
27 | | to use a systemd service file or an init script to launch and restart the |
| 27 | to use a Systemd service file or an init script to launch and restart the |
28 | 28 | MediaGoblin process. |
29 | 29 | |
30 | | We will explore setting up MediaGoblin systemd service files and init scripts, |
| 30 | We will explore setting up MediaGoblin Systemd service files and init scripts, |
31 | 31 | but first we need to create the directory that will store the MediaGoblin logs. |
32 | 32 | |
33 | 33 | |
… |
… |
proper permissions::
|
45 | 45 | |
46 | 46 | .. _systemd-service-files: |
47 | 47 | |
48 | | Use systemd service files |
| 48 | Use Systemd service files |
49 | 49 | ------------------------- |
50 | 50 | |
51 | | If your operating system uses systemd, you can use systemd ``service files`` |
| 51 | If your operating system uses Systemd, you can use Systemd ``service files`` |
52 | 52 | to manage both the Celery and Paste processes. Place the following service |
53 | 53 | files in the ``/etc/systemd/system/`` directory. |
54 | 54 | |
… |
… |
modify it to suit your environment's setup:
|
62 | 62 | # If using Fedora/CentOS/Red Hat, mkdir and chown are located in /usr/bin/mkdir and /usr/bin/chown, respectively. |
63 | 63 | |
64 | 64 | [Unit] |
65 | | Description=Mediagoblin Celeryd |
| 65 | Description=MediaGoblin Celeryd |
66 | 66 | |
67 | 67 | [Service] |
68 | 68 | User=mediagoblin |
… |
… |
processes again.
|
156 | 156 | Use an init script |
157 | 157 | ------------------ |
158 | 158 | |
159 | | If your system does not use systemd, you can use the following command as the |
| 159 | If your system does not use Systemd, you can use the following command as the |
160 | 160 | basis for an init script: |
161 | 161 | |
162 | 162 | .. code-block:: bash |
… |
… |
To launch Celery separately from the MediaGoblin WSGI application:
|
244 | 244 | |
245 | 245 | CELERY_CONFIG_MODULE=mediagoblin.init.celery.from_celery ./bin/celeryd |
246 | 246 | |
247 | | If you use our example systemd ``service files``, Celery will be set to the |
| 247 | If you use our example Systemd ``service files``, Celery will be set to the |
248 | 248 | "CELERY_ALWAYS_EAGER=false" value by default. This will provide your users |
249 | 249 | with the best user experience, as all media processing will be done in the |
250 | 250 | background. |
-
diff --git a/docs/source/siteadmin/relnotes.rst b/docs/source/siteadmin/relnotes.rst
index 584fd8c..f32ca79 100644
a
|
b
|
carefully, or at least skim over it.
|
27 | 27 | running migrations! That way if something goes wrong, we can fix |
28 | 28 | things! |
29 | 29 | |
30 | | And be sure to shut down your current mediagoblin/celery processes |
| 30 | And be sure to shut down your current MediaGoblin/Celery processes |
31 | 31 | before upgrading! |
32 | 32 | |
33 | 33 | .. note:: |
… |
… |
prior upgrade guides!
|
162 | 162 | Additionally: |
163 | 163 | |
164 | 164 | - Are you using audio or video media types? In that case, you'll need |
165 | | to update your Gstreamer instance to 1.0. |
| 165 | to update your GStreamer instance to 1.0. |
166 | 166 | - The Pump API needs some data passed through to the WSGI application, |
167 | | so if you are using apache with mod_wsgi you should be sure to make |
| 167 | so if you are using Apache with mod_wsgi you should be sure to make |
168 | 168 | sure to add "WSGIPassAuthorization On" to your config. (Using the |
169 | | default MediaGoblin documnetation and config, things should work |
| 169 | default MediaGoblin documentation and config, things should work |
170 | 170 | as-is.) |
171 | 171 | |
172 | 172 | |
… |
… |
Additionally:
|
181 | 181 | - Clearer documentation on permissions and installation |
182 | 182 | - Switched from Transifex, which had become proprietary, to an |
183 | 183 | instance of Pootle hosted for GNU |
184 | | - Moved to Gstreamer 1.0! This also adds a new thumbnailer which |
| 184 | - Moved to GStreamer 1.0! This also adds a new thumbnailer which |
185 | 185 | gives much better results in |
186 | | - Removed terrible check-javascript-dependencies-into-your-application |
| 186 | - Removed terrible check-JavaScript-dependencies-into-your-application |
187 | 187 | setup, now using Bower for dependency tracking |
188 | 188 | - Put some scaffolding in place for Alembic, which will be used for |
189 | | future mitration work |
| 189 | future migration work |
190 | 190 | - Automatically create a fresh mediagoblin.ini from |
191 | 191 | mediagoblin.ini.example |
192 | 192 | - no more need for mediagoblin_local.ini (though it's still supported) |
… |
… |
Additionally:
|
199 | 199 | This is a purely bugfix release. Important changes happened since |
200 | 200 | 0.7.0; if running MediaGoblin 0.7.0, an upgrade is highly recommended; |
201 | 201 | see below. This release is especially useful if you have been running |
202 | | postgres and have been receiving seemingly random database transaction |
| 202 | PostgreSQL and have been receiving seemingly random database transaction |
203 | 203 | errors. |
204 | 204 | |
205 | 205 | **Do this to upgrade** |
… |
… |
That's it, probably! If you run into problems, don't hesitate to
|
220 | 220 | database transaction issues. (These should be back by 0.8.0.) |
221 | 221 | |
222 | 222 | + Disabled the "checking if the database is up to date at |
223 | | mediagoblin startup" feature |
| 223 | MediaGoblin startup" feature |
224 | 224 | + Disabled the garbage collection stuff by default for now |
225 | | (You can set garbage_collection under the config mediagoblin |
| 225 | (You can set garbage_collection under the config MediaGoblin |
226 | 226 | header to something other than 0 to turn it back on for now, but |
227 | 227 | it's potentially risky for the moment.) |
228 | 228 | |
… |
… |
That's it, probably! If you run into problems, don't hesitate to
|
231 | 231 | - Added support for cr2 files in raw_image media type |
232 | 232 | - Added a description to setup.py |
233 | 233 | - Collection and CollectionItem objects now have nicer in-python representations |
234 | | - Fixed unicode error with raw image mediatype logging |
| 234 | - Fixed Unicode error with raw image mediatype logging |
235 | 235 | - Fixed #945 "Host metadata does not confirm to spec (/.well-known/meta-data)" |
236 | 236 | |
237 | 237 | + Add XRD+XML formatting for /.well-known/host-meta |
… |
… |
That's it, probably! If you run into problems, don't hesitate to
|
268 | 268 | (which will be the foundation for MediaGoblin's federation) |
269 | 269 | - New theme: Sandy 70s Speedboat! |
270 | 270 | |
271 | | - Metadata features! We also now have a json-ld context. |
| 271 | - Metadata features! We also now have a JSON-LD context. |
272 | 272 | |
273 | 273 | - Many improvements for archival institutions, including metadata |
274 | 274 | support and featuring items on the homepage. With the (new!) |
… |
… |
That's it, probably! If you run into problems, don't hesitate to
|
283 | 283 | uploading many files at once. This is aimed to be useful for |
284 | 284 | archival institutions and groups where there is an already existing |
285 | 285 | and large set of available media that needs to be included. |
286 | | - Speaking of, the call to postgres in the makefile is fixed. |
| 286 | - Speaking of, the call to PostgreSQL in the makefile is fixed. |
287 | 287 | - We have a new, generic media-page context hook that allows for |
288 | 288 | adding context depending on the type of media. |
289 | 289 | - Tired of video thumbnails breaking during processing all the time? |
… |
… |
That's it, probably! If you run into problems, don't hesitate to
|
310 | 310 | data. It's basically the same thing as before, but packaged |
311 | 311 | separately from MediaGoblin. |
312 | 312 | - Many improvements to internationalization. Also (still rudimentary, |
313 | | but existant!) RTL language support! |
| 313 | but existent!) RTL language support! |
314 | 314 | |
315 | 315 | **Known issues:** |
316 | | - The host-meta is now json by default; in the spec it should be xml by |
| 316 | - The host-meta is now JSON by default; in the spec it should be XML by |
317 | 317 | default. We have done this because of compatibility with the pump |
318 | 318 | API. We are checking with upstream to see if there is a way to |
319 | 319 | resolve this discrepancy. |
… |
… |
nickname "Lore of the Admin"!
|
360 | 360 | - New tools to control how much users can upload, both as a general |
361 | 361 | user limit, or per file. |
362 | 362 | |
363 | | You can set this with the following options in your mediagoblin |
| 363 | You can set this with the following options in your MediaGoblin |
364 | 364 | config file: `upload_limit` and `max_file_size`. Both are integers |
365 | 365 | in megabytes. |
366 | 366 | |
… |
… |
nickname "Lore of the Admin"!
|
368 | 368 | upload too, though an interface for this is not yet exposed. See |
369 | 369 | the "uploaded" field on the core__users table. |
370 | 370 | |
371 | | - MediaGoblin now contains an authentication plugin for ldap! You |
| 371 | - MediaGoblin now contains an authentication plugin for LDAP! You |
372 | 372 | can turn on the mediagoblin.plugins.ldap plugin to make use of |
373 | 373 | this. See the documentation: :ref:`ldap-plugin` |
374 | 374 | |
… |
… |
v0.5.1 is a bugfix release... the steps are the same as for 0.5.1.
|
423 | 423 | ===== |
424 | 424 | |
425 | 425 | **NOTE:** If using the API is important to you, we're in a state of |
426 | | ransition towards a new API via the Pump API. As such, though the old |
427 | | API still probably works, some changes have happened to the way oauth |
| 426 | transition towards a new API via the Pump API. As such, though the old |
| 427 | API still probably works, some changes have happened to the way OAuth |
428 | 428 | works to make it more Pump-compatible. If you're heavily using |
429 | 429 | clients using the old API, you may wish to hold off on upgrading for |
430 | 430 | now. Otherwise, jump in and have fun! :) |
… |
… |
If you run into problems, don't hesitate to
|
469 | 469 | * Comment preview! |
470 | 470 | * Users now have the ability to change their email associated with their |
471 | 471 | account. |
472 | | * New oauth code as we move closer to federation support. |
473 | | * Experimental pyconfigure support for GNU-style configue and makefile |
| 472 | * New OAuth code as we move closer to federation support. |
| 473 | * Experimental pyconfigure support for GNU-style configure and makefile |
474 | 474 | deployment. |
475 | 475 | * Database foundations! You can now pre-populate the database models. |
476 | 476 | * Way faster unit test run-time via in-memory database. |
477 | 477 | * All mongokit stuff has been cleaned up. |
478 | | * Fixes for non-ascii filenames. |
| 478 | * Fixes for non-ASCII filenames. |
479 | 479 | * The option to stay logged in. |
480 | | * Mediagoblin has been upgraded to use the latest `celery <http://celeryproject.org/>`_ |
| 480 | * MediaGoblin has been upgraded to use the latest `Celery <http://celeryproject.org/>`_ |
481 | 481 | version. |
482 | 482 | * You can now add jinja2 extensions to your config file to use in custom |
483 | 483 | templates. |
484 | 484 | * Fixed video permission issues. |
485 | | * Mediagoblin docs are now hosted with multiple versions. |
486 | | * We removed redundent tooltips from the STL media display. |
| 485 | * MediaGoblin docs are now hosted with multiple versions. |
| 486 | * We removed redundant tooltips from the STL media display. |
487 | 487 | * We are now using itsdangerous for verification tokens. |
488 | 488 | |
489 | 489 | |
… |
… |
fix in the newly released document support which prevented the
|
495 | 495 | "conversion via libreoffice" feature. |
496 | 496 | |
497 | 497 | If you were running 0.4.0 you can upgrade to v0.4.1 via a simple |
498 | | switch and restarting mediagoblin/celery with no other actions. |
| 498 | switch and restarting MediaGoblin/Celery with no other actions. |
499 | 499 | |
500 | 500 | Otherwise, follow 0.4.0 instructions. |
501 | 501 | |
… |
… |
Otherwise, follow 0.4.0 instructions.
|
514 | 514 | Keep on reading to hear more about new plugin features. |
515 | 515 | 4. If you want to take advantage of new plugins that have statically |
516 | 516 | served assets, you are going to need to add the new "plugin_static" |
517 | | section to your nginx config. Basically the following for nginx:: |
| 517 | section to your Nginx config. Basically the following for Nginx:: |
518 | 518 | |
519 | 519 | # Plugin static files (usually symlinked in) |
520 | 520 | location /plugin_static/ { |
… |
… |
please note the following:
|
557 | 557 | date of an image when available (available as the |
558 | 558 | "original_date_visible" variable) |
559 | 559 | * Moved unit testing system from nosetests to py.test so we can better |
560 | | handle issues with sqlalchemy exploding with different database |
| 560 | handle issues with SQLAlchemy exploding with different database |
561 | 561 | configurations. Long story :) |
562 | 562 | * You can now disable the ability to post comments. |
563 | 563 | * Tags now can be up to length 255 characters by default. |
… |
… |
you run into problems, don't hesitate to
|
587 | 587 | |
588 | 588 | * New dropdown menu for accessing various features. |
589 | 589 | |
590 | | * Significantly improved URL generation. Now mediagoblin won't give |
| 590 | * Significantly improved URL generation. Now MediaGoblin won't give |
591 | 591 | up on making a slug if it looks like there will be a duplicate; |
592 | 592 | it'll try extra hard to generate a meaningful one instead. |
593 | 593 | |
… |
… |
you run into problems, don't hesitate to
|
595 | 595 | linking to a slug; /u/username/m/id:35/ is the kind of reference we |
596 | 596 | now use to linking to entries with ids. However, old links with |
597 | 597 | entries that linked to ids should work just fine with our migration. |
598 | | The only urls that might break in this release are ones using colons |
| 598 | The only URLs that might break in this release are ones using colons |
599 | 599 | or equal signs. |
600 | 600 | |
601 | 601 | * New template hooks for plugin authoring. |
602 | 602 | |
603 | 603 | * As a demonstration of new template hooks for plugin authoring, |
604 | | openstreetmap support now moved to a plugin! |
| 604 | OpenStreetMap support now moved to a plugin! |
605 | 605 | |
606 | 606 | * Method to add media to collections switched from icon of paperclip |
607 | 607 | to button with "add to collection" text. |
… |
… |
you run into problems, don't hesitate to
|
612 | 612 | waste gobs of memory. |
613 | 613 | |
614 | 614 | * Video transcoding now optional for videos that meet certain |
615 | | criteria. By default, MediaGoblin will not transcode webm videos |
| 615 | criteria. By default, MediaGoblin will not transcode WebM videos |
616 | 616 | that are smaller in resolution than the MediaGoblin defaults, and |
617 | | MediaGoblin can also be configured to allow theora files to not be |
| 617 | MediaGoblin can also be configured to allow Theora files to not be |
618 | 618 | transcoded as well. |
619 | 619 | |
620 | 620 | * Per-user license preference option; always want your uploads to be |
… |
… |
MongoDB-based MediaGoblin instance to the newer SQL-based system.
|
644 | 644 | |
645 | 645 | **Do this to upgrade** |
646 | 646 | |
647 | | # directory of your mediagoblin install |
| 647 | # directory of your MediaGoblin install |
648 | 648 | cd /srv/mediagoblin.example.org |
649 | 649 | |
650 | 650 | # copy source for this release |
… |
… |
MongoDB-based MediaGoblin instance to the newer SQL-based system.
|
664 | 664 | * **3d model support!** |
665 | 665 | |
666 | 666 | You can now upload STL and OBJ files and display them in |
667 | | MediaGoblin. Requires a recent-ish Blender; for details see: |
| 667 | MediaGoblin. Requires a recent Blender; for details see: |
668 | 668 | :ref:`deploying-chapter` |
669 | 669 | |
670 | 670 | * **trim_whitespace** |
671 | 671 | |
672 | 672 | We bundle the optional plugin trim_whitespace which reduces the size |
673 | | of the delivered html output by reducing redundant whitespace. |
| 673 | of the delivered HTML output by reducing redundant whitespace. |
674 | 674 | |
675 | 675 | See :ref:`core-plugin-section` for plugin documentation |
676 | 676 | |
… |
… |
MongoDB-based MediaGoblin instance to the newer SQL-based system.
|
684 | 684 | and `OMGMG <https://github.com/jwandborg/omgmg>`_, an example of |
685 | 685 | a web application hooking up to the API. |
686 | 686 | |
687 | | This is a plugin, so you have to enable it in your mediagoblin |
| 687 | This is a plugin, so you have to enable it in your MediaGoblin |
688 | 688 | config file by adding a section under [plugins] like:: |
689 | 689 | |
690 | 690 | [plugins] |
… |
… |
MongoDB-based MediaGoblin instance to the newer SQL-based system.
|
697 | 697 | |
698 | 698 | For applications that use OAuth to connect to the API. |
699 | 699 | |
700 | | This is a plugin, so you have to enable it in your mediagoblin |
| 700 | This is a plugin, so you have to enable it in your MediaGoblin |
701 | 701 | config file by adding a section under [plugins] like:: |
702 | 702 | |
703 | 703 | [plugins] |
… |
… |
MongoDB-based MediaGoblin instance to the newer SQL-based system.
|
717 | 717 | |
718 | 718 | Geolocation is also now on by default. |
719 | 719 | |
720 | | * **Miscelaneous visual improvements** |
| 720 | * **Miscellaneous visual improvements** |
721 | 721 | |
722 | 722 | We've made a number of small visual improvements including newer and |
723 | 723 | nicer looking thumbnails and improved checkbox placement. |
… |
… |
MongoDB-based MediaGoblin instance to the newer SQL-based system.
|
732 | 732 | 1. Make sure to run ``bin/gmg dbuptdate`` after upgrading. |
733 | 733 | |
734 | 734 | 2. If you set up your server config with an older version of |
735 | | mediagoblin and the mediagoblin docs, it's possible you don't |
| 735 | MediaGoblin and the MediaGoblin docs, it's possible you don't |
736 | 736 | have the "theme static files" alias, so double check to make |
737 | 737 | sure that section is there if you are having problems. |
738 | 738 | |
-
diff --git a/docs/source/siteadmin/theming.rst b/docs/source/siteadmin/theming.rst
index 11ae387..9c01a5b 100644
a
|
b
|
want to install this theme! Don't worry, it's fairly painless.
|
73 | 73 | Set up your webserver to serve theme assets |
74 | 74 | ------------------------------------------- |
75 | 75 | |
76 | | If you followed the nginx setup example in :ref:`webserver-config` you |
| 76 | If you followed the Nginx setup example in :ref:`webserver-config` you |
77 | 77 | should already have theme asset setup. However, if you set up your |
78 | | server config with an older version of mediagoblin and the mediagoblin |
| 78 | server config with an older version of MediaGoblin and the MediaGoblin |
79 | 79 | docs, it's possible you don't have the "theme static files" alias, so |
80 | 80 | double check to make sure that section is there if you are having |
81 | 81 | problems. |
… |
… |
Other variables you may consider setting:
|
103 | 103 | |
104 | 104 | `theme_web_path` |
105 | 105 | When theme-specific assets are specified, this is where MediaGoblin |
106 | | will set the urls. By default this is ``"/theme_static/"`` so in |
| 106 | will set the URLs. By default this is ``"/theme_static/"`` so in |
107 | 107 | the case that your theme was trying to access its file |
108 | 108 | ``"images/shiny_button.png"`` MediaGoblin would link |
109 | 109 | to ``/theme_static/images/shiny_button.png``. |
… |
… |
if necessary)::
|
136 | 136 | | | |- im_a_hedgehog.png # hedgehog-containing image used by theme |
137 | 137 | | | '- custom_logo.png # your theme's custom logo |
138 | 138 | | '- css/ |
139 | | | '- hedgehog.css # your site's hedgehog-specific css |
| 139 | | '- hedgehog.css # your site's hedgehog-specific CSS |
140 | 140 | |- README.txt # Optionally, a readme file (not required) |
141 | 141 | |- AGPLv3.txt # AGPL license file for your theme. (good practice) |
142 | 142 | '- CC0_1.0.txt # CC0 1.0 legalcode for the assets [if appropriate!] |
… |
… |
Only a few things need to go in here::
|
164 | 164 | [theme] |
165 | 165 | name = Hedgehog-ification |
166 | 166 | description = For hedgehog lovers ONLY |
167 | | licensing = AGPLv3 or later templates; assets (images/css) waived under CC0 1.0 |
| 167 | licensing = AGPLv3 or later templates; assets (images/CSS) waived under CC0 1.0 |
168 | 168 | |
169 | 169 | The name and description fields here are to give users an idea of what |
170 | 170 | your theme is about. For the moment, we don't have any listing |
… |
… |
You should include AGPLv3.txt with your theme as this is required for
|
232 | 232 | the assets. You can copy this from ``mediagoblin/licenses/``. |
233 | 233 | |
234 | 234 | In the above example, we also use CC0 to waive our copyrights to |
235 | | images and css, so we also included CC0_1.0.txt |
| 235 | images and CSS, so we also included CC0_1.0.txt |
236 | 236 | |
237 | 237 | |
238 | 238 | A README.txt file |
… |
… |
Simple theming by adding CSS
|
247 | 247 | ---------------------------- |
248 | 248 | |
249 | 249 | Many themes won't require anything other than the ability to override |
250 | | some of MediaGoblin's core css. Thankfully, doing so is easy if you |
| 250 | some of MediaGoblin's core CSS. Thankfully, doing so is easy if you |
251 | 251 | combine the above steps! |
252 | 252 | |
253 | 253 | In your theme, do the following (make sure you make the necessary |
… |
… |
Great, now open that file and add something like this at the end::
|
260 | 260 | <link rel="stylesheet" type="text/css" |
261 | 261 | href="{{ request.staticdirect('/css/theme.css', 'theme') }}"/> |
262 | 262 | |
263 | | You can name the css file whatever you like. Now make the directory |
| 263 | You can name the CSS file whatever you like. Now make the directory |
264 | 264 | for ``assets/css/`` and add the file ``assets/css/theme.css``. |
265 | 265 | |
266 | 266 | You can now put custom CSS files in here and any CSS you add will |
-
diff --git a/mediagoblin/plugins/basic_auth/README.rst b/mediagoblin/plugins/basic_auth/README.rst
index 82f247e..87a7b16 100644
a
|
b
|
|
5 | 5 | =================== |
6 | 6 | |
7 | 7 | The basic_auth plugin is enabled by default in mediagoblin.ini. This plugin |
8 | | provides basic username and password authentication for GNU Mediagoblin. |
| 8 | provides basic username and password authentication for GNU MediaGoblin. |
9 | 9 | |
10 | 10 | This plugin can be enabled alongside :ref:`openid-chapter` and |
11 | 11 | :ref:`persona-chapter`. |
-
diff --git a/mediagoblin/plugins/flatpagesfile/README.rst b/mediagoblin/plugins/flatpagesfile/README.rst
index 59cd621..0354a46 100644
a
|
b
|
Examples: ``flatpages-about``, ``about-view``, ``contact-view``, ...
|
57 | 57 | |
58 | 58 | The value has two parts separated by commas: |
59 | 59 | |
60 | | 1. **route path**: This is the url that this route matches. |
| 60 | 1. **route path**: This is the URL that this route matches. |
61 | 61 | |
62 | 62 | Examples: ``/about``, ``/contact``, ``/pages/about``, ... |
63 | 63 | |
… |
… |
The value has two parts separated by commas:
|
74 | 74 | |
75 | 75 | For example: ``'/siteadmin/{adminname:\w+}'`` |
76 | 76 | |
77 | | 2. **template**: The template to use for this url. The template is in |
| 77 | 2. **template**: The template to use for this URL. The template is in |
78 | 78 | the flatpagesfile template directory, so you just need to specify |
79 | 79 | the file name. |
80 | 80 | |
… |
… |
template::
|
139 | 139 | Recipes |
140 | 140 | ======= |
141 | 141 | |
142 | | Url variables |
| 142 | URL variables |
143 | 143 | ------------- |
144 | 144 | |
145 | | You can handle urls like ``/about/{name}`` and access the name that's |
| 145 | You can handle URLs like ``/about/{name}`` and access the name that's |
146 | 146 | passed in in the template. |
147 | 147 | |
148 | 148 | Sample route:: |
-
diff --git a/mediagoblin/plugins/ldap/README.rst b/mediagoblin/plugins/ldap/README.rst
index ea9a34b..049b5c4 100644
a
|
b
|
|
14 | 14 | .. _ldap-plugin: |
15 | 15 | |
16 | 16 | ============= |
17 | | ldap plugin |
| 17 | LDAP plugin |
18 | 18 | ============= |
19 | 19 | |
20 | 20 | .. Warning:: |
21 | 21 | This plugin is not compatible with the other authentication plugins. |
22 | 22 | |
23 | | This plugin allow your GNU Mediagoblin instance to authenticate against an |
| 23 | This plugin allow your GNU MediaGoblin instance to authenticate against an |
24 | 24 | LDAP server. |
25 | 25 | |
26 | | Set up the ldap plugin |
| 26 | Set up the LDAP plugin |
27 | 27 | ====================== |
28 | 28 | |
29 | 29 | 1. Install the ``python-ldap`` package. |
… |
… |
Set up the ldap plugin
|
32 | 32 | |
33 | 33 | [[mediagoblin.plugins.ldap]] |
34 | 34 | |
35 | | Configuring the ldap plugin |
| 35 | Configuring the LDAP plugin |
36 | 36 | =========================== |
37 | 37 | |
38 | | This plugin allows you to use multiple ldap servers for authentication. |
| 38 | This plugin allows you to use multiple LDAP servers for authentication. |
39 | 39 | |
40 | 40 | In order to configure a server, add the following to you MediaGoblin .ini file |
41 | | under the ldap plugin:: |
| 41 | under the LDAP plugin:: |
42 | 42 | |
43 | 43 | [[mediagoblin.plugins.ldap]] |
44 | 44 | [[[server1]]] |
… |
… |
under the ldap plugin::
|
50 | 50 | Make any necessary changes to the above to work with your sever. Make sure |
51 | 51 | ``{username}`` is where the username should be in LDAP_USER_DN_TEMPLATE. |
52 | 52 | |
53 | | If you would like to fetch the users email from the ldap server upon account |
| 53 | If you would like to fetch the users email from the LDAP server upon account |
54 | 54 | registration, add ``LDAP_SEARCH_BASE = 'ou=users,dc=testathon,dc=net'`` and |
55 | 55 | ``EMAIL_SEARCH_FIELD = 'mail'`` under you server configuration in your |
56 | 56 | MediaGoblin .ini file. |
57 | 57 | |
58 | 58 | .. Warning:: |
59 | 59 | By default, this plugin provides no encryption when communicating with the |
60 | | ldap servers. If you would like to use an SSL connection, change |
61 | | LDAP_SERVER_URI to use ``ldaps://`` and whichever port you use. Default ldap |
| 60 | LDAP servers. If you would like to use an SSL connection, change |
| 61 | LDAP_SERVER_URI to use ``ldaps://`` and whichever port you use. Default LDAP |
62 | 62 | port for SSL connections is 636. If you would like to use a TLS connection, |
63 | 63 | add ``LDAP_START_TLS = 'true'`` under your server configuration in your |
64 | 64 | MediaGoblin .ini file. |
-
diff --git a/mediagoblin/plugins/openid/README.rst b/mediagoblin/plugins/openid/README.rst
index 870a2b5..1a77733 100644
a
|
b
|
|
1 | 1 | .. _openid-chapter: |
2 | 2 | |
3 | 3 | =================== |
4 | | openid plugin |
| 4 | OpenID plugin |
5 | 5 | =================== |
6 | 6 | |
7 | | The openid plugin allows user to login to your GNU Mediagoblin instance using |
8 | | their openid url. |
| 7 | The OpenID plugin allows user to login to your GNU MediaGoblin instance using |
| 8 | their OpenID URL. |
9 | 9 | |
10 | 10 | This plugin can be enabled alongside :ref:`basic_auth-chapter` and |
11 | 11 | :ref:`persona-chapter`. |
12 | 12 | |
13 | 13 | .. note:: |
14 | | When :ref:`basic_auth-chapter` is enabled alongside this openid plugin, and |
15 | | a user creates an account using their openid. If they would like to add a |
| 14 | When :ref:`basic_auth-chapter` is enabled alongside this OpenID plugin, and |
| 15 | a user creates an account using their OpenID. If they would like to add a |
16 | 16 | password to their account, they can use the forgot password feature to do |
17 | 17 | so. |
18 | 18 | |
19 | 19 | |
20 | | Set up the openid plugin |
| 20 | Set up the OpenID plugin |
21 | 21 | ============================ |
22 | 22 | |
23 | 23 | 1. Install the ``python-openid`` package. |
-
diff --git a/mediagoblin/plugins/trim_whitespace/README.rst b/mediagoblin/plugins/trim_whitespace/README.rst
index db9a0c5..d83af06 100644
a
|
b
|
|
2 | 2 | Trim whitespace plugin |
3 | 3 | ======================= |
4 | 4 | |
5 | | Mediagoblin templates are written with 80 char limit for better |
| 5 | MediaGoblin templates are written with 80 char limit for better |
6 | 6 | readability. However that means that the HTML output is very verbose |
7 | 7 | containing *lots* of whitespace. This plugin inserts a middleware that |
8 | 8 | filters out whitespace from the returned HTML in the ``Response()`` |