{ "info": { "author": "Danny McDonald", "author_email": "daniel.mcdonald@uzh.ch", "bugtrack_url": null, "classifiers": [], "description": "# maruval\n\n> Version 1.0.1\n\n[![Build Status](https://travis-ci.org/uzh/maruval.svg?branch=master)](https://travis-ci.org/uzh/maruval)\n[![codecov.io](https://codecov.io/gh/uzh/maruval/branch/master/graph/badge.svg)](https://codecov.io/gh/uzh/maruval)\n[![PyPI version](https://badge.fury.io/py/maruval.svg)](https://badge.fury.io/py/maruval)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)\n\nCommand line utilities for [marugoto](https://github.com/uzh/marugoto) content\n\n* `maruval`: validate marugoto data\n* `marufind`: a utility to find folders with particular contents\n* `marupretty`: pretty-print a JSON file or all files in a directory\n\n## Installing dependencies\n\n*maruval* is predominantly written Python, so your machine needs Python and the Python package manager *pip* for installation. You should already have Python.\n\nTo check if you have *pip*, type `which pip` into your command line. If this returns a path to `pip`, you can proceed to `Installing maruval`.\n\nOtherwise, to install *pip*, run the following command:\n\n```bash\ncurl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py && rm get-pip.py\n```\n\nNow `which pip` should show a path to a *pip* executable.\n\n## Installing *maruval*\n\nOnce you have *Python*, *pip3*/*pip*, and maybe `jq`, run the following:\n\n```bash\npip install maruval\n# or, from the git repo:\ngit clone https://github.com/uzh/marugoto-validator && cd marugoto-validator && python.setup.py install\n```\n\n## Configuring *maruval* for *Atom*\n\nEach tool can be run from the command line, but perhaps more usefully, they can be run from within an Atom editing session.\n\nRun the following to configure Atom:\n\n```bash\npython -m maruval.atom\n```\n\nThen, restart Atom and type `maruval` into the command palette to see the available commands.\n\n## Configuring *marupretty*\n\nIf you want to use `marupretty`, the JSON pretty printer, you'll need to have the `jq` utility installed. Use the following command to do this:\n\n```bash\n# note: requires sudo\nsudo python -m maruval.jq\n# or, get it at https://stedolan.github.io/jq/ and save it as `jq` your PATH...\n```\n\n## Command line usage\n\nBelow describes how to use each of the three tools from the command line.\n\n### `maruval`: validate content\n\nThe main tool, *maruval*, checks for syntax and content errors in your JSON data. Use it on the command line like this:\n\n```bash\nmaruval -f -nw \n```\n\nOptional arguments:\n\n* `-f`/`--fail-first` will stop *maruval* after first error\n* `-nw`/`--no-warnings` will suppress warning messages\n\nExample output (on some purposely broken data):\n\n```bash\ndanny@thinkpad:~/marugoto/content$ maruval PlantationLives/\n```\n\n```php\nValidating content at PlantationLives/\n868 JSON files found.\n\n====================================================================================================\nProblem #1 -- Syntax error in PlantationLives/chapter2/2.2.10/page.json\n----------------------------------------------------------------------------------------------------\n\nExpecting property name enclosed in double quotes: line 5 column 26 (char 94)\n\n====================================================================================================\nProblem #2 -- Content error in PlantationLives/chapter3/2.3.2/imageComponent1.json\n----------------------------------------------------------------------------------------------------\n\n'cannot be string' is not of type 'integer'\n\nFailed validating 'type' in schema['properties']['numberOfColumns']:\n {'type': 'integer'}\n\nOn instance['numberOfColumns']:\n 'cannot be string'\n\n====================================================================================================\nProblem #3 -- Syntax error in PlantationLives/chapter3/2.3.5/imageComponent1.json\n----------------------------------------------------------------------------------------------------\n\nExpecting ',' delimiter: line 10 column 3 (char 144)\n\n====================================================================================================\n\nAll done. 3 errors found. 865 files OK.\n```\n\n\n### `marufind`: find particular content directories\n\nThis utility takes two required arguments: the first is a comma-separated list of JSON file types; the second is the path to the dataset.\n\nThe default mode of the tool is to show directories that contain all the listed JSON file types. You can use the `-any` or `-only` flags to match directories containing any of the listed types, or only the listed types. The optional `-not` flag will invert the results.\n\n\n```bash\n# show directories containing both a videoComponent and textExercise file\nmarufind videoComponent,textExercise \n# show the opposite\nmarufind -not videoComponent,textExercise \n# show directories containing any of these files\nmarufind -any videoComponent,textExercise \n# show directories not containing any of these files\nmarufind -not -any videoComponent,textExercise \n# show directories containing only page, mail and dialog files\nmarufind -only page,mail,dialog \n# invert this --- directories containing more than these files\nmarufind -not -only page,mail,dialog \n```\n\n### `marupretty`: bash utility to tidy up a file or content directory, requires [`jq`](https://stedolan.github.io/jq/)\n\nThis utility will format all files in the given directory, so you don't have to worry too much about whitespace and so on when modifying JSON files by hand.\n\n```bash\nmarupretty \n```\n\n### Getting help\n\nThe following commands can be used to get more information about the usage of the tools:\n\n```bash\nmaruval --help\nmarufind --help\n```\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/uzh/maruval", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "maruval", "package_url": "https://pypi.org/project/maruval/", "platform": "", "project_url": "https://pypi.org/project/maruval/", "project_urls": { "Homepage": "http://github.com/uzh/maruval" }, "release_url": "https://pypi.org/project/maruval/1.0.1/", "requires_dist": [ "jsonschema (==3.0.1)", "setuptools" ], "requires_python": "", "summary": "Validator for marugoto game content", "version": "1.0.1" }, "last_serial": 5905700, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "ac1cf36a24d5609e8c14cecbfa430ac2", "sha256": "2950d8ec7e6e260dc7ca1c4cc781e689f572d3392fa732d04c8383a8d65656f6" }, "downloads": -1, "filename": "maruval-0.1.0-py3.7.egg", "has_sig": false, "md5_digest": "ac1cf36a24d5609e8c14cecbfa430ac2", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 19296, "upload_time": "2019-07-24T13:31:43", "url": "https://files.pythonhosted.org/packages/74/97/2c690d333ebc47ea40f5a6a79857e7a1e6cb22e72e27440bd740e51077fa/maruval-0.1.0-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "2e232e530802226be478034317c3788b", "sha256": "c38ed05e2716c9015a16ac2bb0d5dd022d45ec5d77013710a0376701365efcc2" }, "downloads": -1, "filename": "maruval-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2e232e530802226be478034317c3788b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7345, "upload_time": "2019-07-24T13:31:45", "url": "https://files.pythonhosted.org/packages/25/76/b5c87bd1e8c03f004439da6eb89b51cabdc09c14c0a97dc8ab0ed6a81bea/maruval-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "c6df03ea2ca8f4040abdce7318a23ed6", "sha256": "55b2952ebc413fc1ea1e54df48347766a7fef462d675dce7b3a20edca36de63c" }, "downloads": -1, "filename": "maruval-0.1.1-py3.7.egg", "has_sig": false, "md5_digest": "c6df03ea2ca8f4040abdce7318a23ed6", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 20447, "upload_time": "2019-07-25T15:36:23", "url": "https://files.pythonhosted.org/packages/4e/b3/ab9fc0896f7ae876b0a03e2d25dfc8615515a2e99b2ca8705b28feda98bf/maruval-0.1.1-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "82b713a9cbf83fc381ca4056c3b84fb5", "sha256": "ba4f73c195f876d97545b8d242a23c459d196377a02fbc1053f0503d01508b51" }, "downloads": -1, "filename": "maruval-0.1.1.tar.gz", "has_sig": false, "md5_digest": "82b713a9cbf83fc381ca4056c3b84fb5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8252, "upload_time": "2019-07-25T15:36:25", "url": "https://files.pythonhosted.org/packages/cd/0e/02ff6be609d4a4faf78781f17cbf161b778ff35a7c5622b32cbd215503b4/maruval-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "d4630d73ad625b647d77ad6d5733d649", "sha256": "fffeca025e67fb2050133b63555113978eaa40134a427acf9ce4b655b3fcc268" }, "downloads": -1, "filename": "maruval-0.2.0-py3.7.egg", "has_sig": false, "md5_digest": "d4630d73ad625b647d77ad6d5733d649", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 23259, "upload_time": "2019-07-29T13:45:51", "url": "https://files.pythonhosted.org/packages/52/61/03a76893dfaf2009e3d3e7c9e8569b31d324a0975d3e7752e33096db2065/maruval-0.2.0-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "999dad64fc71a49bccf1b32182d37cf5", "sha256": "34abd1a6ca3001a9308bc3781d702e826603894885b90fbd39637d643d98c678" }, "downloads": -1, "filename": "maruval-0.2.0.tar.gz", "has_sig": false, "md5_digest": "999dad64fc71a49bccf1b32182d37cf5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9599, "upload_time": "2019-07-29T13:45:52", "url": "https://files.pythonhosted.org/packages/71/7a/6936f77692478f7a671eac94b1f85972bd3b64911902b22376954950a2eb/maruval-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "9d17502a99f74c5041c2d3f49b0629d1", "sha256": "5f7c7441b5ec8b215ef3f2cee3c77b667925e90c6b82b5f42d5e2240faa7247b" }, "downloads": -1, "filename": "maruval-0.2.1-py3.7.egg", "has_sig": false, "md5_digest": "9d17502a99f74c5041c2d3f49b0629d1", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 23245, "upload_time": "2019-07-29T13:49:24", "url": "https://files.pythonhosted.org/packages/6c/0a/0e73067a67cef932cea74c03864abe101b33dd673661432fca55a704b97b/maruval-0.2.1-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "7441c287b0b60d2cf28b4109a24b8383", "sha256": "feb6a0912b502735bab973778c13fe42f766a196c898f0cc5fd0708d998d016e" }, "downloads": -1, "filename": "maruval-0.2.1.tar.gz", "has_sig": false, "md5_digest": "7441c287b0b60d2cf28b4109a24b8383", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9606, "upload_time": "2019-07-29T13:49:25", "url": "https://files.pythonhosted.org/packages/00/3b/8e46fd4feed7b8014d47ac7a9afefd38e70feaa1927635b7acbb902e68ad/maruval-0.2.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "aacabe5ccd5c71a6688bfc592e3562d1", "sha256": "d2310b95ebc249a97f91c9600d612396cc1c5619e0031bc6ff20ef9a8c925a38" }, "downloads": -1, "filename": "maruval-1.0.0-py3.6.egg", "has_sig": false, "md5_digest": "aacabe5ccd5c71a6688bfc592e3562d1", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 28823, "upload_time": "2019-09-30T08:57:41", "url": "https://files.pythonhosted.org/packages/c7/f7/705dd68a9f9136f67a6aa44abe617e3308d7c8bda0effd751534c40c4650/maruval-1.0.0-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "d28ceff7b8c9bc034ef6beb959e38891", "sha256": "19d9191b110480116c7a55a0a2b55b01c5d0437f38a6cd6b9646ee63db22ec80" }, "downloads": -1, "filename": "maruval-1.0.0-py3.7.egg", "has_sig": false, "md5_digest": "d28ceff7b8c9bc034ef6beb959e38891", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 24959, "upload_time": "2019-07-31T09:44:39", "url": "https://files.pythonhosted.org/packages/f9/86/c231dd2f3b477e653c2e4c4525380afd80f06a847189700edd71f3edfd52/maruval-1.0.0-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "8020bb0eba3aa11717c506aa401f1828", "sha256": "ff8590553f4fbcf3328c4ccb3f4137d4dbaa41ce2709b31e7fd7abcbf93e1bd3" }, "downloads": -1, "filename": "maruval-1.0.0.tar.gz", "has_sig": false, "md5_digest": "8020bb0eba3aa11717c506aa401f1828", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10749, "upload_time": "2019-07-31T09:44:41", "url": "https://files.pythonhosted.org/packages/e5/6d/d25317d83870a0caf6b54020707380b0163df4747bc6303667e3a316c3f6/maruval-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "f4cfc62267183f89bcf426940dbbfa01", "sha256": "1542c38bf2f46ca84ce1f4edb6b43daa94b516945ec0efffed9e5d96134c7655" }, "downloads": -1, "filename": "maruval-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f4cfc62267183f89bcf426940dbbfa01", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23086, "upload_time": "2019-09-30T08:57:40", "url": "https://files.pythonhosted.org/packages/09/6d/cab203d5cb0c1a8804337470f2662483625cd0699597c6b04fd5bf0e0621/maruval-1.0.1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f4cfc62267183f89bcf426940dbbfa01", "sha256": "1542c38bf2f46ca84ce1f4edb6b43daa94b516945ec0efffed9e5d96134c7655" }, "downloads": -1, "filename": "maruval-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f4cfc62267183f89bcf426940dbbfa01", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23086, "upload_time": "2019-09-30T08:57:40", "url": "https://files.pythonhosted.org/packages/09/6d/cab203d5cb0c1a8804337470f2662483625cd0699597c6b04fd5bf0e0621/maruval-1.0.1-py3-none-any.whl" } ] }