243 Commits

Author SHA1 Message Date
tilly-Q
1d09e8b4f1 Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin into metadata
Conflicts:
	mediagoblin/gmg_commands/__init__.py
2014-05-13 15:24:59 -04:00
tilly-Q
8524a6bdc5 Added documentation for the batchaddmedia gmg tool to the mediagoblin docs. 2014-05-12 17:02:31 -04:00
tilly-Q
7d52eb7705 Modified the batchaddmedia script so that it only looks for one csv file instead
of the previous method which looked for two files.
2014-05-12 14:10:29 -04:00
tilly-Q
e8d64d453b Cleaned up the 'batchaddmedia' command a bit 2014-05-12 13:19:03 -04:00
Christopher Allan Webber
6fab7734d6 Updating batchaddmedia to use new metadata tools 2014-05-07 18:50:48 -05:00
Christopher Allan Webber
a448628636 Removing unused variables 2014-05-07 15:21:58 -05:00
Christopher Allan Webber
2a2c534e51 Removing build_json_ld_metadata 2014-05-07 15:21:10 -05:00
Christopher Allan Webber
af3a9107a9 The URL format checker now works correctly
...though it isn't checking the right thing
2014-05-07 13:39:03 -05:00
tilly-Q
9f5d388ec0 In the middle of some major changes 2014-04-21 19:07:28 -04:00
tilly-Q
7ff99dabfb Fixed a problem that was causing errors in batch uploading remote files. 2014-04-21 12:29:00 -04:00
tilly-Q
e00ce53ef6 I had imported requests twice 2014-04-21 12:18:29 -04:00
tilly-Q
45f426ddee Made it possible to submit media with the metadata provided 2014-04-21 12:11:12 -04:00
tilly-Q
ecea4847e8 Added the 'requests' library as a dependency and switched over to using it to
fetch remote pieces of media in the batchupload script
2014-04-21 12:11:11 -04:00
tilly-Q
18a9c50db6 Fixed incorrectly coded references to filesystem paths 2014-04-21 12:10:20 -04:00
tilly-Q
77d51d4f33 Fixed a bad get of 'dcterms:rights' and am throwing away the idea of an external
context file for the json-ld because it feels unnecessary seeing as we are just
using the dc core terms
2014-04-21 12:10:20 -04:00
tilly-Q
907d9626e3 Wrote more comprehensive error messages. 2014-04-21 12:10:19 -04:00
tilly-Q
e46760d315 Fixed a minor error in the batch upload script and modified the json-ld context. 2014-04-21 12:10:19 -04:00
tilly-Q
8c7cccf6cc Fixed up some fatal errors. Is still not ready. 2014-04-21 12:10:19 -04:00
tilly-Q
26b3d6cf27 Added exception handling into the metadata format checking function. 2014-04-21 12:10:19 -04:00
tilly-Q
3e76b2bc77 Began work on metadata validation 2014-04-21 12:10:19 -04:00
tilly-Q
5c14f62d19 Changed some of the print messages as well as tweaked the order of
the commands attempts to figure out what type of file the target file
is.
2014-04-21 12:10:19 -04:00
tilly-Q
28ecc53a5a I made it so the command no longer requires the "Target type" to be provided,
it now recognizes whether the target is a directory or an archive on its own.

I added in a help message, which is still incomplete, but should make it easier
for admins to know how to use this new command. I believe we should also provi-
-de an example of the location.csv and metadata.csv files, so there is no conf-
-usion. Also, I made it possible for the command to recognize zip files as a
valid archive. I also made some minor changes to the commands description w/i
the larger gmg command help menu.
2014-04-21 12:10:19 -04:00
tilly-Q
6c37aeaa33 Minor change in the wording of argparsing. 2014-04-21 12:10:19 -04:00
tilly-Q
268f243074 The script now officially works! It works in many different situations, whether
the media is to be uploaded is stored locally or on the web. Still have to clean
up the code and look for errors. I may also refactor some of this into a functi-
on to be used with a GUI frontend in another project. Lastly, I need to merge
this with the metadata branch I've been working on, and convert the metadata.csv
information into the proper format for the new metadata column.
2014-04-21 12:10:18 -04:00
tilly-Q
8aa015978c This branch will create a commandline bulk-upload script. So far, I have written
the code to read csv files into a usable dictionary.
2014-04-21 12:10:18 -04:00
Berker Peksag
521824da5c Issue #824: Add gmg deletemedia command. 2014-04-10 15:08:29 -05:00
Christopher Allan Webber
e0bf6b4bf7 Merge remote-tracking branch 'refs/remotes/rodney757/dbupdate'
Conflicts:
	mediagoblin/db/util.py
	mediagoblin/gmg_commands/dbupdate.py
