{ "info": { "author": "James Estevez", "author_email": "j@jstvz.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7" ], "description": "# quare\n\n[![pipeline status](https://gitlab.com/jstvz/quare/badges/master/pipeline.svg)](https://gitlab.com/jstvz/quare/commits/master)\n[![coverage report](https://gitlab.com/jstvz/quare/badges/master/coverage.svg)](https://gitlab.com/jstvz/quare/commits/master)\n[![PyPI - License](https://img.shields.io/pypi/l/quare.svg)](https://www.gnu.org/licenses/lgpl-3.0.en.html)\n![PyPI](https://img.shields.io/pypi/v/quare.svg)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/quare.svg)\n![PyPI - Status](https://img.shields.io/pypi/status/quare.svg)\n\nInteract with Quip from the command line.\n\n![quare streaming messages](https://github.com/jstvz/quare/blob/master/docs/assets/quare.png?raw=true)\n\n## Introduction ##\nquare allows interaction with [Quip](https://quip.com) via the command line. While `quare` is in alpha, there are some features you may find useful:\n- Pipe the output of a command to a chat or document and format it as monospace.\n- Archive messages by piping them into a local file\n- Securely store authentication tokens for multiple Quip instances.\n\nThis tool is in its early stages of development, and is subject to change (or abandonment) at any time. Use at your own risk.\n\n## Installation ##\n\n```console\n$ pipx install quare\n```\n\n## Usage ##\n\n### Authentication ###\nStore a Quip API token (See: https://quip.com/dev/token):\n\n```console\n$ quare auth\nToken: long_token_string\nToken stored.\n```\nIf you have multiple Quip instances (like multiple Slack Workspaces), you can specify an alias for them. You can also pass your token directly to `auth`:\n\n```console\n$ quare msg auth --alias test_server --token 't1DJBQWBXHCYgh1=|2983928392|nYtRFIhV7nl4...'\n```\n\n#### Whoami ####\n\nTo see information about the logged in user:\n```console\n$ quare msg whoami\n\u250cDefault\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 Name \u2502 Tests Testeri \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 Email(s) \u2502 t@testz.dev \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 Quip User ID \u2502 mRLA6Zdn3PO \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n### Sending messages ###\nThe destination may be a document or chat:\n\n```console\n$ quare msg send --room room_id --content 'Hello everyone!'\n```\n\n#### Pipe content from `stdin` ####\n\nMessage content can be piped from `stdin`:\n```console\n$ uname -a | quare msg send --room room_id --content '-'\n```\n\nWhile Quip allows formatting messages using some markdown markup, it doesn't recognize markdown code blocks (\"\\`\\`\\`\"). To define a code block, use the `--monospace` option:\n\n```console\n$ dmesg | tail -n 5 | quare msg send --room room_id --content '-' --monospace\n```\n\n### Receiving messages ###\n\n#### Stream to stdout ####\nTo stream every message appearing in the Updates tab:\n\n```console\n$ quare msg stream\nStreaming updates... press Ctrl-C to exit.\n[Sun Jun 30 17:23:09 2019 | (Test Log) | @Tests Testeri] ok ok\n```\n\n#### Dump the content of a chat room ####\nTo get the last 5 messages in a chat room or document:\n```console\n$ quare msg get --room room_id --last 5\n[Sat Jun 29 03:19:09 2019 | @Tester Testeri] This is a monologue!\n[Sat Jun 29 16:00:12 2019 | @Tester Testeri] ok\n[Sat Jun 29 16:34:51 2019 | @Tester Testeri] I'm done!\n[Sun Jun 30 17:30:14 2019 | @Tester Testeri] \ud83c\udf2e\n[Sun Jun 30 17:30:27 2019 | @Tester Testeri] \ud83e\udd43\n```\n\nTo get the last 2 messages as JSON:\n```console\n$ quare msg get -r \"IcTAAAtVxXb\" --last 2 --json\n[{\"author_id\": \"mRLA6Zdn3PO\", \"visible\": true, \"id\": \"IcderpEe8wG\", \"created_usec\": 1561849212672040, \"updated_usec\": 1561849212696571, \"text\": \"ok\", \"author_name\": \"Tester Testeri\"}, {\"author_id\": \"mRLA6Zdn3PO\", \"visible\": true, \"id\": \"IcNodg7n2Tx\", \"created_usec\": 1561851291612434, \"updated_usec\": 1561851291620308, \"text\": \"chat\", \"author_name\": \"Tester Testeri\"}]\n```\n\nTo dump the last 200 messages in a chat room into a text file:\n```console\n$ quare msg get --room room_id --last 200 > interesting_conversation.log\n```\n\nTo get all messages since a datetime:\n```console\n$ quare msg get --room room_id --since 2019-01-01T00:32:00Z > greppable_archive.log\n```\n\nThe `--since` option recognizes any date recognized by [dateparser](https://dateparser.readthedocs.io/en/latest/):\n```console\n$ quare msg get --room room_id --since 'Monday' > this_week.log\n$ quare msg get --room room_id --since '2 months ago' > this_quarter.log\n```\n\n### Editing documents ###\n\nTo append a markdown file to an existing document\n```console\n$ quare doc append --id xxxDoc_IDxxx --file /tmp/foo.md\n$ cat /tmp/foo.md | quare doc append --id xxxDoc_IDxxx --file -\n```\n\nTo append a markdown-format string to an existing document\n```console\n$ quare doc append --id xxxDoc_IDxxx --content '## Headline\\n\\n'\n```\n\n## Development ##\n\nThis work is licensed under the terms of the [LGPL-3.0](https://www.gnu.org/licenses/lgpl-3.0.en.html).\n### Contributions ###\nSee CONTRIBUTING.rst\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/jstvz/quare", "keywords": "", "license": "LGPL-3.0+", "maintainer": "James Estevez", "maintainer_email": "j@jstvz.org", "name": "quare", "package_url": "https://pypi.org/project/quare/", "platform": "", "project_url": "https://pypi.org/project/quare/", "project_urls": { "Homepage": "https://github.com/jstvz/quare", "Repository": "https://github.com/jstvz/quare" }, "release_url": "https://pypi.org/project/quare/0.2.3/", "requires_dist": [ "Click (>=7.0,<8.0)", "colorama (>=0.4.1,<0.5.0)", "dateparser (>=0.7.1,<0.8.0)", "keyring (>=18.0,<19.0)", "terminaltables (>=3.1,<4.0)", "websocket-client (>=0.56.0,<0.57.0)" ], "requires_python": ">=3.7,<4.0", "summary": "quare is a CLI client for Quip.", "version": "0.2.3" }, "last_serial": 5800070, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f45b0136890e1d48f7a479bd917a7ee2", "sha256": "38aabf2258a799d39f3bbb981abfdca7f55b1baaab6e753661a992784b573383" }, "downloads": -1, "filename": "quare-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f45b0136890e1d48f7a479bd917a7ee2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7,<4.0", "size": 62089, "upload_time": "2019-07-01T04:14:37", "url": "https://files.pythonhosted.org/packages/4c/fc/7c0fe8092268d50efab9c67e4ddbd771b02bfe7fe66b9781a141d0b6d9c0/quare-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "70c1ee0615d61690a87bb8b63d08f724", "sha256": "56270957d577d25053d55813e6ae636964d40d1d14b8e229c00b68d3d50b3523" }, "downloads": -1, "filename": "quare-0.1.0.tar.gz", "has_sig": false, "md5_digest": "70c1ee0615d61690a87bb8b63d08f724", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7,<4.0", "size": 18003, "upload_time": "2019-07-01T04:14:39", "url": "https://files.pythonhosted.org/packages/7b/03/6f9b9823cfb5903b0aba4b0c9fc8c679fb65e7e5d7748d689b288aa87613/quare-0.1.0.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "07348dac363b096bd3afe4054e4ae34a", "sha256": "db6b071f8296b74388c5ca1aceab83e465ccea50ad67da76a5c2702a477bda20" }, "downloads": -1, "filename": "quare-0.2.3-py3-none-any.whl", "has_sig": false, "md5_digest": "07348dac363b096bd3afe4054e4ae34a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7,<4.0", "size": 22527, "upload_time": "2019-09-08T18:11:43", "url": "https://files.pythonhosted.org/packages/dd/c1/658ddfa1bf4b453e7df435168e8df7dd4acccc754542747bfb70a16621dc/quare-0.2.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "41797775ab8d5b26f63b9eed610ac9b4", "sha256": "b4bdd0c235b087b49f14e62c286b2c21a533dd99dcbefc710c236ce9b49ffbeb" }, "downloads": -1, "filename": "quare-0.2.3.tar.gz", "has_sig": false, "md5_digest": "41797775ab8d5b26f63b9eed610ac9b4", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7,<4.0", "size": 22021, "upload_time": "2019-09-08T18:11:44", "url": "https://files.pythonhosted.org/packages/86/06/d3f21a7f76763fa7f4a56a5d48aaef6435a2b6ee34b9628fc4de9c7edace/quare-0.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "07348dac363b096bd3afe4054e4ae34a", "sha256": "db6b071f8296b74388c5ca1aceab83e465ccea50ad67da76a5c2702a477bda20" }, "downloads": -1, "filename": "quare-0.2.3-py3-none-any.whl", "has_sig": false, "md5_digest": "07348dac363b096bd3afe4054e4ae34a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7,<4.0", "size": 22527, "upload_time": "2019-09-08T18:11:43", "url": "https://files.pythonhosted.org/packages/dd/c1/658ddfa1bf4b453e7df435168e8df7dd4acccc754542747bfb70a16621dc/quare-0.2.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "41797775ab8d5b26f63b9eed610ac9b4", "sha256": "b4bdd0c235b087b49f14e62c286b2c21a533dd99dcbefc710c236ce9b49ffbeb" }, "downloads": -1, "filename": "quare-0.2.3.tar.gz", "has_sig": false, "md5_digest": "41797775ab8d5b26f63b9eed610ac9b4", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7,<4.0", "size": 22021, "upload_time": "2019-09-08T18:11:44", "url": "https://files.pythonhosted.org/packages/86/06/d3f21a7f76763fa7f4a56a5d48aaef6435a2b6ee34b9628fc4de9c7edace/quare-0.2.3.tar.gz" } ] }