{ "info": { "author": "HelloRusk", "author_email": "7X.rusk@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# scrapbox-python\n\n[![CircleCI](https://circleci.com/gh/7ma7X/scrapbox-python.svg?style=svg)](https://circleci.com/gh/7ma7X/scrapbox-python)\n[![PyPI version](https://badge.fury.io/py/scrapbox.svg)](https://badge.fury.io/py/scrapbox)\n\nAn unofficial wrapper around the [Scrapbox API](https://scrapbox.io/help-jp/API).\n\n## Installation\n\n```sh\npip install scrapbox\n# or `pipenv install scrapbox`\n```\n\n## Basic Use\n\n```python\nimport scrapbox\n\nclient = scrapbox.Client()\nproject = client.get(\"/pages/help-jp/\")\n```\n\n## Examples\n\n### Get all the data of a project in JSON format\n\n```python\nimport json\n\nclient = scrapbox.Client()\nproject = client.get(\"/pages/help-jp/\", limit=10)\n# https://scrapbox.io/help-jp/\n\nprint(json.dumps(project, ensure_ascii=False, indent=2))\n\"\"\"\n{\n \"projectName\": \"help-jp\",\n \"skip\": 0,\n \"limit\": 10,\n \"count\": 73,\n \"pages\": [\n {\n \"id\": \"57c7d72ad25ef00f00100688\",\n \"title\": \"Scrapbox\u306e\u4f7f\u3044\u65b9\",\n \"image\": \"https://gyazo.com/7057219f5b20ca8afd122945b72453d3/raw\",\n \"descriptions\": [\n \"[https://gyazo.com/7057219f5b20ca8afd122945b72453d3]\",\n \"Scrapbox\uff08\u30b9\u30af\u30e9\u30c3\u30d7\u30dc\u30c3\u30af\u30b9\uff09\u306e\u4f7f\u3044\u65b9\u30fb\u6d3b\u7528\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\",\n \"[* \u7de8\u96c6\u3092\u59cb\u3081\u308b]\",\n \"\u307e\u305a\u6700\u521d\u306b[\u30d6\u30e9\u30b1\u30c6\u30a3\u30f3\u30b0]\u3092\u8aad\u3093\u3067\u307f\u307e\u3057\u3087\u3046\",\n \"[* \u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u96f0\u56f2\u6c17\u3092\u3064\u304b\u3080]\"\n ],\n \"user\": {\n \"id\": \"566f8b954fb08e1100af5c5b\"\n },\n \"pin\": 9007197717386014,\n \"views\": 34396,\n \"linked\": 2,\n \"commitId\": \"5cf9c78742fc7800179f8c19\",\n \"created\": 1472713402,\n \"updated\": 1559271981,\n \"accessed\": 1562487581,\n \"snapshotCreated\": 1559315996\n },\n...\n\"\"\"\n```\n\n### Get page data in JSON format\n\n```python\nimport json\n\nclient = scrapbox.Client()\npage = client.get(\"/pages/help-jp/API\")\n# https://scrapbox.io/help-jp/API\n\nprint(json.dumps(page, ensure_ascii=False, indent=2))\n\"\"\"\n{\n \"id\": \"58e67688d0a4fe0011a0249c\",\n \"title\": \"API\",\n \"image\": \"https://gyazo.com/5bf55bb6223a62bf4477f07a9aad39b8/raw\",\n \"descriptions\": [\n \"[https://gyazo.com/5bf55bb6223a62bf4477f07a9aad39b8]\",\n \"\u3042\u304f\u307e\u3067\u5185\u90e8API\u3067\u3059\u3002API\u306f\u4e88\u544a\u306a\u304f\u5909\u66f4\u3092\u884c\u3044\u307e\u3059\u3002\",\n \"\u30da\u30fc\u30b8\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308bAPI\",\n \"\u30da\u30fc\u30b8\u30ea\u30b9\u30c8\",\n \"`/api/pages/:projectName`\"\n ],\n \"user\": {\n \"id\": \"5724627723541f110097c291\",\n \"name\": \"shokai\",\n \"displayName\": \"Sho Hashimoto\",\n \"photo\": \"https://lh3.googleusercontent.com/-auiW-ZOVu6Y/AAAAAAAAAAI/AAAAAAAADLg/YwBeR9cziLU/photo.jpg\"\n },\n \"pin\": 0,\n \"views\": 7072,\n \"linked\": 1,\n \"commitId\": \"5d135304ff5b5d0017cd83cc\",\n \"created\": 1491498636,\n \"updated\": 1561547524,\n \"accessed\": 1562490240,\n \"snapshotCreated\": 1561586966,\n \"persistent\": true,\n \"lines\": [\n {\n \"id\": \"58e67688d0a4fe0011a0249c\",\n \"text\": \"API\",\n \"userId\": \"5724627723541f110097c291\",\n \"created\": 1491498636,\n \"updated\": 1491499158\n },\n...\n\"\"\"\n```\n\n### Get the body text of a page\n\n```python\nclient = scrapbox.Client()\ntext = client.get(\"/pages/help-jp/Scrapbox\u306e\u4f7f\u3044\u65b9/text\")\n\nprint(text)\n\"\"\"\nScrapbox\u306e\u4f7f\u3044\u65b9\n[https://gyazo.com/7057219f5b20ca8afd122945b72453d3]\nScrapbox\uff08\u30b9\u30af\u30e9\u30c3\u30d7\u30dc\u30c3\u30af\u30b9\uff09\u306e\u4f7f\u3044\u65b9\u30fb\u6d3b\u7528\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\n\n[* \u7de8\u96c6\u3092\u59cb\u3081\u308b]\n\t\u307e\u305a\u6700\u521d\u306b[\u30d6\u30e9\u30b1\u30c6\u30a3\u30f3\u30b0]\u3092\u8aad\u3093\u3067\u307f\u307e\u3057\u3087\u3046\n\n[* \u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u96f0\u56f2\u6c17\u3092\u3064\u304b\u3080]\n \u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\n \tScrapbox\u3092\u958b\u767a\u3059\u308bNota\u304c\u5b9f\u969b\u306b\u5229\u7528\u3057\u305f\u30da\u30fc\u30b8\u3092\u4e00\u90e8\u305d\u306e\u307e\u307e\u516c\u958b\u3057\u307e\u3059\u3002\n \u3000[Nota\u793e\u306eScrapbox\u3092\u4e00\u90e8\u516c\u958b https://scrapbox.io/nota-private-sample/]\n\t[Scrapbox\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u30b9\u30e9\u30a4\u30c9]\n\t\t\u4f7f\u3044\u65b9\u306e\u6982\u8981\u3092\u63b4\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\n\u3000\u5b9f\u8df5\u30c6\u30af\u30cb\u30c3\u30af\n \u3000[\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u751f\u7523\u6027\u3092\u3042\u3052\u308bScrapbox\u306e\u4f7f\u3044\u65b9 https://scrapbox.io/business/tutorial]\n...\n\"\"\"\n```\n\n### Get the title image of a page\n\n```python\nclient = scrapbox.Client()\n\nraw_image = client.get(\"/pages/help-jp/Scrapbox\u306e\u4f7f\u3044\u65b9/icon\")\nwith open(\"title.jpg\", \"wb\") as f:\n f.write(raw_image)\n# Download the top icon as \"title.jpg\"\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/7ma7X/scrapbox-python", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "scrapbox", "package_url": "https://pypi.org/project/scrapbox/", "platform": "", "project_url": "https://pypi.org/project/scrapbox/", "project_urls": { "Homepage": "https://github.com/7ma7X/scrapbox-python" }, "release_url": "https://pypi.org/project/scrapbox/0.6.1/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "An unofficial wrapper around the Scrapbox API", "version": "0.6.1" }, "last_serial": 5496708, "releases": { "0.5.1": [ { "comment_text": "", "digests": { "md5": "ae0f100145de7440ce121b14a36f85e5", "sha256": "7e3c8b55fe1863a3dbdc6e2cb80031ae78369c0b82feafaba4ae9b2a72541a6b" }, "downloads": -1, "filename": "scrapbox-0.5.1.tar.gz", "has_sig": false, "md5_digest": "ae0f100145de7440ce121b14a36f85e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 965, "upload_time": "2019-07-07T08:02:13", "url": "https://files.pythonhosted.org/packages/c8/40/3c032b721a4e233dd795c603a3cb41a6c333c56a9098a78d325795dd6149/scrapbox-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "a621f88bf46f8585e6684a42aa449eb4", "sha256": "43bfe965e046094bdbc1c34b03a81a5c11ab61d4cff692ea8de574407aad16bd" }, "downloads": -1, "filename": "scrapbox-0.5.2.tar.gz", "has_sig": false, "md5_digest": "a621f88bf46f8585e6684a42aa449eb4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1055, "upload_time": "2019-07-07T08:16:27", "url": "https://files.pythonhosted.org/packages/d3/95/92ec1a948f465b49c47d57fdbabe47d35d5319cc6a2e1d54e3c36d3781e2/scrapbox-0.5.2.tar.gz" } ], "0.5.3": [ { "comment_text": "", "digests": { "md5": "e8af4818d314a5403bb33648642e0e73", "sha256": "25a775a8b0abfd24145b0f6b286a2d478cae4817f2027fcacf8bbdd8ff84f2b1" }, "downloads": -1, "filename": "scrapbox-0.5.3-py3-none-any.whl", "has_sig": false, "md5_digest": "e8af4818d314a5403bb33648642e0e73", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2079, "upload_time": "2019-07-07T08:23:53", "url": "https://files.pythonhosted.org/packages/44/7d/6cdbc8e50a176b57d5877b057181c8940165758d8fbba8ec849bf442f815/scrapbox-0.5.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c2b562e6255791b24ea0baba6832c9ff", "sha256": "19eaad79c9ea6a2edf7dedce508b6f5218b5717af71ec0bf742b02734b77c86d" }, "downloads": -1, "filename": "scrapbox-0.5.3.tar.gz", "has_sig": false, "md5_digest": "c2b562e6255791b24ea0baba6832c9ff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1055, "upload_time": "2019-07-07T08:23:55", "url": "https://files.pythonhosted.org/packages/80/4d/97c8f7989b5644dc51878d8f0050373049c2287cdb69f15c02e08ad7d576/scrapbox-0.5.3.tar.gz" } ], "0.5.4": [ { "comment_text": "", "digests": { "md5": "958578043afa66034474dcbc0c923623", "sha256": "8bc4c1e755834a083f7dfe7d74a0adadf7b3fcb22dfe0636db56fec6c77c4d10" }, "downloads": -1, "filename": "scrapbox-0.5.4-py3-none-any.whl", "has_sig": false, "md5_digest": "958578043afa66034474dcbc0c923623", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3528, "upload_time": "2019-07-07T08:37:17", "url": "https://files.pythonhosted.org/packages/ac/77/8e3fa736baf79551f82843c78c5e3ae2703ace27f02bbbb2969e97ec0c72/scrapbox-0.5.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dcdf4023a3a3368b8adce0dcfeb2e278", "sha256": "44eeea8abf9be1be57f59caedf3ab8ab818507769466aea9334dd3f1640807d2" }, "downloads": -1, "filename": "scrapbox-0.5.4.tar.gz", "has_sig": false, "md5_digest": "dcdf4023a3a3368b8adce0dcfeb2e278", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1795, "upload_time": "2019-07-07T08:37:19", "url": "https://files.pythonhosted.org/packages/af/20/fb0d3c7d8dd5b1d789db2974ad709805c4530626b655edc3b66671fa080c/scrapbox-0.5.4.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "61077844ea2c4617cbce5e26d22a72e5", "sha256": "78a21b6e1d46b4c0ecd87be591e12bbe9abb6aec7d996d06ec3aea8f2d00e666" }, "downloads": -1, "filename": "scrapbox-0.6.1-py3-none-any.whl", "has_sig": false, "md5_digest": "61077844ea2c4617cbce5e26d22a72e5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5068, "upload_time": "2019-07-07T09:25:54", "url": "https://files.pythonhosted.org/packages/41/f7/df46b4c127d1a389b33c016e1b51fa487ba10e8606287c985fa33dc33ceb/scrapbox-0.6.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "02a9e74e8443b565baac3ccc81237792", "sha256": "2087e385de9f1ee8e63bd54a5e4e376ac0fc155fee91b4b579b53a700d67bd7c" }, "downloads": -1, "filename": "scrapbox-0.6.1.tar.gz", "has_sig": false, "md5_digest": "02a9e74e8443b565baac3ccc81237792", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3852, "upload_time": "2019-07-07T09:25:56", "url": "https://files.pythonhosted.org/packages/84/de/eef28840102ee23cc1dee4246e2f9387919c2f542bd64152e86950c2990f/scrapbox-0.6.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "61077844ea2c4617cbce5e26d22a72e5", "sha256": "78a21b6e1d46b4c0ecd87be591e12bbe9abb6aec7d996d06ec3aea8f2d00e666" }, "downloads": -1, "filename": "scrapbox-0.6.1-py3-none-any.whl", "has_sig": false, "md5_digest": "61077844ea2c4617cbce5e26d22a72e5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5068, "upload_time": "2019-07-07T09:25:54", "url": "https://files.pythonhosted.org/packages/41/f7/df46b4c127d1a389b33c016e1b51fa487ba10e8606287c985fa33dc33ceb/scrapbox-0.6.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "02a9e74e8443b565baac3ccc81237792", "sha256": "2087e385de9f1ee8e63bd54a5e4e376ac0fc155fee91b4b579b53a700d67bd7c" }, "downloads": -1, "filename": "scrapbox-0.6.1.tar.gz", "has_sig": false, "md5_digest": "02a9e74e8443b565baac3ccc81237792", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3852, "upload_time": "2019-07-07T09:25:56", "url": "https://files.pythonhosted.org/packages/84/de/eef28840102ee23cc1dee4246e2f9387919c2f542bd64152e86950c2990f/scrapbox-0.6.1.tar.gz" } ] }