2014-01-02 15:01:54 -06:00
Christopher Allan Webber
7468c39039 Removing the "logging is debug by default in dbupdate"
This commit sponsored by David Neudorfer.  Thank you!
2013-11-25 09:31:41 -06:00
tilly-Q
844b6d70ea This is a tiny change. I took out the warnings that were displayed when a plugin
didn't have a FOUNDATIONS dictionary because people found them annoying.
2013-11-21 15:20:43 -05:00
Christopher Allan Webber
210a6cebe0 Switching the addmedia tool over to using the get_upload_file_limits tool also.
This commit sponsored by Damien Radtke.  Thanks!
2013-11-14 11:09:18 -06:00
Christopher Allan Webber
86d5cb8a57 --license doesn't use the user default so correct that. It does use a URL though.
This commit sponsored by Benjamin Williams.  Thank you!
2013-11-14 10:25:31 -06:00
Christopher Allan Webber
862e05a5b5 Hacks to get past unicode barriers
The methods we're using here aren't ideal but they mirror those used
in the submit views...

This commit sponsored by Alexander Couper.  Thanks!
2013-11-14 09:51:29 -06:00
Christopher Allan Webber
b7a8760b6d Start of addmedia command. Kinda close to working ;) 2013-11-13 13:59:16 -06:00
tilly-Q
045fe0ee9d Merge branch 'master' into OPW-Moderation-Update
Conflicts:
	mediagoblin/db/migrations.py
2013-09-12 18:58:04 -04:00
tilly-Q
25625107b6 This was a quick update, I mostly worked on the transition from using the old
User table columns (is_admin, status, email_verified) and making sure that
their functionality is instead completely handled by privileges. I also worked
on the meta pages which I hope to finish soon. I set up migrations to ensure
the default privileges are given to users that should have them. Lastly, I made
it so that banned users can log out.

===============================================================================
    Made Sure the Vestigial Columns of the User Table were not being Used
===============================================================================
--\ mediagoblin/auth/views.py
--\ mediagoblin/db/models.py
--\ mediagoblin/templates/mediagoblin/base.html
--\ mediagoblin/templates/mediagoblin/moderation/user.html
--\ mediagoblin/templates/mediagoblin/user_pages/collection_lis$
--\ mediagoblin/templates/mediagoblin/user_pages/user.html
--\ mediagoblin/tests/test_auth.py
--\ mediagoblin/tests/test_persona.py
--\ mediagoblin/user_pages/views.py

===============================================================================
    Wrote the Migrations to Set up the Default Privileges
===============================================================================
--\ mediagoblin/db/migrations.py
--\ mediagoblin/gmg_commands/users.py

===============================================================================
    Work on the Meta Pages
===============================================================================
--\ mediagoblin/meta/routing.py
--\ mediagoblin/meta/views.py
--\ mediagoblin/static/css/base.css
--\ mediagoblin/templates/mediagoblin/meta/terms_of_service.html

===============================================================================
    Small Changes
===============================================================================
--\ mediagoblin/templates/mediagoblin/base.html
--| Benevolently made it so that banned users can log out

===============================================================================
X   X   X   X   X   X   X   X   X   X   X   X   X   X   X   X   X   X   X   X
===============================================================================
2013-09-08 18:26:37 -04:00
Rodney Ewing
635dd6cc31 don't set logging level to debug 2013-09-02 11:55:41 -07:00
tilly-Q
dfd66b789c This was a big commit! I included lots of documentation below, but generally I
did a few things. I wrote many many many new tests, either in old test files or
in the three new test files I made. I also did some code-keeping work, deleting
trailing whitespace and deleting vestigial code. Lastly, I fixed the parts of
the code which I realized were broken thru the process of running tests.

===============================================================================
 Deleted trailing whitespace:
===============================================================================
--\  mediagoblin/decorators.py
--\  mediagoblin/auth/tools.py
--\  mediagoblin/db/migrations.py
--\  mediagoblin/db/models.py
--\  mediagoblin/gmg_commands/users.py
--\  mediagoblin/moderation/forms.py
--\  mediagoblin/moderation/tools.py
--\  mediagoblin/moderation/views.py
--\  mediagoblin/templates/mediagoblin/moderation/media_panel.html
--\  mediagoblin/templates/mediagoblin/moderation/report.html
--\  mediagoblin/templates/mediagoblin/moderation/report_panel.html
--\  mediagoblin/templates/mediagoblin/moderation/user.html
--\  mediagoblin/templates/mediagoblin/moderation/user_panel.html
--\  mediagoblin/templates/mediagoblin/user_pages/report.html
--\  mediagoblin/templates/mediagoblin/utils/report.html
--\  mediagoblin/user_pages/lib.py
--\  mediagoblin/user_pages/views.py
===============================================================================
 Deleted Vestigial Code
