{ "info": { "author": "Markus Binsteiner", "author_email": "makkus@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Natural Language :: English", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "=================\nMarkus Binsteiner\n=================\n\n :Author: Markus Binsteiner\n\n.. contents::\n\n1 Pigshare\n----------\n\nPython client library and commandline tool for institutional Figshare.\n\nThe commandline options are created dynamically from the available api-method wrapper code, which is why some of them might feel a bit clumsy. Also, many of the commands only support values as json-formatted strings. I might change that in the future, but it'd require more complex cli-argparse creation code and I'm not sure whether it's worth it.\n\n1.1 Notes\n~~~~~~~~~\n\nSo far, I've only tested this on Linux.\n\n1.2 Requirements\n~~~~~~~~~~~~~~~~\n\n- python-dev package (for simplejson compilation I think)\n\n- argparse\n\n- setuptools\n\n- restkit\n\n- booby\n\n- simplejson\n\n- parinx\n\n- pyclist\n\n- argcomplete\n\n1.3 Installation\n~~~~~~~~~~~~~~~~\n\n1.3.1 Release\n^^^^^^^^^^^^^\n\n::\n\n (sudo) pip install pigshare\n\n1.3.2 Development version from Github\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n::\n\n (sudo) pip install https://github.com/UoA-eResearch/pigshare/archive/master.zip\n\n1.4 Usage (commandline client)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n1.4.1 Connection details\n^^^^^^^^^^^^^^^^^^^^^^^^\n\n*pigshare* reads a config file $HOME/.pigshare.conf, in the format:\n\n::\n\n [default]\n url = https://api.figsh.com/v2\n token = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n(note, this example uses the staging environment)\n\n*pigshare* supports profiles, so you can have multiple profiles in your config file like for example:\n\n::\n\n [default]\n url = https://api.figsh.com/v2\n token = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n [markus]\n url = https://api.figshare.com/v2\n token = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n [not_markus_but_somebody_else]\n url = https://api.figshare.com/v2\n token = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\nNow, when you call *pigshare* with the **-p** argument, you can switch between different backends/identities:\n\n::\n\n pigshare -p markus [command]\n\nThe command you chose will be using the selected connection parameters.\n\n1.4.2 Features:\n^^^^^^^^^^^^^^^\n\n1.4.2.1 Supported\n:::::::::::::::::\n\n- creation of articles, via a json string or interactively\n\n- listing of public and private articles\n\n- searching for public and private articles\n\n- updating of articles\n\n- creation of collections, via a json string or interactively\n\n- listing of public and private collections\n\n- searching for public and private collections\n\n- updating of collections\n\n- listing of categories and their ids\n\n- listing of licenses and their ids\n\n- publishing of articles and collections\n\n1.4.2.2 Not (yet) supported\n:::::::::::::::::::::::::::\n\n- queries with more than 1000 results, only the first 1000 results are displayed\n\n- automatically deal with the 10 item limits on some methods\n\n- everything else\n\n1.4.3 General usage\n^^^^^^^^^^^^^^^^^^^\n\nBasic usage is displayed via:\n\n::\n\n pigshare -h\n\nCommand specific usage can be displayed via:\n\n::\n\n pigshare [command] -h\n\n1.4.4 Interactive input\n^^^^^^^^^^^^^^^^^^^^^^^\n\nSome of the commands offer interactive input (e.g. create\\ :sub:`article`\\, edit\\ :sub:`article`\\, create\\ :sub:`collection`\\, ...). If you choose to use that, you can get help on any particular field by typing '?' as value. Some fields support a more advanced help functionality:\n\n- **categories**: '?' lists all available categories along with their internal figshare id (which you need to provide as input), '? [search\\ :sub:`term`\\]' lets you filter this list with the provided search term\n\n- **authors**: '?' lists all authors and their internal ids (always use the latter if you know it) that *pigshare* knows about (authors that came up in past queries, so this is not a comprehensible list, if you can't find the author you want, try to find it via the web-interface)\n\n- **licenses**: '?' lists all licenses and their id, '? search\\ :sub:`term`\\' filters the result\n\n- **defined\\ :sub:`type`\\**: '?' lists the available and valid article types\n\nSome fields support multiple values (list input). If that's the case, *pigshare* will tell you about it, and let you input the single items one after another. Once you are finished, just press 'enter' on an empty field.\n\n1.4.5 Filtering of output fields\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n(Sub-)commands that display one or more items can be called using an output filter (the **-o** argument before the sub-command). Depending on the sub-command called only certain fields of the items are available (e.g. **list\\ :sub:`articles`\\** has only a subset of fields compared to **read\\ :sub:`article`\\**).\n\nI'd recommend trying out the command you want to run first, and checking which fields are available, then run the command again with the appropriate filter. A command to list all articles and only display the **doi** and **title** of each article would be:\n\n::\n\n pigshare -o doi,title list_articles\n\nFor more advanced filtering, consider piping in the 'full' output of *pigshare* into a tool like jq ( `https://stedolan.github.io/jq/ `_ ).\n\n1.4.6 Commonly used commands\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n1.4.6.1 Articles\n::::::::::::::::\n\n1.4.6.1.1 List articles\n'''''''''''''''''''''''\n\nTo list all articles and display the **doi**, (internal) **id**, **title**, **url**, and **published\\ :sub:`date`\\** for each, issue:\n\n::\n\n pigshare list_articles\n\nTo display a table with all articles, but only display **doi** and **title**, you can use:\n\n::\n\n pigshare -o doi,title list_articles\n\n1.4.6.1.2 Read an article\n'''''''''''''''''''''''''\n\nTo display the properties of an article, use:\n\n::\n\n pigshare read_article [article_id]\n\nTo display the doi and all tags of a number of articles, use (tags are not part of the 'short' article format that the **list\\ :sub:`articles`\\** command returns):\n\n::\n\n pigshare -o doi,tags read_article [article_id] [article_id] [article_id]\n\n1.4.6.1.3 Search for articles\n'''''''''''''''''''''''''''''\n\nTo list all articles matching a search string, issue:\n\n::\n\n pigshare search_articles --search_term [search_term]\n\nTo display all dois and titles of articles that match a search string:\n\n::\n\n pigshare -o doi,title search_articles --search_term [search_term]\n\n1.4.6.1.4 List my articles\n''''''''''''''''''''''''''\n\nTo list all of your own articles:\n\n::\n\n pigshare list_my_articles\n\n1.4.6.1.5 To create a new article\n'''''''''''''''''''''''''''''''''\n\n::\n\n pigshare create_article --article '{\"title\": \"Markus test\", \"custom_fields\": {\"key1\": \"value\"}}'\n\nOr, if you want *pigshare* to ask your input for every one of the fields:\n\n::\n\n pigshare create_article\n\n1.4.6.1.6 Upload one (or more files) for an article\n'''''''''''''''''''''''''''''''''''''''''''''''''''\n\n::\n\n pigshare upload_new_file --id [article_id] file1 [file2 ... ...]\n\n1.4.6.2 Collections\n:::::::::::::::::::\n\nVery similar to articles.\n\n1.4.7 Workflows\n^^^^^^^^^^^^^^^\n\n1.4.7.1 Reorder articles in collections\n:::::::::::::::::::::::::::::::::::::::\n\nBecause of how Figshare works at the moment (collections are sorted by timestamp), the easiest way to change the order of articles within a collection is to 're-publish' an already published article. Usually that doesn't result in a new DOI for that article (which would be bad).\n\nSo, if you want to order the articles alphabetically for example, you could do it this way:\n\n- first, find the list of article ids\n\n ::\n\n $ pigshare -o title,id -p martin search_my_articles --search_term ISSP\n ISSP1991: Religion I 2000910\n ISSP1992: Social Inequality II 2000913\n ISSP1993: Environment I 2000916\n ISSP1994: Family and Changing Gender Roles II 2000919\n ISSP1995: National Identity I 2000922\n ISSP1996: Role of Government III 2000925\n ISSP1997: Work Orientations II 2000928\n ISSP1998: Religion II 2000934\n ISSP1999: Social Inequality III 2000937\n ISSP2000: Environment II 2000940\n ISSP2001: Social Networks II 2000943\n ISSP2002: Family and Changing Gender Roles III 2000946\n ISSP2003: National Identity II 2000949\n ISSP2004: Citizenship I 2000952\n ISSP2005: Work Orientations III 2000955\n ISSP2006: Role of Government IV 2000958\n ISSP2007: Leisure Time and Sports I 2000961\n ISSP2008: Religion III 2000964\n ISSP2009: Social Inequality IV 2000967\n ISSP2010: Environment III 2000970\n\n- then, 'touch' (publish) the articles in the right (reverse) order\n\n ::\n\n pigshare -p martin publish_article 2000970 2000967 2000964 2000961 2000958 2000955 2000952 2000949 2000946 2000943 2000940 2000937 2000934 2000928 2000925 2000922 2000919 2000916 2000913 2000910\n\n- check the webfrontend whether it worked by refreshing the collections page\n\nBe aware that if an article got a new version since it was added to a collection, the old version of the article is included in it. If you want the new version, you need to manually remove and re-add the article before you do anything else.\n\n1.4.8 Other random example calls:\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n::\n\n # create new collection\n pigshare create_collection --collection '{\"title\": \"Collection markus test\", \"articles\": [2009074,2009075,2009084], \"custom_fields\": {\"test1\": \"value1\"}}'\n\n::\n\n # add articles to a collection\n pigshare add_article --id 2761 --article_ids [2009103,2009106]\n\n::\n\n # search all my articles that contain a search_term, display only ids, separated by ',' (useful to copy and paste into 'add_article' command)\n pigshare -o id -s ',' search_my_articles --search_term [search_term]\n\n::\n\n # list all of your personal articles, and add all of them to a collection\n for id in `pigshare -o id list_my_articles`; do echo \"$id\"; pigshare add_article --collection_id 3222 --article_id \"$id\"; done\n\n::\n\n # update/overwrite the title and articles connected to a collection\n pigshare update_collection --id 2761 --collection '{\"title\": \"Collection markus test changed\", \"articles\": [2009074,2009075]}'\n\n::\n\n # update/overwrite the categories field in a collection\n pigshare update_article --id 2000077 --article '{\"categories\": [2]}'\n\n::\n\n # update/overwrite the custom_fields of a collection\n pigshare update_article --id 2000077 --article '{\"custom_fields\": {\"field1\":\"value1\"}}'\n\n1.5 Usage (Library)\n~~~~~~~~~~~~~~~~~~~\n\nTODO\n", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/makkus/pigshare", "keywords": "pigshare figshare client rest api", "license": "GPLv3", "maintainer": null, "maintainer_email": null, "name": "pigshare", "package_url": "https://pypi.org/project/pigshare/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pigshare/", "project_urls": { "Homepage": "https://github.com/makkus/pigshare" }, "release_url": "https://pypi.org/project/pigshare/0.6.4/", "requires_dist": null, "requires_python": null, "summary": "Python client for figshare", "version": "0.6.4" }, "last_serial": 2201118, "releases": { "0.1.0": [], "0.2": [ { "comment_text": "", "digests": { "md5": "74d48e81f1e57ea8b15bd485d98bbd94", "sha256": "d0c25a6e8d654a8354d0ee22f2e31e3da417119a26e180a6318370898e12a899" }, "downloads": -1, "filename": "pigshare-0.2.tar.gz", "has_sig": false, "md5_digest": "74d48e81f1e57ea8b15bd485d98bbd94", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33944, "upload_time": "2015-11-08T22:11:56", "url": "https://files.pythonhosted.org/packages/b8/f5/d95b86b0442f3b8f2645e2042def69dbe7fb824ac8defb49434ab0b00227/pigshare-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "8d2c14c007604994a26c0909150108d8", "sha256": "de9524f18b4d28c35a6cc3db52ae608f0077c5595dc8232568b55b2021e7aabd" }, "downloads": -1, "filename": "pigshare-0.3.tar.gz", "has_sig": false, "md5_digest": "8d2c14c007604994a26c0909150108d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37831, "upload_time": "2016-01-21T02:26:10", "url": "https://files.pythonhosted.org/packages/9c/c3/0572e82259154aeff241a058e7c1bbebbc7976e551956b133537b4efd25e/pigshare-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "48a8e82a6ac912e3f17315b9b6a7eeb4", "sha256": "662760d7b010476324ac683baaeddae046cbdc2528641e59dc7dca4182e09cc1" }, "downloads": -1, "filename": "pigshare-0.4.tar.gz", "has_sig": false, "md5_digest": "48a8e82a6ac912e3f17315b9b6a7eeb4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40418, "upload_time": "2016-01-25T03:52:45", "url": "https://files.pythonhosted.org/packages/f7/7b/a6208e3164289b8c064b1134b0dd045be301e3d574af5bed91ec23de2a11/pigshare-0.4.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "1cba94c9aedb570136c6e853b4990bbf", "sha256": "c953eee909d676994e21438ced5b18ec19e41166c66e523bdaa326beccadb8d5" }, "downloads": -1, "filename": "pigshare-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1cba94c9aedb570136c6e853b4990bbf", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 83484, "upload_time": "2016-06-01T03:44:30", "url": "https://files.pythonhosted.org/packages/64/90/4ad753591e010399221e3b83504554f7f336d6ab75adbf086e38caf38d8a/pigshare-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8d0f238fdfb53742f1e55ce7db3855fb", "sha256": "856fde795e158a82f11e2b36fbf092010a6dda25b1b33033acf814106b3b9eb6" }, "downloads": -1, "filename": "pigshare-0.4.0.tar.gz", "has_sig": false, "md5_digest": "8d0f238fdfb53742f1e55ce7db3855fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43237, "upload_time": "2016-06-01T03:44:18", "url": "https://files.pythonhosted.org/packages/a5/06/ac1cae747bc29b7773238b2da6617beea54f31c45709abe430fe9a88bfb5/pigshare-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "cb4bbce3830f0f177eaf86b6fe3a19cb", "sha256": "eb3985cd5d193e6746b42a8672f8130c0162300a6eb0a8ba8c42ce924ea9f146" }, "downloads": -1, "filename": "pigshare-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cb4bbce3830f0f177eaf86b6fe3a19cb", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 62686, "upload_time": "2016-06-01T04:08:47", "url": "https://files.pythonhosted.org/packages/8b/9c/184da78371ea6484186a52c85ebbcb2989da3f6ab107726d22ca268e64ec/pigshare-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ca83cb970c8b473c3592b6a087797da1", "sha256": "9404964f2de701f652782e044e5fabd4a02961c7d74fe96b9237caa65b8d6cdb" }, "downloads": -1, "filename": "pigshare-0.5.0.tar.gz", "has_sig": false, "md5_digest": "ca83cb970c8b473c3592b6a087797da1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38880, "upload_time": "2016-06-01T04:08:29", "url": "https://files.pythonhosted.org/packages/f6/b6/f7ad8a5c98c86fd3761998b7756700062c0ca0eebdd721cca83fe523d86d/pigshare-0.5.0.tar.gz" } ], "0.5.3": [ { "comment_text": "", "digests": { "md5": "225aa555bbab419f6fc7c41c7cc6dbc3", "sha256": "d3e757839c257db2aee35db70b599b71de78a4c7489d9aa2f09e9cd0ea0be119" }, "downloads": -1, "filename": "pigshare-0.5.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "225aa555bbab419f6fc7c41c7cc6dbc3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 63511, "upload_time": "2016-07-04T03:45:56", "url": "https://files.pythonhosted.org/packages/15/23/a02441334c40dfa56a63cd521a4fb52633145280451009264bf8f0525a1c/pigshare-0.5.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "88621655561133ff1db44700913e23e4", "sha256": "04533dc56ff3efdf6f753055dcc47781b18f66a170745d27923c6d3511039bc3" }, "downloads": -1, "filename": "pigshare-0.5.3.tar.gz", "has_sig": false, "md5_digest": "88621655561133ff1db44700913e23e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39232, "upload_time": "2016-07-04T03:45:51", "url": "https://files.pythonhosted.org/packages/dd/2d/eeed58b5f3c870d60ce7b9d64dc22f645088f55a9724a7f6e4ce3590248e/pigshare-0.5.3.tar.gz" } ], "0.6.4": [ { "comment_text": "", "digests": { "md5": "34f86a2072177ef36c1607bf2e45d7df", "sha256": "6bff931688d53aa0d928c0057af82c2a82a7fe8575f94a938e2fc0fb400cc213" }, "downloads": -1, "filename": "pigshare-0.6.4.tar.gz", "has_sig": false, "md5_digest": "34f86a2072177ef36c1607bf2e45d7df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38876, "upload_time": "2016-06-01T03:58:37", "url": "https://files.pythonhosted.org/packages/50/ce/5d8affc10754d872229b0666cbf7024d09e5a656cd2dd7101bc1aea6fec3/pigshare-0.6.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "34f86a2072177ef36c1607bf2e45d7df", "sha256": "6bff931688d53aa0d928c0057af82c2a82a7fe8575f94a938e2fc0fb400cc213" }, "downloads": -1, "filename": "pigshare-0.6.4.tar.gz", "has_sig": false, "md5_digest": "34f86a2072177ef36c1607bf2e45d7df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38876, "upload_time": "2016-06-01T03:58:37", "url": "https://files.pythonhosted.org/packages/50/ce/5d8affc10754d872229b0666cbf7024d09e5a656cd2dd7101bc1aea6fec3/pigshare-0.6.4.tar.gz" } ] }