aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/gmg_commands/batchaddmedia.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove remaining imports/calls to six not automatically removed by pyupgrade.Ben Sturmfels2021-03-051-7/+1
|
* Apply `pyupgrade --py3-plus` to remove Python 2 compatibility code.Ben Sturmfels2021-03-051-3/+2
|
* Add basic duplicate prevention for batchaddmedia.Ben Sturmfels2019-09-181-3/+18
|
* batchaddmedia: Simplify the Python 2 & 3 unicode handling.Ben Sturmfels2019-09-121-59/+12
| | | | | | | | | To avoid issues with quotes, I've replaced the manual CSV handling with csv.DictReader and simplified the unicode handling down to a single line. I don't believe any special encoding is required when writing to the database. This has been tested by importing a CSV with braille characters on Python 3 and Python 2.
* Remove unicode literals in batchaddmedia.Ben Sturmfels2019-09-121-13/+13
|
* Fix URL-based importing with batchaddmedia command.Ben Sturmfels2019-09-121-2/+18
| | | | | The command was raising "io.UnsupportedOperation: seek" for URL-based imports and didn't support HTTPS.
* Port batchaddmedia command to Python 3Simen Heggestøyl2017-10-161-3/+9
|
* Handle collection in batchaddmedia commandSimen Heggestøyl2017-10-161-0/+2
| | | | | | | Make the batchaddmedia command look for a 'collection-slug' column, that for each row may specify the slug of a collection that the media should be added to. This matches the '--collection-slug' argument of the addmedia command.
* Remove dead code in batchaddmedia.pySimen Heggestøyl2017-10-161-4/+1
| | | | | Remove an unused import and an unused local variable from batchaddmedia.py.
* Fix #928 - cleanup to avoid duplicated get_upload_file_limitsLoic Dachary2016-07-251-4/+1
| | | | Signed-off-by: Loic Dachary <loic@dachary.org>
* Collection changes and migration for federationJessica Tallon2015-10-071-1/+0
| | | | | | | - Adds a "type" column to the Collection object and allows the CollectionItem model to contain any object. - Changes "items" to "num_items" as per TODO - Renames "uploader", "creator" and "user" to a common "actor" in most places
* Fix some unit tests and bugsJessica Tallon2015-08-241-1/+1
| | | | | | | | | | | | | | | | | | This fixes a lot of the issues with the LocalUser changes that were merged recently. There was a problem where the attributes of LocalUser were not being eagerly loaded and because the Session was detached an exception was being raised when they were accessed. This also fixes some typo's which were introduced. Finally this adds a temporary fix for a potential SQLAlchemy bug, this is a bug where doing: User.query.filter(LocalUser.username == "some_username").first() does NOT yeild a user with the username "some_username" but all users on the site. The temp fix is to just query the LocalUser, this should be resolved when bug is confirmed and fixed upstream.
* Change codebase to query or create correct User modelJessica Tallon2015-07-311-1/+4
| | | | | | | The code base had many references to User.username and other specific to LocalUser attributes as that was the way it use to exist. This updates those to query on the generic User model but filtering by attributes on the LocalUser.
* Change all unicode() calls with six.text_type().Berker Peksag2015-06-251-1/+2
| | | | Fixes #5329.
* Port "gmg batchaddmedia" command to Python 3.Berker Peksag2014-10-021-20/+26
|
* Used the codecs library to read the csv file in batchaddmedia as unicode.Natalie Foust-Pilcher2014-06-211-5/+18
|
* Adjusted batchaddmedia to make use of more internal nodes. Added to the docs.tilly-Q2014-05-131-8/+9
|
* Removed unused imports.tilly-Q2014-05-131-2/+1
|
* Prepared for input without an 'id' column and made all of the internal nodestilly-Q2014-05-131-7/+4
| | | | into free floating nodes so that compact_and_validate will remove them.
* Added documentation for the batchaddmedia gmg tool to the mediagoblin docs.tilly-Q2014-05-121-3/+9
|
* Modified the batchaddmedia script so that it only looks for one csv file insteadtilly-Q2014-05-121-77/+46
| | | | of the previous method which looked for two files.
* Cleaned up the 'batchaddmedia' command a bittilly-Q2014-05-121-3/+11
|
* Updating batchaddmedia to use new metadata toolsChristopher Allan Webber2014-05-071-87/+12
|
* Removing unused variablesChristopher Allan Webber2014-05-071-3/+0
|
* Removing build_json_ld_metadataChristopher Allan Webber2014-05-071-16/+1
|
* The URL format checker now works correctlyChristopher Allan Webber2014-05-071-33/+44
| | | | ...though it isn't checking the right thing
* In the middle of some major changestilly-Q2014-04-211-5/+21
|
* Fixed a problem that was causing errors in batch uploading remote files.tilly-Q2014-04-211-1/+1
|
* I had imported requests twicetilly-Q2014-04-211-1/+0
|
* Made it possible to submit media with the metadata providedtilly-Q2014-04-211-0/+1
|
* Added the 'requests' library as a dependency and switched over to using it totilly-Q2014-04-211-5/+4
| | | | fetch remote pieces of media in the batchupload script
* Fixed incorrectly coded references to filesystem pathstilly-Q2014-04-211-7/+3
|
* Fixed a bad get of 'dcterms:rights' and am throwing away the idea of an externaltilly-Q2014-04-211-10/+11
| | | | | context file for the json-ld because it feels unnecessary seeing as we are just using the dc core terms
* Wrote more comprehensive error messages.tilly-Q2014-04-211-7/+21
|
* Fixed a minor error in the batch upload script and modified the json-ld context.tilly-Q2014-04-211-4/+5
|
* Fixed up some fatal errors. Is still not ready.tilly-Q2014-04-211-22/+24
|
* Added exception handling into the metadata format checking function.tilly-Q2014-04-211-2/+18
|
* Began work on metadata validationtilly-Q2014-04-211-0/+33
|
* Changed some of the print messages as well as tweaked the order oftilly-Q2014-04-211-13/+17
| | | | | the commands attempts to figure out what type of file the target file is.
* I made it so the command no longer requires the "Target type" to be provided,tilly-Q2014-04-211-22/+33
| | | | | | | | | | | 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.
* Minor change in the wording of argparsing.tilly-Q2014-04-211-2/+2
|
* The script now officially works! It works in many different situations, whethertilly-Q2014-04-211-19/+111
| | | | | | | | 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.
* This branch will create a commandline bulk-upload script. So far, I have writtentilly-Q2014-04-211-0/+110
the code to read csv files into a usable dictionary.