===============================================================================
--\  mediagoblin/db/util.py
--\  mediagoblin/tests/test_notifications.py
===============================================================================
 Modified the Code:
===============================================================================
--\  mediagoblin/moderation/tools.py
--| Encapsulated the code around giving/taking away privileges into two
  | funtions.

--\  mediagoblin/moderation/views.py
--| Imported and used the give/take away privilege functions
--| Replaced 'require_admin_or_moderator_login' with
  |'user_has_privilege(u"admin")' for adding/taking away privileges, only
  | admins are allowed to do this.

--\  mediagoblin/templates/mediagoblin/banned.html
--| Added relevant translation tags
--| Added ability to display indefinite banning

--\  mediagoblin/templates/mediagoblin/user_pages/media.html
--| Made sure the add comments button was only visible for users with the
  | `commenter` privilege

--\  mediagoblin/tests/test_submission.py
--| Paroneayea fixed a DetachedInstanceError I was having with the our_user
  | function

--\  mediagoblin/tests/tools.py
--| Added a fixture_add_comment_report function for testing.

--\  mediagoblin/tools/response.py
--| Fixed a minor error where a necessary return statement was missing
--| Fit the code within 80 columns

--\  mediagoblin/user_pages/views.py
--| Added a necessary decorator to ensure that only users with the 'commenter'
  | privilege can post comments
===============================================================================
 Wrote new tests for an old test file:
===============================================================================
--\  mediagoblin/tests/test_auth.py
--| Added a new test to make sure privilege granting on registration happens
  | correctly

--\  mediagoblin/tests/test_modelmethods.py*
--| Added a test to ensure the User method has_privilege works properly
===============================================================================
 Wrote entirely new files full of tests:
===============================================================================
--\  mediagoblin/tests/test_moderation.py
--\  mediagoblin/tests/test_privileges.py
--\  mediagoblin/tests/test_reporting.py
===============================================================================
===============================================================================
NOTE: Any files I've marked with a * in this commit report, were actually subm-
itted in my last commit. I made that committ to fix an error I was having, so
they weren't properly documented in that report.
===============================================================================
===============================================================================
2013-08-29 13:47:50 -04:00
tilly-Q
9e204e49c9 Merge branch 'master' into OPW-Moderation-Update
Conflicts:
	mediagoblin/db/models.py
	mediagoblin/decorators.py
	mediagoblin/routing.py
	mediagoblin/user_pages/views.py
2013-08-20 12:21:13 -04:00
Rodney Ewing
3225008f04 include a thumb_size string with each Resizer to run gmg reprocess thumbs 2013-08-16 15:30:22 -07:00
Rodney Ewing
5ac1fe8064 Audio Initial Processor 2013-08-16 15:30:18 -07:00
Rodney Ewing
36c17b85c1 remove old code 2013-08-16 15:30:18 -07:00
Rodney Ewing
a7f426368d bulk_run reprocessing complete 2013-08-16 15:30:18 -07:00
Rodney Ewing
0c4b68a804 Resize all processed thumbs 2013-08-16 15:30:18 -07:00
Rodney Ewing
441ed10de0 wrap get_entry_and_processing_manager in try, except block 2013-08-16 15:30:18 -07:00
Rodney Ewing
4e6013689b run initial processing on all failed entries 2013-08-16 15:30:18 -07:00
Rodney Ewing
7584080bf7 add bulk_run, thumbs, and initial sub_commands 2013-08-16 15:30:18 -07:00
Christopher Allan Webber
c100b8b284 Fixing ./bin/gmg reprocess available, which I broke :) 2013-08-16 15:30:17 -07:00
Christopher Allan Webber
de332ab9f5 Trying to fix the bug that's happening to rodney757 but not to me ;) 2013-08-16 15:30:17 -07:00
Christopher Allan Webber
ff12ecef34 Revert "use parser.parse_known_args() instead of parser.parse_args()"
This reverts commit 029e779c468ba1a6bfd893679cfaae7f418f45dd.
(and a bit more!)

This wasn't needed anymore because we did a "rest" capture and passed
that over to the reprocess run command.

Conflicts:
	mediagoblin/gmg_commands/assetlink.py
	mediagoblin/gmg_commands/dbupdate.py
	mediagoblin/gmg_commands/import_export.py
	mediagoblin/gmg_commands/users.py
2013-08-16 15:30:17 -07:00
Christopher Allan Webber
55cfa34063 Renaming the processing manager stuff to be less ambiguous.
BONUS COMMIT to Ben Finney and the Free Software Melbourne crew. :)

IRONY: Initially I committed this as "media manager".
2013-08-16 15:30:16 -07:00