Mercurial > hg > sworduploader
changeset 12:ed98a232e4a5
Updated license
author | Marco Fabiani <marco.fabiani@eecs.qmul.ac.uk> |
---|---|
date | Wed, 18 Apr 2012 11:03:57 +0100 |
parents | 4206512d8ae2 |
children | cc6c7235d08a |
files | LICENSE.txt README sworduploader.py |
diffstat | 3 files changed, 25 insertions(+), 46 deletions(-) [+] |
line wrap: on
line diff
--- a/LICENSE.txt Wed Apr 18 10:53:19 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -Copyright (c) 2012, Marco Fabiani -Copyright (c) 2012, Queen Mary, University of London - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the <organization> nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -
--- a/README Wed Apr 18 10:53:19 2012 +0100 +++ b/README Wed Apr 18 11:03:57 2012 +0100 @@ -2,18 +2,26 @@ -------------------- A python script to submit large numbers of files to a SWORD2-compatible repository, specifically DSpace 1.8x. -Built on the SWORD2 python client library: https://bitbucket.org/beno/python-sword2/overview +Built on the SWORD2 python client library: https://bitbucket.org/beno/python-sword2/overview with modifications. +----------------------------------------------- +Source: + +https://code.soundsoftware.ac.uk/projects/sworduploader/repository + +----------------------------------------------- Dependencies: - python 2.X -- sword2 library: https://bitbucket.org/beno/python-sword2/src +- sword2 library, with modifications: https://bitbucket.org/marcofabiani/python-sword2/src +----------------------------------------------- Installation: - no installation required, simply copy the script sworduploader.py to a suitable location. The first time you run the script, it will create the sword2_logging.conf file. +----------------------------------------------- Usage: sworduploader[-h] [--username USER_NAME] [--title TITLE] @@ -24,13 +32,17 @@ Bulk upload to DSpace using SWORDv2. positional arguments: - data Accepts: METSDSpaceSIP packages, zip files, - directories, single files. NOTE: METSDSpaceSIP packages are - only accepted by Collections with a workflow! + data Accepts: METSDSpaceSIP and BagIt packages, simple zip + files, directories, single files. NOTE: METSDSpaceSIP + packages are only accepted by Collections with a + workflow! optional arguments: -h, --help show this help message and exit --username USER_NAME DSpace username. + --zip If "data" is a directory, compress it and post it as a + single file. The zip file will be saved along with the + individual files. --title TITLE Title (ignored for METS packages). --author AUTHOR [AUTHOR ...] Author(s) (ignored for METS packages). Accepts @@ -46,11 +58,3 @@ submission can be found in the "My Account -> Submissions" section of the user's area. -Source: - -https://code.soundsoftware.ac.uk/projects/sworduploader/repository - ------------------------------------------------ -Copyright 2012 Marco Fabiani -Copyright 2012 Queen Mary, University of London ------------------------------------------------- \ No newline at end of file
--- a/sworduploader.py Wed Apr 18 10:53:19 2012 +0100 +++ b/sworduploader.py Wed Apr 18 11:03:57 2012 +0100 @@ -1,17 +1,17 @@ #!usr/bin/env/ python -""" SWORD2 DSpace bulk uploader - v0.4 +""" + +SWORD2 DSpace bulk uploader - v0.4 A python script to submit large numbers of files to a SWORD2-compatible repository, specifically DSpace 1.8x. -Built on the SWORD2 python client library: https://bitbucket.org/beno/python-sword2/overview +Built on the SWORD2 python client library: https://bitbucket.org/beno/python-sword2/overview with modifications. Dependencies: - python 2.X -- sword2 library, with modifications: - (original) https://bitbucket.org/beno/python-sword2/src - (modified) https://bitbucket.org/marcofabiani/python-sword2/src +- sword2 library, with modifications: https://bitbucket.org/marcofabiani/python-sword2/src ----------------------------------- Centre for Digital Music, Queen Mary, University of London @@ -37,6 +37,7 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----------------------------------- + A copy of this License can also be found in the COPYING file distributed with the source code. """ @@ -46,9 +47,9 @@ # Parse arguments parser = argparse.ArgumentParser(description="Bulk upload to DSpace using SWORDv2.",epilog="If the submission is created successfully, it will remain open to be completed with the necessary metadata and licenses, using the DSpace web interface. The submission can be found in the \"My Account -> Submissions\" section of the user's area.") parser.add_argument("data", type=str, nargs=1, - help="Accepts: METSDSpaceSIP packages, zip files, directories, single files. NOTE: METSDSpaceSIP packages are only accepted by Collections with a workflow!") + help="Accepts: METSDSpaceSIP and BagIt packages, simple zip files, directories, single files. NOTE: METSDSpaceSIP packages are only accepted by Collections with a workflow!") parser.add_argument("--username", dest="user_name", type=str,nargs=1, help="DSpace username.") -parser.add_argument("--zip", action="store_true",dest="zip",default=False, help="If \"data\" is a directory, send it as a single zip archive to preserve its structure. The zip file will be saved along with the individual files.") +parser.add_argument("--zip", action="store_true",dest="zip",default=False, help="If \"data\" is a directory, compress it and post it as a single file. The zip file will be saved along with the individual files.") parser.add_argument("--title", dest="title", type=str,nargs=1, help="Title (ignored for METS packages).") parser.add_argument("--author", dest="author", type=str,nargs="+", help="Author(s) (ignored for METS packages). Accepts multiple entries in the format \"Surname, Name\"") parser.add_argument("--date", dest="date", type=str,nargs=1, help="Date of creation (string) (ignored for METS packages).")