{ "info": { "author": "Donald Sturgeon", "author_email": "chinesetextproject@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: Linguistic" ], "description": "ctext\n=====\n\nctext is a simple Python wrapper and set of helper functions for the `CTP API `_, which fetches data from the `Chinese Text Project `_ database, a digital library of pre-modern Chinese literature. Developed for Python 3; Python 2 is supported since version 0.263.\n\nDevelopment status\n------------------\n\nThis software is currently experimental. See http://ctext.org/tools/api for API details.\n\nInstallation\n------------\n\n::\n\n pip install ctext\n\nUsage\n-----\n\nTextual items are identified by `CTP URNs `_. Each URN identifies a text or part of a text. You can get these manually by visiting the http://ctext.org website (bottom-right of each page), or programmatically using the **searchtexts()** function. To use this library, first::\n\n from ctext import *\n\nSome API functions (like getting the full structure of a text, or downloading a lot of data) may require an API key. If you have one, before calling any other functions, do this::\n\n setapikey(\"your-api-key-goes-here\")\n\nYou can also set the interface language (\"en\" for English, \"zh\" for Chinese)::\n\n setlanguage(\"zh\")\n\nSimilarly, automatic remapping to simplified Chinese can be done with::\n\n setremap(\"gb\")\n\n\n\ngetstats\n.........\n\n::\n\n stats = getstats()\n\nSimple wrapper around the `getstats API call `_.\n\n\ngetstatus\n.........\n\n::\n\n status = getstatus()\n\nSimple wrapper around the `getstatus API call `_.\n\n\ngettexttitles\n.............\n\n::\n\n titles = gettexttitles()\n\nSimple wrapper around the `gettexttitles API call `_.\n\n\ngetcapabilities\n...............\n\n::\n\n capabilities = getcapabilities()\n\nSimple wrapper around the `getcapabilities API call `_.\n\n\n\n\nreadlink\n........\n\n::\n\n urn = readlink(\"http://ctext.org/mengzi\")\n\nSimple wrapper around the `readlink API call `_.\n\n\ngettext\n.......\n\n::\n\n passages = gettext(\"ctp:analects/xue-er\")\n\nSimple wrapper around the `gettext API call `_. Note that the API gettext function needs to be called recursively to get the full text of an entire book; the Python helper functions **gettextasparagraphlist**, **gettextasstring**, and **gettextasobject** call gettext repeatedly to extract all corresponding textual data.\n\ngettextaschapterlist\n....................\n\n::\n\n chapters = gettextaschapterlist(\"ctp:analects\")\n\nReturns the full text of the requested URN as an object simple list of strings, each corresponding to one chapter of text. Titles are omitted.\n\ngettextasobject\n...............\n\n::\n\n data = gettextasobject(\"ctp:analects/xue-er\")\n\nReturns the full text of the requested URN as an object with a nested structure representing what each **gettext** API call returns.\n\ngettextasparagraphlist\n......................\n\n::\n\n passages = gettextasparagraphlist(\"ctp:analects/xue-er\")\n\nReturns the full text of the requested URN as a simple list of strings, each corresponding to one passage of text. Titles are omitted.\n\ngettextasstring\n...............\n\n::\n\n string = gettextasstring(\"ctp:analects/xue-er\")\n\nReturns the full text of the requested URN as a single string. Each paragraph is separated with \"\\\\n\\\\n\".\n\ngettextinfo\n...........\n\n::\n\n data = gettextinfo(\"ctp:analects\")\n\nSimple wrapper around the `gettextinfo API call `_.\n\nsearchtexts\n...........\n\n::\n\n data = searchtexts(\"\u8ad6\u8a9e\")\n\nSimple wrapper around the `searchtexts API call `_.\n\nsetapikey\n.........\n\n::\n\n setapikey(\"your-api-key-goes-here\")\n\nThis sets an API key which is then supplied to the CTP API with all subsequent API requests.\n\n\nsetlanguage\n...........\n\n::\n\n setlanguage(\"zh\")\n\nThis sets the \"if\" (interface language) parameter, which is then supplied to the CTP API with all subsequent API requests.\n\n\nsetremap\n........\n\n::\n\n setremap(\"gb\")\n\nThis sets the \"remap\" (character remapping) parameter, which is then supplied to the CTP API with all subsequent API requests. Currently the only valid value is \"gb\", which returns data in simplified Chinese.\n\n\n\nLicense\n-------\n\n\nCopyright 2016 Donald Sturgeon. This code is licensed under the MIT License: http://opensource.org/licenses/mit-license.html\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://ctext.org/tools/api", "keywords": "Chinese", "license": "", "maintainer": "", "maintainer_email": "", "name": "ctext", "package_url": "https://pypi.org/project/ctext/", "platform": "", "project_url": "https://pypi.org/project/ctext/", "project_urls": { "Homepage": "http://ctext.org/tools/api" }, "release_url": "https://pypi.org/project/ctext/0.265/", "requires_dist": null, "requires_python": "", "summary": "Chinese Text Project API wrapper", "version": "0.265" }, "last_serial": 3321956, "releases": { "0.11": [ { "comment_text": "", "digests": { "md5": "c0e45e62ba7945cbaa8d07943c4e008b", "sha256": "213666399e156ded768ea2ab30eded73b069b74b267a7c31825a5f9de91dd8b6" }, "downloads": -1, "filename": "ctext-0.11.tar.gz", "has_sig": false, "md5_digest": "c0e45e62ba7945cbaa8d07943c4e008b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2010, "upload_time": "2016-01-31T20:38:15", "url": "https://files.pythonhosted.org/packages/4e/78/233c9e47cb734d803341c230f58fad735b4723f4616bbf220e9de854d292/ctext-0.11.tar.gz" } ], "0.12": [], "0.13": [ { "comment_text": "", "digests": { "md5": "0514619f72b96a0fb28753d9ac715eb2", "sha256": "fafbe89a0724f6bfca62302ffcd887e8a9ffdad67fe54a96569357e579b33a23" }, "downloads": -1, "filename": "ctext-0.13.tar.gz", "has_sig": false, "md5_digest": "0514619f72b96a0fb28753d9ac715eb2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3122, "upload_time": "2016-02-02T16:30:59", "url": "https://files.pythonhosted.org/packages/a9/db/8d9a7a5c02a4f9a49579263e9275e5056cbe20863bde24dc097aff672dd7/ctext-0.13.tar.gz" } ], "0.14": [ { "comment_text": "", "digests": { "md5": "ff6aaa00925ba3429d289f895cb610a0", "sha256": "ef5854c54f86d499655fca05c42c78ff642722bb710c8f76ce63f7de2fff7002" }, "downloads": -1, "filename": "ctext-0.14.tar.gz", "has_sig": false, "md5_digest": "ff6aaa00925ba3429d289f895cb610a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3129, "upload_time": "2016-02-03T22:16:06", "url": "https://files.pythonhosted.org/packages/e9/c4/7d27aba33bc324f9259f2ffc9cc1bf9af3dfbf8659392983744b876f1f23/ctext-0.14.tar.gz" } ], "0.15": [ { "comment_text": "", "digests": { "md5": "2e328fb666327462549cd8f2a8309973", "sha256": "518ed63a85e7312e4ba910260427537974e6426e477f5b553ad2c93bc1d93d57" }, "downloads": -1, "filename": "ctext-0.15.tar.gz", "has_sig": false, "md5_digest": "2e328fb666327462549cd8f2a8309973", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3235, "upload_time": "2016-02-04T22:09:00", "url": "https://files.pythonhosted.org/packages/60/52/1f688e398a94a27afce3f726fdcd30cd83e1bf6f5647b8c891f1f65ca891/ctext-0.15.tar.gz" } ], "0.16": [ { "comment_text": "", "digests": { "md5": "6c46cce7caecb28ecd985398b92e26f7", "sha256": "4684fe91c284b7d46a9b2bb5fa7c9d067ff6f5f7909dbc96b229fef7e5a3b067" }, "downloads": -1, "filename": "ctext-0.16.tar.gz", "has_sig": false, "md5_digest": "6c46cce7caecb28ecd985398b92e26f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3724, "upload_time": "2016-02-04T22:20:52", "url": "https://files.pythonhosted.org/packages/b2/95/36510af7ad7ad0e9306f495362523ec489ff45bbe223f54bc5a1498a90d7/ctext-0.16.tar.gz" } ], "0.17": [ { "comment_text": "", "digests": { "md5": "1b7b3471b8d1ec74d74dc37ac88b61cf", "sha256": "3e3559b148ebb52a01cd4f0c524b7a73730c9c03841cc2c15ffad1074cea2cb4" }, "downloads": -1, "filename": "ctext-0.17.tar.gz", "has_sig": false, "md5_digest": "1b7b3471b8d1ec74d74dc37ac88b61cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3712, "upload_time": "2016-02-05T23:55:34", "url": "https://files.pythonhosted.org/packages/45/b7/6d522416f63abd88a8a46b12a578eab69f987a44874e2a3408208d45fca0/ctext-0.17.tar.gz" } ], "0.18": [ { "comment_text": "", "digests": { "md5": "aeb4cb7cad53f193b3ee8b454f37a954", "sha256": "a99e7d1117e020e5af6f42c10bd1cd43a8234e1d94bb2bc704fc8fc4eab6c869" }, "downloads": -1, "filename": "ctext-0.18.tar.gz", "has_sig": false, "md5_digest": "aeb4cb7cad53f193b3ee8b454f37a954", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3742, "upload_time": "2016-03-07T23:01:15", "url": "https://files.pythonhosted.org/packages/9f/63/fe4fb87f97b04ec4c4eb9c004b8f70174b5a2edf551ed349612390c87a0c/ctext-0.18.tar.gz" } ], "0.19": [ { "comment_text": "", "digests": { "md5": "57fb6388fab7ac048115a74670ba89ff", "sha256": "21499213c21e3023917334d931b5a57fa251a28ce04205d94c57f4770f4e6eab" }, "downloads": -1, "filename": "ctext-0.19.tar.gz", "has_sig": false, "md5_digest": "57fb6388fab7ac048115a74670ba89ff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3772, "upload_time": "2016-04-08T14:46:44", "url": "https://files.pythonhosted.org/packages/94/69/fdde4dd670be2c34a22f6a7cfaaf1c48071101bff2123424363b2893d051/ctext-0.19.tar.gz" } ], "0.20": [ { "comment_text": "", "digests": { "md5": "7ee065f25a63e811fd4d44ce00d45c09", "sha256": "77a4dd18241b786f10d0250f689beb75e7c8be8b0051d3a8640a2cc8ac538069" }, "downloads": -1, "filename": "ctext-0.20.tar.gz", "has_sig": false, "md5_digest": "7ee065f25a63e811fd4d44ce00d45c09", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3781, "upload_time": "2016-04-08T15:04:27", "url": "https://files.pythonhosted.org/packages/79/c7/e430e22eebc3f8a62d7bed83effebafe11354e3d2fc5d093cc35389ed841/ctext-0.20.tar.gz" } ], "0.21": [ { "comment_text": "", "digests": { "md5": "4e1c21c22e9e92837571f5dd0d4ea924", "sha256": "b215a9cb0c062c0f6ec0247743b7cd16c9ede28cab2c524fcce5ea24ed13124c" }, "downloads": -1, "filename": "ctext-0.21.tar.gz", "has_sig": false, "md5_digest": "4e1c21c22e9e92837571f5dd0d4ea924", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3880, "upload_time": "2016-04-21T15:37:35", "url": "https://files.pythonhosted.org/packages/61/9a/cc4b8960da3fe79c06e15f9bbeec79d5256eff7c86831e55b86a8bf15eb9/ctext-0.21.tar.gz" } ], "0.22": [ { "comment_text": "", "digests": { "md5": "307223466bd30b361107df4ac4974077", "sha256": "f9738007d4b96501f63c629444cb251ba46fa39f3bd292bd37bcaf435e690798" }, "downloads": -1, "filename": "ctext-0.22.tar.gz", "has_sig": false, "md5_digest": "307223466bd30b361107df4ac4974077", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3912, "upload_time": "2016-04-22T00:48:39", "url": "https://files.pythonhosted.org/packages/3c/94/d625b6da51f90a3a1350bfafedc8d6acb867bf85edc299dd1b98b8bddc28/ctext-0.22.tar.gz" } ], "0.23": [ { "comment_text": "", "digests": { "md5": "461ae7b5365dc5fa0ace41f5af1f72ed", "sha256": "ab3970590a514636c9732ddb9d0f3c82f1412f9b64ed263a30b2142f7fdfdc07" }, "downloads": -1, "filename": "ctext-0.23.tar.gz", "has_sig": false, "md5_digest": "461ae7b5365dc5fa0ace41f5af1f72ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3923, "upload_time": "2016-04-22T00:53:22", "url": "https://files.pythonhosted.org/packages/7a/d3/5ee3b185edd203a995bfddc34f501f4df8918a2e3606b28afc35f519479a/ctext-0.23.tar.gz" } ], "0.24": [ { "comment_text": "", "digests": { "md5": "33a6618e8b24206845c248f16358192b", "sha256": "e7f8db269f87b0d82b79b03a519f4d4cb7d1fb0cb781bb9b6bb78d3bbc58866d" }, "downloads": -1, "filename": "ctext-0.24.tar.gz", "has_sig": false, "md5_digest": "33a6618e8b24206845c248f16358192b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3928, "upload_time": "2016-05-07T10:43:46", "url": "https://files.pythonhosted.org/packages/5d/d5/b6dba15494b53a8a2087403f6221ebe648679dee1c50de57a0d32b94f75e/ctext-0.24.tar.gz" } ], "0.25": [ { "comment_text": "", "digests": { "md5": "4f58c50584ca97216da21b23afdb6dcf", "sha256": "9f34d8611880c13d33619be5ae58885b8df5d1644f2ee83471b65d2194515752" }, "downloads": -1, "filename": "ctext-0.25.tar.gz", "has_sig": false, "md5_digest": "4f58c50584ca97216da21b23afdb6dcf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3924, "upload_time": "2016-05-07T13:09:35", "url": "https://files.pythonhosted.org/packages/41/66/2ee77b42ec6ba6156a67e76f8d00444ea878df9304d6168c78eaf7147e31/ctext-0.25.tar.gz" } ], "0.26": [ { "comment_text": "", "digests": { "md5": "d3be6eac9ba4be19cad16e8ca7e0251c", "sha256": "609f7f4efa1b9ef59779f65772bce7f1ecd8ffc0189ed2b0fbcfe050234b5424" }, "downloads": -1, "filename": "ctext-0.26.tar.gz", "has_sig": false, "md5_digest": "d3be6eac9ba4be19cad16e8ca7e0251c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3986, "upload_time": "2016-05-07T13:16:24", "url": "https://files.pythonhosted.org/packages/85/e6/ad519a07ee781a9dd4c13045aa0b5a59a3cb1930df24020967cd906f0856/ctext-0.26.tar.gz" } ], "0.261": [ { "comment_text": "", "digests": { "md5": "cf76c56ae1c1d2644fb8f3d1e8637e0d", "sha256": "183ec3a560d716702fb2e66a827d904a15c8819a54e0f5fc29424336961dcf2e" }, "downloads": -1, "filename": "ctext-0.261.tar.gz", "has_sig": false, "md5_digest": "cf76c56ae1c1d2644fb8f3d1e8637e0d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3977, "upload_time": "2016-05-07T13:17:41", "url": "https://files.pythonhosted.org/packages/bd/93/df8be9b24c61466c5fe5cca2c139de00e80b889a5e3a5b718f5fb79ffe9a/ctext-0.261.tar.gz" } ], "0.262": [ { "comment_text": "", "digests": { "md5": "7a3b77e4424d53465d200aaacfd9dcc8", "sha256": "e887c08378bfff89bf8edc4fa6b4211e15396999444484d7d4c8c810b9c49f8a" }, "downloads": -1, "filename": "ctext-0.262.tar.gz", "has_sig": false, "md5_digest": "7a3b77e4424d53465d200aaacfd9dcc8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4014, "upload_time": "2016-08-10T17:12:41", "url": "https://files.pythonhosted.org/packages/a0/dc/bec275a6f6cba51bce340f8db1f5a7737215c942b005a5fd4d949ec7ce65/ctext-0.262.tar.gz" } ], "0.263": [ { "comment_text": "", "digests": { "md5": "03161967be59c54147bcf3e3e7e61cf6", "sha256": "fa8475a993c1a1ee8cdf301b691956f1a99808b94b38a489a8e1a26d23e97b6d" }, "downloads": -1, "filename": "ctext-0.263.tar.gz", "has_sig": false, "md5_digest": "03161967be59c54147bcf3e3e7e61cf6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4031, "upload_time": "2017-01-19T23:22:42", "url": "https://files.pythonhosted.org/packages/b8/b4/ceac92d46a5e204f1ac2850c1fd841373c5ab1c5d93435b86c29ddb1d89f/ctext-0.263.tar.gz" } ], "0.264": [ { "comment_text": "", "digests": { "md5": "f6d714131119ab9b13fbac5c8ff2a14c", "sha256": "256cf186723d2db5da79f8aad6f2e53ecf3abe87ddee33079ebdefc57a4fbacd" }, "downloads": -1, "filename": "ctext-0.264.tar.gz", "has_sig": false, "md5_digest": "f6d714131119ab9b13fbac5c8ff2a14c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4025, "upload_time": "2017-09-06T15:29:28", "url": "https://files.pythonhosted.org/packages/55/dc/719c5c7065bbfdea36a5f3ec715683e59ae1f20bf01bb19e6ffe589a1f7f/ctext-0.264.tar.gz" } ], "0.265": [ { "comment_text": "", "digests": { "md5": "ee9b97605fe041b00c1fa58bea88cad7", "sha256": "600304c744f4b41f58a08d68989efb7abb855c1504bb46e3797fb16e79b5586d" }, "downloads": -1, "filename": "ctext-0.265.tar.gz", "has_sig": false, "md5_digest": "ee9b97605fe041b00c1fa58bea88cad7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4040, "upload_time": "2017-11-10T11:41:56", "url": "https://files.pythonhosted.org/packages/61/4c/837ff5fdc8736cd7d3e407088cc39a5d8d2d0ade30885343b03100b708cb/ctext-0.265.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ee9b97605fe041b00c1fa58bea88cad7", "sha256": "600304c744f4b41f58a08d68989efb7abb855c1504bb46e3797fb16e79b5586d" }, "downloads": -1, "filename": "ctext-0.265.tar.gz", "has_sig": false, "md5_digest": "ee9b97605fe041b00c1fa58bea88cad7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4040, "upload_time": "2017-11-10T11:41:56", "url": "https://files.pythonhosted.org/packages/61/4c/837ff5fdc8736cd7d3e407088cc39a5d8d2d0ade30885343b03100b708cb/ctext-0.265.tar.gz" } ] }