{ "info": { "author": "Leonardo Uieda", "author_email": "leouieda@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering", "Topic :: Software Development :: Libraries" ], "description": "gmtmodernize: Convert GMT5 scripts to the \"modern\" execution mode\n=================================================================\n\n.. image:: http://img.shields.io/pypi/v/gmtmodernize.svg?style=flat-square\n :alt: Latest version on PyPI\n :target: https://pypi.python.org/pypi/gmtmodernize\n.. image:: http://img.shields.io/travis/GenericMappingTools/gmtmodernize/master.svg?style=flat-square\n :alt: Travis CI build status\n :target: https://travis-ci.org/GenericMappingTools/gmtmodernize\n.. image:: http://img.shields.io/coveralls/GenericMappingTools/gmtmodernize/master.svg?style=flat-square\n :alt: Test coverage status\n :target: https://coveralls.io/r/GenericMappingTools/gmtmodernize?branch=master\n.. image:: https://img.shields.io/pypi/pyversions/gmtmodernize.svg?style=flat-square\n :alt: Compatible Python versions.\n :target: https://pypi.python.org/pypi/gmtmodernize\n\n\nDisclaimer\n----------\n\nThis is **work in progress**. So far, it can convert some of the test and\nexample scripts from the GMT repository.\n\n\nAbout modern mode\n-----------------\n\nGMT is introducing a \"modern\" execution mode that reduces the amount of\narguments needed for many programs and handles the PostScript layer-caking\nin the background.\n\nFor example, the following classic mode script::\n\n ps=map.ps\n gmt grdgradient -Nt0.2 -A45 data.nc -Gintens.nc\n gmt makecpt -Cgeo -T-8000/2000 > t.cpt\n gmt grdimage -Ct.cpt -Iintens.nc data.nc -JM6i -P -K > $ps\n gmt pscoast -Rdata.nc -J -O -Dh -Baf -W0.75p -K >> $ps\n echo \"Japan Trench\" | gmt pstext -F+f32p+cTC -Dj0/0.2i -Gwhite -R -J -O -K >> $ps\n gmt psxy -W2p lines.txt -R -J -O -K >> $ps\n gmt psscale -R -J -O -DjBL+w3i/0.1i+h+o0.3i/0.4i -Ct.cpt -W0.001 -F+gwhite+p0.5p -Bxaf -By+l\"km\" >> $ps\n\nis equivalent to the following in modern mode::\n\n ps=map\n\n gmt begin $ps ps\n\n gmt grdgradient -Nt0.2 -A45 data.nc -Gintens.nc\n gmt makecpt -Cgeo -T-8000/2000 > t.cpt\n gmt grdimage -Ct.cpt -Iintens.nc data.nc -JM6i -P\n gmt pscoast -Rdata.nc -Dh -Baf -W0.75p\n echo \"Japan Trench\" | gmt pstext -F+f32p+cTC -Dj0/0.2i -Gwhite\n gmt psxy -W2p lines.txt\n gmt psscale -DjBL+w3i/0.1i+h+o0.3i/0.4i -Ct.cpt -W0.001 -F+gwhite+p0.5p -Bxaf -By+l\"km\"\n rm -f intens.nc t.cpt\n\n gmt end\n\nSee the scripts and data in the ``example`` folder.\n\nRead more about modern mode at the\n`Modernization wiki page `__.\n\n\nInstalling\n----------\n\nInstall the latest release using the ``pip`` package manager::\n\n pip install gmtmodernize\n\nTo install the development version from the Github *master* branch::\n\n git clone https://github.com/GenericMappingTools/gmtmodernize.git\n cd gmtmodernize\n pip install .\n\n\nUsing\n-----\n\nCommand line\n++++++++++++\n\nThe package provides a command-line interface through the ``gmtmodernize``\nprogram::\n\n $ gmtmodernize --help\n Convert GMT shell scripts from classic to modern mode.\n\n Prints the converted modern mode script to standard output (stdout).\n\n Usage:\n gmtmodernize SCRIPT\n gmtmodernize --recursive FOLDER_CLASSIC FOLDER_MODERN\n gmtmodernize --help\n gmtmodernize --version\n\n Arguments:\n SCRIPT Classic mode script to convert.\n FOLDER_CLASSIC Folder with classic mode scripts (can have multiple\n sub-folders).\n FOLDER_MODERN Name of output folder with converted modern mode scripts.\n Mirrors the folder structure of FOLDER_CLASSIC and copies\n all non-script files.\n\n Options:\n -r --recursive Recursively transverse a folder structure with GMT scripts\n and other files instead of converting a single file.\n Creates a new folder with the same structure and non-script\n files copied over, plus the converted GMT scripts.\n -h --help Show this help message and exit.\n --version Show the version and exit.\n\n Examples:\n\n Convert a single GMT script to modern mode:\n\n $ gmtmodernize classic_script.sh > modern_script.sh\n\n Convert a folder with GMT scripts, data files, etc, (optionally inside\n multiple sub-folders):\n\n $ gmtmodernize -r gmt_classic_scripts/ gmt_modern_scripts/\n\n This will create a folder 'gmt_modern_scripts' with the same sub-folders\n and non-script files in 'gmt_classic_scripts' but with the scripts\n converted to modern mode.\n\nLibrary\n+++++++\n\nAlternatively, you can run the conversion using the ``gmtmodernize`` Python\nlibrary. It exposes a ``modernize`` function that takes a classic script (as a\nsingle string) and outputs a modern script (also as a single string).\n\nExample::\n\n from gmtmodernize import modernize\n\n with open('classic_script.sh') as f:\n classic = f.read()\n with open('modern_script.sh', 'w') as f:\n f.write(modernize(classic))\n\n\nLicense\n-------\n\ngmtmodernize is free software: you can redistribute it and/or modify it\nunder the terms of the **BSD 3-clause License**. A copy of this license is\nprovided in ``LICENSE.txt``.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/GenericMappingTools/gmtmodernize", "keywords": "", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "gmtmodernize", "package_url": "https://pypi.org/project/gmtmodernize/", "platform": "Any", "project_url": "https://pypi.org/project/gmtmodernize/", "project_urls": { "Homepage": "https://github.com/GenericMappingTools/gmtmodernize" }, "release_url": "https://pypi.org/project/gmtmodernize/1.2/", "requires_dist": [ "docopt" ], "requires_python": "", "summary": "Tool to convert GMT scripts to the new modern execution mode", "version": "1.2" }, "last_serial": 2988547, "releases": { "0.1a0": [ { "comment_text": "", "digests": { "md5": "ccd2816066e719f608aa013c087e8df0", "sha256": "a46f6a14556d22545925d8c72d6c711baaad8da7e7357ff2107fd7a004e3e732" }, "downloads": -1, "filename": "gmtmodernize-0.1a0.tar.gz", "has_sig": false, "md5_digest": "ccd2816066e719f608aa013c087e8df0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4356, "upload_time": "2017-04-21T21:30:47", "url": "https://files.pythonhosted.org/packages/2d/69/6ab10420cf7e8879566abd1f5c875cab3db9c806018ed6218825daf54309/gmtmodernize-0.1a0.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "1b6acfc3c386147857ad67fa2070ae62", "sha256": "6e6d1bdb26e96a3c1e3af4902b02ec4ddf3c411eeaa5a4aeecd9177c1f1859d7" }, "downloads": -1, "filename": "gmtmodernize-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "1b6acfc3c386147857ad67fa2070ae62", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22190, "upload_time": "2017-06-21T03:34:26", "url": "https://files.pythonhosted.org/packages/f4/50/0c622d7b3006d4b860a4f4080b23252d72f4e7184f910d7e9c1e796bc6cb/gmtmodernize-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "158d40d4451634ebc2ca50428aa593ef", "sha256": "0c471060b3bfd6c527d5ebdd1418a9aeddec1b158838ddeab6d6225e5f19eabf" }, "downloads": -1, "filename": "gmtmodernize-1.0.tar.gz", "has_sig": false, "md5_digest": "158d40d4451634ebc2ca50428aa593ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29477, "upload_time": "2017-06-21T03:34:28", "url": "https://files.pythonhosted.org/packages/a6/a0/35c37e18ed6a9ffab1d9ea610df5d2d3f83390d5a0baf435d38354692726/gmtmodernize-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "e5d31659b378903c15ef457bb3f0aacc", "sha256": "39466f7881473b010dfeec757aa2fcf3cd5d4e716d7f99118f0f23e95d09db94" }, "downloads": -1, "filename": "gmtmodernize-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e5d31659b378903c15ef457bb3f0aacc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 24674, "upload_time": "2017-06-22T03:53:30", "url": "https://files.pythonhosted.org/packages/29/ab/ca060f61d187a17fe3e9acc36cc0ed9ad73234ffae9022eca72cf2aacb6f/gmtmodernize-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cd32a5ad67546edc71bf5427b4028dad", "sha256": "ff8c1ce72ca3eac978c74aa8c25079d87a90d4f5d28655854f9744ad88aeacc5" }, "downloads": -1, "filename": "gmtmodernize-1.1.tar.gz", "has_sig": false, "md5_digest": "cd32a5ad67546edc71bf5427b4028dad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30506, "upload_time": "2017-06-22T03:53:32", "url": "https://files.pythonhosted.org/packages/5c/ad/a7c665cc20369b85b6a935712ca3aa8d142d86a0a3c9a8eb7727a498d1fb/gmtmodernize-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "ccd3465a9de50766b8af6b593b772c1c", "sha256": "4c9904daa987800cae2d2f4d44d83340aad9cb2d2fee5541a77d130e98949483" }, "downloads": -1, "filename": "gmtmodernize-1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "ccd3465a9de50766b8af6b593b772c1c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 24832, "upload_time": "2017-06-29T21:32:28", "url": "https://files.pythonhosted.org/packages/99/50/84f921f54247736d8fa8a061f1a3ed0f46c3360b106dc082bd7adbaf822d/gmtmodernize-1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7f206e6ba8e0255c00d316e036840767", "sha256": "49836b36762be5f43b99f128cff48cd192149c9abb6a823b07dcef495aaddce0" }, "downloads": -1, "filename": "gmtmodernize-1.2.tar.gz", "has_sig": false, "md5_digest": "7f206e6ba8e0255c00d316e036840767", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30638, "upload_time": "2017-06-29T21:32:29", "url": "https://files.pythonhosted.org/packages/63/2c/cb01c20e2a5c383af4a154f0c91248d6c23c40889845bddb4da2baf54a80/gmtmodernize-1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ccd3465a9de50766b8af6b593b772c1c", "sha256": "4c9904daa987800cae2d2f4d44d83340aad9cb2d2fee5541a77d130e98949483" }, "downloads": -1, "filename": "gmtmodernize-1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "ccd3465a9de50766b8af6b593b772c1c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 24832, "upload_time": "2017-06-29T21:32:28", "url": "https://files.pythonhosted.org/packages/99/50/84f921f54247736d8fa8a061f1a3ed0f46c3360b106dc082bd7adbaf822d/gmtmodernize-1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7f206e6ba8e0255c00d316e036840767", "sha256": "49836b36762be5f43b99f128cff48cd192149c9abb6a823b07dcef495aaddce0" }, "downloads": -1, "filename": "gmtmodernize-1.2.tar.gz", "has_sig": false, "md5_digest": "7f206e6ba8e0255c00d316e036840767", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30638, "upload_time": "2017-06-29T21:32:29", "url": "https://files.pythonhosted.org/packages/63/2c/cb01c20e2a5c383af4a154f0c91248d6c23c40889845bddb4da2baf54a80/gmtmodernize-1.2.tar.gz" } ] }