{ "info": { "author": "James Pringle", "author_email": "jpringle@jhu.edu", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "\n# PMIX: Questionnaire Language Utilities\n\nA mixed bag of PMA2020 utilities. There are several functionalities all based\non working with spreadsheets. The main features are the following:\n\n* [Analytics](#analytics)\n* [Borrow](#borrow)\n* [Cascade](#cascade)\n* [Numbering](#numbering)\n* [PPP](#ppp)\n* [Workbook](#workbook)\n* [XlsDiff](#xlsdiff)\n* [Viffer](#viffer)\n\nFormerly [`qlang`](https://github.com/jkpr/qlang), this package has been renamed and expanded to provide new\nfunctionality and new command-line tools. The command line tools are described after installation.\n\nThis version requires Python 3 or later. Python 2 is not supported.\n\n\n## Installation\n\nThis package is on PyPI! Run:\n\n```\npython3 -m pip install pmix\n```\n\nFor developers, to install from Github, run:\n\n```\npython3 -m pip install https://github.com/PMA-2020/pmix/zipball/master\n```\n\n## Analytics\n\nUsage\n\n```\npython3 -m pmix.analytics FILE1 [FILE2 ...]\n```\n\ncreates a JSON file describing the prompts and fields for analytics.\n\n## Borrow\nThe purpose of the Pmix *Borrow* module use to assist with translation\nmanagement of ODK forms. It is especially useful for merging translations from\none file into another.\n\n#### Command Line Usage\nThis module is called with\n\n```\npython3 -m pmix.borrow\n```\n\nand it does two things. Without the `-m` argument, it simply creates a\ntranslation dictionary. The source string is in the first column, and the\ntarget languages are in the subsequent columns. With the `-m` argument,\nit creates a translation dictionary and then merges those translations into\nthe file specified by `-m`.\n\n##### Examples\n\n1) Without `-m`,\n\n```\npython3 -m pmix.borrow FILE1 [FILE2 ...]\n```\n\ncreates a translation dictionary from `FILE1 [FILE2 ...]`.\n\n2) With `-m`,\n\n```\npython3 -m pmix.borrow -m TARGET FILE1 [FILE2 ...]\n```\n\ncreates a translation dictionary from `FILE1 [FILE2 ...]` and then merges into `TARGET`.\n\nIn both examples, a default output filename is used, but one can be specified with the `-o` argument.\n\n#### The Input File\nThe input file can be 1 of 2 kinds:\n1. A standard ODK file.\n2. A raw translations file.\n\nA raw translations file has the following form, using English and French as\nexamples:\n\n| text::English | text::Fran\u00e7ais | ... | text:: |\n| --- | --- | --- | --- |\n| Hello! | Bonjour! | ... | <\"Hello!\" in language *n*\\> |\n\n#### Diverse translations\n\nThere are a set of command-line options to work with diverse translations.\n\n- `-D` This option, used without argument, means if text has diverse translations, do not borrow it. Only has effect with `-m`\n- `-C CORRECT` This option marks a file as correct. Fill in `CORRECT` with a path to a source file. Its translations are given precedence over others. If there is only one input file, and it is correct, then there is no need to mark it correct because nothing can override it.\n- `d DIVERSE` Give a language found in the forms for `DIVERSE`. This option is used without `-m`. It creates a file with only strings that have diverse translations in the supplied language from the source files.\n\n---\n\n#### The Output File\nA resultant file with merged translations has the following possible highlighting:\n\n- ![#ffd3b6](https://placehold.it/15/ffd3b6/000000?text=+) *Orange* if the source and the translation are the same.\n- ![#9acedf](https://placehold.it/15/9acedf/000000?text=+) *Blue* if the new translation changes the old translation.\n- ![#d3d3d3](https://placehold.it/15/d3d3d3/000000?text=+) *Grey* if the new translation fills in a previously missing translation (blank cell).\n- ![#85ca5d](https://placehold.it/15/85ca5d/000000?text=+) *Green* if the translation is not found in the TranslationDict, but there is a pre-existing translation.\n- ![#ffaaa5](https://placehold.it/15/ffaaa5/000000?text=+) *Red* if translation is not found and there is no pre-existing translation.\n- ![#fffa81](https://placehold.it/15/fffa81/000000?text=+) *Yellow* if using the `-D` option, shows strings that have diverse translations without inserting them.\n- ![#ffffff](https://placehold.it/15/ffffff/000000?text=+) *No highlight* if the translation is the same as the pre-existing translation.\n\n## Cascade\n\nUsage\n\n```\npython3 -m pmix.cascade FILE\n```\n\ncreates a new Excel spreadsheet after converting geographic identifiers from wide format to tall format.\n\n## Numbering\n\nUse the numbering mini-language and create question numbers for an ODK survey.\n\n```\npython3 -m pmix.numbering FILE\n```\n\nThe program then looks for a column entitled \"N\" in the \"survey\" worksheet. It creates numbers based off of the\ndirectives there and adds them to label columns.\n\n## Workbook\n\nThere following features are offered:\n\n1. Convert a worksheet to CSV with UTF-8 encoding and UNIX-style newlines.\n\n```\npython3 -m pmix.workbook FILE -c SHEET\n```\n\n2. Remove all trailing and leading whitespace from all text cells\n\n```\npython3 -m pmix.workbook FILE -w\n```\n\n## XlsDiff\nA utility for showing the differences between two Excel files.\n\n```\npython3 -m pmix.xlsdiff FILE1 FILE2 --excel\n```\n\nThe above command creates a new Excel file, creating a new version of `FILE2` \nwith highlighting to show differences.\n\n![#ff0000](https://placehold.it/15/ff0000/000000?text=+) *Red* -- Rows and columns that are duplicate so are not compared \n![#FFD3B9](https://placehold.it/15/FFD3B9/000000?text=+) *Orange/Peach* -- Rows and columns that are in the marked up file (`FILE2`), but not in the other \n![#FFF78E](https://placehold.it/15/FFF78E/000000?text=+) *Light Yellow* -- Cells that are different between the the two files \n![#00ff00](https://placehold.it/15/00ff00/000000?text=+) *Green* -- Rows that are in a changed order \n\n![XlsDiff](static/xlsdiff_output.png)\n\n##### Options\n| Short Flag | Long Flag | Description |\n|:-----------|:----------|:------------|\n| -h | --help | Show this help message and exit. |\n| -r | --reverse | Reverse the order of the base file and the new file for processing. |\n| -s | --simple | Do a simple diff instead of the default ODK diff. |\n| -e | --excel | Path to write Excel output. If flag is given with no argument then default out path is used. If flag is omitted, then write text output to STDOUT.|\n\n## Viffer\nViffer is a tool that provides a tabulated report on the differences between two XlsForms. Viffer stands for \"Version Diff'er\".\n\n![XlsDiff](static/viffer_output_small.png)\n\nThis tool is currently under development under another fork of pmix. If interested in using it, please see: https://github.com/joeflack4/pmix/tree/feature_viffer#viffer\n\n##### Example Usage\nGenerate a Viffer report.\n`python -m pmix.viffer old_form.xlsx new_form.xlsx`\n\n\n## Bugs\n\nSubmit bug reports to James Pringle at jpringleBEAR@jhu.edu minus the bear.\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": "https://github.com/PMA-2020/pmix", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pmix", "package_url": "https://pypi.org/project/pmix/", "platform": "", "project_url": "https://pypi.org/project/pmix/", "project_urls": { "Homepage": "https://github.com/PMA-2020/pmix" }, "release_url": "https://pypi.org/project/pmix/0.5.0/", "requires_dist": [ "XlsxWriter (>=1.1.0)", "xlrd (>=1.1.0)" ], "requires_python": ">=3.6.0", "summary": "A mixed bag of Python3 tools for PMA workflow", "version": "0.5.0" }, "last_serial": 5973829, "releases": { "0.2.2": [ { "comment_text": "", "digests": { "md5": "e111e3bc601dfd546d4bd3e32ea06039", "sha256": "5b7d10fe198cbb671e6e7feb53418ac79b261ad290cf206f99b9d34644f0e5ea" }, "downloads": -1, "filename": "pmix-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "e111e3bc601dfd546d4bd3e32ea06039", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 74251, "upload_time": "2018-07-09T19:22:30", "url": "https://files.pythonhosted.org/packages/41/f8/85892126c48f3684c26289689abfe4db176eb37716250613f7e6373c94c8/pmix-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "18c3206cc482a2860df8623d60c7b3c3", "sha256": "ec365a561b9ea3b9fdb2f7d0e9bba3551648dcd3e324e6edc43071489dcc3773" }, "downloads": -1, "filename": "pmix-0.2.2.tar.gz", "has_sig": false, "md5_digest": "18c3206cc482a2860df8623d60c7b3c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 59905, "upload_time": "2018-07-09T19:22:31", "url": "https://files.pythonhosted.org/packages/3f/2c/86b6d7b2dd39d6d287ffbea84e92f4e80efa36cbf270150c6321f5f35267/pmix-0.2.2.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "978afda43e1ade88f7666475aead39e5", "sha256": "014920f460d2bce63186f594ccf828f73c870957b483715edfdfc318f9c94fdd" }, "downloads": -1, "filename": "pmix-0.2.4-py3-none-any.whl", "has_sig": false, "md5_digest": "978afda43e1ade88f7666475aead39e5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 74593, "upload_time": "2018-09-17T20:22:06", "url": "https://files.pythonhosted.org/packages/78/d0/77b6f1e1561cd4df25eecef511bb0dd5c356da7cc7c6de6201433fa6b450/pmix-0.2.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "284d99ba92ccb057ec1af03b7552e9e4", "sha256": "9788bfa85554ab5fea1c0ae70bd80d6fedc73b60140c898ff99573b785a5f838" }, "downloads": -1, "filename": "pmix-0.2.4.tar.gz", "has_sig": false, "md5_digest": "284d99ba92ccb057ec1af03b7552e9e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 60324, "upload_time": "2018-09-17T20:22:08", "url": "https://files.pythonhosted.org/packages/f8/de/e018ee58f1bad3fdfbdde55774fbd8ea75464b57ae5812e9ea4a8e296066/pmix-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "cf23df8a887730d898fce463c533f730", "sha256": "4e775ba377fddd3cc11290327191ad6708552fbc9eb7495940b641a59fe37807" }, "downloads": -1, "filename": "pmix-0.2.5-py3-none-any.whl", "has_sig": false, "md5_digest": "cf23df8a887730d898fce463c533f730", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 38465, "upload_time": "2018-09-18T13:58:54", "url": "https://files.pythonhosted.org/packages/7d/a6/95ad5a8d57d3b62733a8b908f9bbc6cf9d4f646a362fe0181c79fa272b7a/pmix-0.2.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5658a3d88c497a32967c01348862f3b5", "sha256": "e1f436be02e2116fd576667c198a779d0c8fc1fff180d39b0240bb5ba817a5e1" }, "downloads": -1, "filename": "pmix-0.2.5.tar.gz", "has_sig": false, "md5_digest": "5658a3d88c497a32967c01348862f3b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36346, "upload_time": "2018-09-18T13:58:55", "url": "https://files.pythonhosted.org/packages/a2/8c/a32cb4c0c58957031444c2446fb9a68ff73f1517cf132c3d5a454642abca/pmix-0.2.5.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "a0755fa9c18d8674b08c4c6a01f567c2", "sha256": "9c6d3a2cc4f6a0ef85702cb80ca44339b375a0942983182a862ed760834d6df2" }, "downloads": -1, "filename": "pmix-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a0755fa9c18d8674b08c4c6a01f567c2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 41444, "upload_time": "2019-01-24T15:06:56", "url": "https://files.pythonhosted.org/packages/8e/d2/3ae91dc2405d13ba192b921b3f9b88771e89933fdc9e7af8449e508ac444/pmix-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c00e17f98a52fe7f5d339c0e263f1e4c", "sha256": "50af29ba8c5118956d9353d98dc85c84a030b6ecb95c408f73a2189b36fe1e27" }, "downloads": -1, "filename": "pmix-0.5.0.tar.gz", "has_sig": false, "md5_digest": "c00e17f98a52fe7f5d339c0e263f1e4c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 40072, "upload_time": "2019-01-24T15:06:58", "url": "https://files.pythonhosted.org/packages/5d/90/ab399925a6e63bd55744e10014df6a08fd81ecd39e4af9c9e0fd4ebb3377/pmix-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a0755fa9c18d8674b08c4c6a01f567c2", "sha256": "9c6d3a2cc4f6a0ef85702cb80ca44339b375a0942983182a862ed760834d6df2" }, "downloads": -1, "filename": "pmix-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a0755fa9c18d8674b08c4c6a01f567c2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 41444, "upload_time": "2019-01-24T15:06:56", "url": "https://files.pythonhosted.org/packages/8e/d2/3ae91dc2405d13ba192b921b3f9b88771e89933fdc9e7af8449e508ac444/pmix-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c00e17f98a52fe7f5d339c0e263f1e4c", "sha256": "50af29ba8c5118956d9353d98dc85c84a030b6ecb95c408f73a2189b36fe1e27" }, "downloads": -1, "filename": "pmix-0.5.0.tar.gz", "has_sig": false, "md5_digest": "c00e17f98a52fe7f5d339c0e263f1e4c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 40072, "upload_time": "2019-01-24T15:06:58", "url": "https://files.pythonhosted.org/packages/5d/90/ab399925a6e63bd55744e10014df6a08fd81ecd39e4af9c9e0fd4ebb3377/pmix-0.5.0.tar.gz" } ] }