{ "info": { "author": "Alexander Akhmetov", "author_email": "me@aleks.sh", "bugtrack_url": null, "classifiers": [], "description": "# WIP: python-shortcuts\n\n[![Build Status](https://travis-ci.org/alexander-akhmetov/python-shortcuts.svg?branch=master)](https://travis-ci.org/alexander-akhmetov/python-shortcuts)\n[![PyPI](https://img.shields.io/pypi/v/shortcuts.svg)](https://pypi.python.org/pypi/shortcuts)\n\n\ud83c\udf4f + \ud83d\udc0d = \u2764\ufe0f\n\n**python-shortcuts** is a library to create [Siri Shortcuts](https://support.apple.com/en-ae/guide/shortcuts/welcome/ios) on your laptop with your favourite text editor.\nIt uses [toml](https://github.com/toml-lang/toml) to represent shortcuts.\n\nThe library is in a very early development state (PR welcome!), so it does not support all actions from Shortcuts app.\n\n* [Toml tutorial](docs/tutorial.md)\n* [Python tutorial](docs/python_tutorial.md)\n* [How to add a new action](docs/new_action.md)\n* [Supported actions](docs/actions.md)\n* [Examples](examples/)\n* [Changelog](CHANGELOG.md)\n* [Documentation](docs/)\n\nSupported Python version: **>=3.6**.\n\n## Why\n\nI wanted to convert my shortcut to a file in human-readable format. :)\n\nFrom the code below this library can create a working shortcut:\n\n```toml\n[[action]]\ntype = \"ask\"\nquestion = \"What is your name?\"\n\n[[action]]\ntype = \"set_variable\"\nname = \"name\"\n\n[[action]]\ntype = \"show_result\"\ntext = \"Hello, {{name}}!\"\n```\n\nOr the same with Python:\n\n```python\nfrom shortcuts import Shortcut, actions\n\n\nsc = Shortcut()\n\nsc.actions = [\n actions.AskAction(data={'question': 'What is your name?'}),\n actions.SetVariableAction(data={'name': 'name'}),\n actions.ShowResultAction(data={'text': 'Hello, {{name}}!'})\n]\n```\n\n## How to use\n\n### Installation\n\n```bash\npip install shortcuts\n```\n\n### Usage\n\n### shortcut \u2192 toml\n\nIf you need to convert existing shortcut to a toml file, at first you need to export it.\nGo into Shortcuts app, open the shortcut and share it. Choose \"Share as file\" and use this file with this library.\n\nConvert shortcut file to `toml`:\n\n```bash\nshortcuts what_is_your_name.shortcut what_is_your_name.toml\n```\n\n### toml \u2192 shortcut\n\nConvert a `toml` file to a shortcut file.\nAfter you will need to open the file with iOS Shortcuts app.\n\n```bash\nshortcuts examples/what_is_your_name.toml what_is_your_name.shortcut\n```\n\nMore examples of `toml` files you can find [here](examples/).\nAnd [read the tutorial](docs/tutorial.md)! :)\n\n### URL \u2192 [toml|shortcut]\n\nAlso, you can download shortcut directly from iCloud.\nIf somebody shared shortcut link with you, just run:\n\n```bash\nshortcuts https://www.icloud.com/shortcuts/... my_shortcut.toml # or my_shortcut.shortcut\n```\n\nAnd it will download this shortcut and save it in `toml` or `shortcut` format.\n\n### Docker\n\nIt's possible to use [pre-built Docker container](https://cloud.docker.com/u/akhmetov/repository/docker/akhmetov/shortcuts-cli) with python-shortcuts inside:\n\n```shell\n# convert s.toml from the current directory into s.shortcut\n\ndocker run -v $(pwd):/files akhmetov/shortcuts-cli /files/s.toml /files/s.shortcut\n\n\ndocker run -v $(pwd):/files akhmetov/shortcuts-cli --help\n\n usage: shortcuts [-h] [--version] [file] [output]\n\n Shortcuts: Siri shortcuts creator\n\n positional arguments:\n file Input file: *.(toml|shortcut|itunes url)\n output Output file: *.(toml|shortcut)\n\n optional arguments:\n -h, --help show this help message and exit\n --version Version information\n```\n\n## Development\n\n### Tests\n\nRun tests:\n\n```bash\ntox\n```\n\n### How to add a new action\n\nSee [documentation](/docs/new_action.md).\n\n### TODO\n\n* \u2611 ~~Conditionals with auto-group_id: if-else, menu~~\n* \u2610 Nested fields: dict/array/etc\n* \u2610 Support variables in every field which support them in Shortcuts app\n* \u2610 Workflow types: widget, etc.\n* \u2610 Import questions\n* \u2610 Document all actions\n* \u2610 Support magic variables\n* \u2610 Support all current actions from Shortcuts app\n\n\n### Similar projects\n\n* [Shortcuts JS](https://github.com/joshfarrant/shortcuts-js)", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/alexander-akhmetov/python-shortcuts", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "python-shortcuts", "package_url": "https://pypi.org/project/python-shortcuts/", "platform": "", "project_url": "https://pypi.org/project/python-shortcuts/", "project_urls": { "Homepage": "https://github.com/alexander-akhmetov/python-shortcuts" }, "release_url": "https://pypi.org/project/python-shortcuts/0.11.0/", "requires_dist": null, "requires_python": "", "summary": "Python library to create and parse Siri Shortcuts", "version": "0.11.0" }, "last_serial": 4902191, "releases": { "0.10.0": [ { "comment_text": "", "digests": { "md5": "c4793bd806e4af2b9a6abfb1d23fb3ef", "sha256": "5fa8f8e7b5760892578ee34dda9202dd0543e979f60597bab362b8b7ef18dcf9" }, "downloads": -1, "filename": "python-shortcuts-0.10.0.tar.gz", "has_sig": false, "md5_digest": "c4793bd806e4af2b9a6abfb1d23fb3ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24313, "upload_time": "2018-10-26T20:42:04", "url": "https://files.pythonhosted.org/packages/c1/36/6c9714730825dbff30bfc2c1d6275af74f363778864fe57e1d2302c98a10/python-shortcuts-0.10.0.tar.gz" } ], "0.11.0": [ { "comment_text": "", "digests": { "md5": "3332e9a9156a877b8892cebc56b455e7", "sha256": "1d0895c64f243640414e63d311a1b7bc4258a2ebfd8c98195d9973ccb105d785" }, "downloads": -1, "filename": "python-shortcuts-0.11.0.tar.gz", "has_sig": false, "md5_digest": "3332e9a9156a877b8892cebc56b455e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24788, "upload_time": "2019-03-05T22:10:59", "url": "https://files.pythonhosted.org/packages/9e/ab/e117457ac9dfcb564242abdf241da80b9fa2e866abfead7e8da32fd04fef/python-shortcuts-0.11.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "75d9e0357dfa3c32b3776ca7b7f4440f", "sha256": "ce6ff3b3db2842448df27ee8a2fbb679bcb0e6d00969fb620cf9fd4f9e648dc2" }, "downloads": -1, "filename": "python-shortcuts-0.5.0.tar.gz", "has_sig": false, "md5_digest": "75d9e0357dfa3c32b3776ca7b7f4440f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11174, "upload_time": "2018-09-23T19:00:46", "url": "https://files.pythonhosted.org/packages/e1/2c/9347eded5138f0fc58996b078e7fb8abc3d232be559f9a2460ffa57fc2f9/python-shortcuts-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "5e7e85374478324571ca631e945a08c9", "sha256": "62f5454017511c7d0d68f7f9b508cfdef9557306897e8120951317c80e74eba7" }, "downloads": -1, "filename": "python-shortcuts-0.5.1.tar.gz", "has_sig": false, "md5_digest": "5e7e85374478324571ca631e945a08c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11324, "upload_time": "2018-09-23T21:22:58", "url": "https://files.pythonhosted.org/packages/e4/f3/9c34126160960b639cf669b2875df3459c1cdf771e78affe844ab1f72e24/python-shortcuts-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "c11158a50600f46bffbb209fbecc0d0d", "sha256": "b78e679538696ced3b74b8647ab1a0c5dffe1564b50ef74ee5a334158835d5b6" }, "downloads": -1, "filename": "python-shortcuts-0.5.2.tar.gz", "has_sig": false, "md5_digest": "c11158a50600f46bffbb209fbecc0d0d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11377, "upload_time": "2018-09-23T21:56:25", "url": "https://files.pythonhosted.org/packages/c5/e1/c7a31eaf44037bdd6b805bc5fca8aed3f32b584ce6139275a54bf9d69576/python-shortcuts-0.5.2.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "696174c8a491113df2361ba64aca3707", "sha256": "efa686e4e28815f84df8643d228ead910b4d8a1d3f730240bbf3416463fda5de" }, "downloads": -1, "filename": "python-shortcuts-0.6.0.tar.gz", "has_sig": false, "md5_digest": "696174c8a491113df2361ba64aca3707", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14404, "upload_time": "2018-09-24T17:33:47", "url": "https://files.pythonhosted.org/packages/df/9f/e8213c2aa62c597a5ffa5fe9f17282aa126d3112162af42073ef99f64122/python-shortcuts-0.6.0.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "fcff9b5e30017970b98dc4ee5a99356b", "sha256": "a0e46c788df677bab6ba6a3cf09233a7aae9febea4936013e6b3be9b72e5128e" }, "downloads": -1, "filename": "python-shortcuts-0.7.0.tar.gz", "has_sig": false, "md5_digest": "fcff9b5e30017970b98dc4ee5a99356b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17280, "upload_time": "2018-09-25T17:19:14", "url": "https://files.pythonhosted.org/packages/c2/84/58f38a3ac04f15bfced0f0efe1dfda195b13eb5622d3ad8be70eab41d2d3/python-shortcuts-0.7.0.tar.gz" } ], "0.8.0": [ { "comment_text": "", "digests": { "md5": "66b404a8c7c6f9447b17c8532d7b2c05", "sha256": "4062bab33fbcea9ef87bb4b2c842a296b10668f6bd82cc3480e3659fa26fc438" }, "downloads": -1, "filename": "python-shortcuts-0.8.0.tar.gz", "has_sig": false, "md5_digest": "66b404a8c7c6f9447b17c8532d7b2c05", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18412, "upload_time": "2018-09-25T21:58:58", "url": "https://files.pythonhosted.org/packages/53/ab/d5b57414f44a95ea0bc045d8dcffa92c8bf919b0c4c6dbc31d9c42ceff25/python-shortcuts-0.8.0.tar.gz" } ], "0.8.1": [ { "comment_text": "", "digests": { "md5": "a03e53168f7099feb8c1e52067f0e087", "sha256": "b13f91d8b417ead50c16399f475f8f3bf3854ff439ffcf20f2e38935f2aae4bf" }, "downloads": -1, "filename": "python-shortcuts-0.8.1.tar.gz", "has_sig": false, "md5_digest": "a03e53168f7099feb8c1e52067f0e087", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18537, "upload_time": "2018-09-25T22:10:25", "url": "https://files.pythonhosted.org/packages/33/e9/472c835f5ee4df444fdbed0d7e6023104532c0a2797ddc7f41631bba3cdb/python-shortcuts-0.8.1.tar.gz" } ], "0.9.0": [ { "comment_text": "", "digests": { "md5": "204f1d8f254e38c950293d7c75fdfd40", "sha256": "1e5970744c5a59f107a80309358d515afcbbeda2645a0fc9eeeff6fbb5ed3d0c" }, "downloads": -1, "filename": "python-shortcuts-0.9.0.tar.gz", "has_sig": false, "md5_digest": "204f1d8f254e38c950293d7c75fdfd40", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22269, "upload_time": "2018-09-27T16:35:11", "url": "https://files.pythonhosted.org/packages/09/ca/6cb5dc5900929fe9fd0e93448d08dfa99efc83b9e8fa115998e29352c5c1/python-shortcuts-0.9.0.tar.gz" } ], "0.9.1": [ { "comment_text": "", "digests": { "md5": "14f0c3b5ae8f98387cf688da74410985", "sha256": "53504d3e8a2b5d0aee758011300dc57cd8021a86932901db7e5c87f4f5ce5647" }, "downloads": -1, "filename": "python-shortcuts-0.9.1.tar.gz", "has_sig": false, "md5_digest": "14f0c3b5ae8f98387cf688da74410985", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22348, "upload_time": "2018-09-27T20:50:24", "url": "https://files.pythonhosted.org/packages/a3/8d/a6d009cdb0cb4f1737e84fb88f9561f8f44ade4f1ca9054c8794650c1ee7/python-shortcuts-0.9.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3332e9a9156a877b8892cebc56b455e7", "sha256": "1d0895c64f243640414e63d311a1b7bc4258a2ebfd8c98195d9973ccb105d785" }, "downloads": -1, "filename": "python-shortcuts-0.11.0.tar.gz", "has_sig": false, "md5_digest": "3332e9a9156a877b8892cebc56b455e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24788, "upload_time": "2019-03-05T22:10:59", "url": "https://files.pythonhosted.org/packages/9e/ab/e117457ac9dfcb564242abdf241da80b9fa2e866abfead7e8da32fd04fef/python-shortcuts-0.11.0.tar.gz" } ] }