223 Commits

Author SHA1 Message Date
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
Christopher Allan Webber
a59f92f3ec That manager.process() line no longer made sense 2013-08-16 15:30:16 -07:00
Christopher Allan Webber
77ea4c9bd1 Updating to the point where we can allllmost run with the new reprocessing code
This commit sponsored by Odin Hørthe Omdal.  Thank you!
2013-08-16 15:30:16 -07:00
Christopher Allan Webber
d1e9913b71 Should be enough to get to the point where you can actually initialize a processing command now.
However, it doesn't celery task-ify it...

This commit sponsored by Catalin Cosovanu.  Thank you!
2013-08-16 15:30:16 -07:00
Christopher Allan Webber
4ba5bdd96e Steps toward working "run" reprocessing command.
This commit sponsored by Philippe Casteleyn.  Thank you!
2013-08-16 15:30:16 -07:00
Christopher Allan Webber
7a414c8d42 Moving celery setup to the right place
This commit sponsored by Jose Manuel Zueco Lazaro.  Thank you!
2013-08-16 15:30:15 -07:00
Christopher Allan Webber
19ed12b279 Whitespacin' it up. 2013-08-16 15:30:15 -07:00
Christopher Allan Webber
55a10fef0a gmg reprocess available --action-help now tells you processor arguments!
Every reprocessing action possible can inform you of its command line
argument stuff!  Is that awesome or what?
2013-08-16 15:30:15 -07:00
Christopher Allan Webber
85ead8ac3c "initial" reprocessing subcommand now works!
We are on our way now to a working reprocessing system under this
redesign!

This commit sponsored by Bjarni Rúnar Einarsson.  Thank you!
2013-08-16 15:30:15 -07:00
Christopher Allan Webber
58bacb33ac More progress towards the new reprocessing infrastructure: args updating
This commit sponsored by Elizabeth Webber.  Thanks, sis!
2013-08-16 15:30:15 -07:00
Rodney Ewing
3e9faf85da added comments and did a little refactoring. not sure if it is actually any clearer though 2013-08-16 15:30:14 -07:00
Rodney Ewing
f30fbfe60c add option to not run eagerly 2013-08-16 15:30:14 -07:00
Rodney Ewing
9a2c66ca9e added image reprocessing 2013-08-16 15:30:14 -07:00
Rodney Ewing
bf909ab048 pep 8 2013-08-16 15:30:13 -07:00
Rodney Ewing
065db04730 add command option for regenerating all thumbnails 2013-08-16 15:30:13 -07:00
Rodney Ewing
842ba30529 make media_id an optional argument 2013-08-16 15:30:13 -07:00
Rodney Ewing
11a99d787f refactored _run_reprocessing 2013-08-16 15:30:13 -07:00
Rodney Ewing
243756e020 added a set_media_state function. removed the --all flag (just don't enter any media_ids to process all media). slight refactor 2013-08-16 15:30:13 -07:00
Rodney Ewing
4a36407d39 Pep 8 2013-08-16 15:30:13 -07:00
Rodney Ewing
81d880b16a Just raise standard exception. Pass print statement to gettext 2013-08-16 15:30:13 -07:00
Rodney Ewing
7c1f6a6aee added a _run_reprocessing function which handles the hook calls 2013-08-16 15:30:13 -07:00