{ "info": { "author": "R\u00e9my Sanchez", "author_email": "remy.sanchez@activkonnect.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Environment :: No Input/Output (Daemon)", "Intended Audience :: Information Technology", "License :: Other/Proprietary License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.0", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3 :: Only", "Topic :: System :: Filesystems", "Topic :: Utilities" ], "description": "filemarx\n========\n\nA tool to check that a directory structure conforms to a given JSON Schema.\n\nIn case of check failure, following actions can be taken, depending on your configuration:\n\n- Output defects to the console\n- Send a file listing all defects to a `Slack `_ conference room\n\nInstallation\n------------\n\nUsing pip should suffice\n\n.. code-block:: text\n\n pip install filemarx\n\nConfiguration\n-------------\n\nYou have to produce a JSON Schema file against which your directory's structure will be validated.\nAn example of this can be found in the ``samples/design.json`` file.\n\nLet's say that your file structure is this:\n\n.. code-block:: text\n\n ./anotherfile\n ./file1\n ./somedir\n ./somedir/andanother\n ./somedir/andanother/someotherfile\n ./somedir/somefilehere\n ./somedir/anotherdir\n ./file2\n\nThen the produced JSON would be\n\n.. code-block:: javascript\n\n {\n \"files\":[\n \"anotherfile\",\n \"file1\",\n \"file2\"\n ],\n \"dirs\":{\n \"somedir\":{\n \"files\":[\n \"somefilehere\"\n ],\n \"dirs\":{\n \"anotherdir\":{\n \"files\":[\n ],\n \"dirs\":{\n }\n },\n \"andanother\":{\n \"files\":[\n \"someotherfile\"\n ],\n \"dirs\":{\n }\n }\n }\n }\n }\n }\n\nUsage\n-----\n\nThe command takes 3 mandatory positional arguments:\n\n1. Check name (to be set arbitrarily)\n2. Schema file location\n3. Directory to be checked\n\nExample\n~~~~~~~\n\n.. code-block:: bash\n\n filemarx Design samples/design.json /home/myself/designs\n\n\nState-keeping options\n~~~~~~~~~~~~~~~~~~~~~\n\nIf you run ``filemarx`` in a cron but you don't want errors to come up every minute, you can ignore\nthem for X seconds once discovered. This can be done with a combination of options ``-t`` which sets\na timeout (in seconds) and ``-s`` which indicate where to store the state file.\n\n.. code-block:: bash\n\n # Only pop errors every hour\n filemarx -t 3600 -s /tmp/design_state.json Design samples/design.json /home/myself/designs\n\nPushing results to Slack\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n``filemarx`` can connect to the Slack API in order to push errors to a given Slack channel. In order\nto do that, you need to get an `API Token `_, then use options\n``--slack-token`` and ``--slack-channels``.\n\n.. code-block:: bash\n\n # Send it all to Slack\n filemarx --slack-token 'get-your-own' --slack-channels '#general,#design' -t 3600 -s /tmp/design_state.json Design samples/design.json /home/myself/designs", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Xowap/filemarx", "keywords": null, "license": "WTFPL", "maintainer": null, "maintainer_email": null, "name": "filemarx", "package_url": "https://pypi.org/project/filemarx/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/filemarx/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Xowap/filemarx" }, "release_url": "https://pypi.org/project/filemarx/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Validate a directory structure using JSON schemas", "version": "0.1.0" }, "last_serial": 1443358, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "3489b0b9ee19921ad7ea2cce7615fd3f", "sha256": "b2ead8ae0d0dba9bcc4d0ee241a645c62dfc8898d5bbd21e82f3e58cba425056" }, "downloads": -1, "filename": "filemarx-0.1.0.tar.gz", "has_sig": false, "md5_digest": "3489b0b9ee19921ad7ea2cce7615fd3f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4579, "upload_time": "2015-03-01T15:28:34", "url": "https://files.pythonhosted.org/packages/2a/7d/ae018dba250a2d949de1c676757df3a2de76e6027b7ba630994176e9bf27/filemarx-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3489b0b9ee19921ad7ea2cce7615fd3f", "sha256": "b2ead8ae0d0dba9bcc4d0ee241a645c62dfc8898d5bbd21e82f3e58cba425056" }, "downloads": -1, "filename": "filemarx-0.1.0.tar.gz", "has_sig": false, "md5_digest": "3489b0b9ee19921ad7ea2cce7615fd3f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4579, "upload_time": "2015-03-01T15:28:34", "url": "https://files.pythonhosted.org/packages/2a/7d/ae018dba250a2d949de1c676757df3a2de76e6027b7ba630994176e9bf27/filemarx-0.1.0.tar.gz" } ] }