{ "info": { "author": "Etienne Posthumus", "author_email": "ep@epoz.org", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3" ], "description": "textbase - A Python library to manipulate Inmagic/DBText style data\nfiles\n\nWhat are textbase files?\n------------------------\n\nA simple format separating data records with a single character\ndelimiter, (all files we use have a $ character on a line. For each\nrecord the fieldname is the first word on the line, usually in upper\ncase. Any text following the fieldname is that value for the field.\nRepeating values in a list for the fieldname can be specified on\nconsecutive lines using a semicolon. If the text value for a field is\nvery long and needs to wrap, start the line with one (or more) spaces.\n\nWhy did you re-invent the wheel?\n--------------------------------\n\nWe already have CSV files, or JSON files, or YAML, why did you make\nthis? Well, I didn't invent this. It is actually a format used by a\nsuite of software from InMagic:\nhttp://www.inmagic.com/products/dbtext-library-suite/\n\nWe used the dbText software to create a boatload of data files since the\nearly eighties, which is a LONG time ago in Internet-land. Those exact\nsame data files are still used to drive a lot of software, and has\nproven to be remarkably useful over the years. Think of it as Markdown\nvs HTML, or as a simpler dataformat with \u00fcber-simple Key:Value records\nthat are human readable.\n\nExample File:\n-------------\n\n::\n\n FOO A Foo field\n BAR A Baz field with mulitple entries\n ; Another\n ; and yet even more\n $\n FOO This is the FOO field for the next record\n BAR Nothing\n\nThe main utitlity class is TextBase. It can be initialised with an open\nfile, or a string buffer, named sourcefile. Sourcefile is iterated over,\nsplitting the contents into chunks. Each chunk is parsed and added to an\ninternal buffer list. The internal buffer contains a dict for each\nrecord. Each entry in the dict is keyed on the DBText record fieldname,\nthe entry itself is a list of the values.\n\nThe TextBase object can be used as a generator to iterate over the\ncontents, or the Textbase object can be index-addressed like a list.\n\nExample Usage:\n--------------\n\n.. code:: python\n\n import textbase\n t = textbase.TextBase(somebuf)\n\n print len(t)\n\n for x in t[10:20]:\n print x.keys()\n\n print t[0]\n\nIf you do not want the records parsed into Python dictionaries and just\nwant to muck about with the records as text blobs, initialise like this:\n\n.. code:: python\n\n t = textbase.TextBase(somebuf, parse=False)\n\nAuthor: Etienne Posthumus Mail: ep@epoz.org\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/epoz/textbase/", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "TextBase", "package_url": "https://pypi.org/project/TextBase/", "platform": "", "project_url": "https://pypi.org/project/TextBase/", "project_urls": { "Homepage": "https://github.com/epoz/textbase/" }, "release_url": "https://pypi.org/project/TextBase/0.9/", "requires_dist": null, "requires_python": "", "summary": "TextBase library to manipulate DBText style data files.", "version": "0.9" }, "last_serial": 4015127, "releases": { "0.4": [ { "comment_text": "", "digests": { "md5": "178b04ab32af9714d7be779662a11dcb", "sha256": "f698798e21cd47415199a59e542219555379bba51be92ca9ccd982f40028eef3" }, "downloads": -1, "filename": "TextBase-0.4.tar.gz", "has_sig": false, "md5_digest": "178b04ab32af9714d7be779662a11dcb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2323, "upload_time": "2014-02-21T13:43:31", "url": "https://files.pythonhosted.org/packages/40/5f/ad4af944bffe44a06548ac5ff520d87fbb81c5845ff9871e3ce327992bcd/TextBase-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "83a6d3a786034a44e1eeee7054e5a2a2", "sha256": "0829a3c006aa9ecf50a0c32897e9ea82662f0a4cda560763cee101124f0072e8" }, "downloads": -1, "filename": "TextBase-0.5.tar.gz", "has_sig": false, "md5_digest": "83a6d3a786034a44e1eeee7054e5a2a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2050, "upload_time": "2014-03-03T10:30:22", "url": "https://files.pythonhosted.org/packages/bc/75/8dae3e3827479801e75f452c912e1b2c9b6c81bce2d6e5c7406ec75a9211/TextBase-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "8f1024f669f16bd2aca448f1d065568a", "sha256": "776d7f80154a1514c27f2cec353cd21eff075e176fc6a4d8f0ace84f41dd130e" }, "downloads": -1, "filename": "TextBase-0.6.tar.gz", "has_sig": false, "md5_digest": "8f1024f669f16bd2aca448f1d065568a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2972, "upload_time": "2014-03-03T10:34:14", "url": "https://files.pythonhosted.org/packages/09/d6/34df2b532ff78fb3bdc035ed127dcd75cb7c27401370fadeee23cd5ff42b/TextBase-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "f2ed6a22c544bfbc97b64ca83fc0bfc2", "sha256": "3673ecfc40174bbc029e93d78ca32cd21388c7c3f56f41bc20cfa0f71fb0b18f" }, "downloads": -1, "filename": "TextBase-0.7.tar.gz", "has_sig": false, "md5_digest": "f2ed6a22c544bfbc97b64ca83fc0bfc2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3182, "upload_time": "2014-03-03T10:53:56", "url": "https://files.pythonhosted.org/packages/6f/9d/cac0e8e29a23ce560b6263f5ff5bcd3b661975722e837ec801523e5e4daf/TextBase-0.7.tar.gz" } ], "0.9": [ { "comment_text": "", "digests": { "md5": "51d55ba2e81bfb0f3d55568801abd46c", "sha256": "9f9396858bbcf1a49f2eeb5ab3941ddfed4ffa6be343285398ebeb83843d8f80" }, "downloads": -1, "filename": "TextBase-0.9-py3-none-any.whl", "has_sig": false, "md5_digest": "51d55ba2e81bfb0f3d55568801abd46c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4033, "upload_time": "2018-06-29T12:03:33", "url": "https://files.pythonhosted.org/packages/6f/5c/ff9985fac2ad2c19bf40d34190d9bb6b8c055a6e47e00e7ec79e63076b8b/TextBase-0.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "20751a12a2c24af992e430beb615887a", "sha256": "7b99e7f9758d958c6cabef33312c7ceb3fe5f4faf36e7845aaaff062d9ffa9c5" }, "downloads": -1, "filename": "TextBase-0.9.tar.gz", "has_sig": false, "md5_digest": "20751a12a2c24af992e430beb615887a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3593, "upload_time": "2018-06-29T12:03:35", "url": "https://files.pythonhosted.org/packages/77/ca/261435e13a5088abe92e49edb8e6b344468f3a4ce28ebf0256368b8ef1a9/TextBase-0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "51d55ba2e81bfb0f3d55568801abd46c", "sha256": "9f9396858bbcf1a49f2eeb5ab3941ddfed4ffa6be343285398ebeb83843d8f80" }, "downloads": -1, "filename": "TextBase-0.9-py3-none-any.whl", "has_sig": false, "md5_digest": "51d55ba2e81bfb0f3d55568801abd46c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4033, "upload_time": "2018-06-29T12:03:33", "url": "https://files.pythonhosted.org/packages/6f/5c/ff9985fac2ad2c19bf40d34190d9bb6b8c055a6e47e00e7ec79e63076b8b/TextBase-0.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "20751a12a2c24af992e430beb615887a", "sha256": "7b99e7f9758d958c6cabef33312c7ceb3fe5f4faf36e7845aaaff062d9ffa9c5" }, "downloads": -1, "filename": "TextBase-0.9.tar.gz", "has_sig": false, "md5_digest": "20751a12a2c24af992e430beb615887a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3593, "upload_time": "2018-06-29T12:03:35", "url": "https://files.pythonhosted.org/packages/77/ca/261435e13a5088abe92e49edb8e6b344468f3a4ce28ebf0256368b8ef1a9/TextBase-0.9.tar.gz" } ] }