{ "info": { "author": "Alexander Oblovatniy", "author_email": "oblovatniy@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries" ], "description": "=====================\nIL-2 FB Events Parser\n=====================\n\n|pypi_package| |pypi_downloads| |python_versions| |license|\n\n|unix_build| |windows_build| |coverage_status|\n\n|code_issues| |codeclimate| |codacy| |quality| |health| |requirements|\n\n\n**Table of contents**\n\n.. contents::\n :local:\n :depth: 1\n :backlinks: none\n\n\nSynopsis\n--------\n\nThis is a Python library which parses events from log produced by dedicated\nserver of \u00abIL-2 Forgotten Battles\u00bb flight simulator. Resulting information\nabout events is stored in special data structures.\n\n\nDemo\n----\n\nYou may see this library in action even if you do not understand its purpose.\n\nAll you need is just to `visit project's demo page`_.\n\nThat page allows you to test parser's ability to process strings. If you\ndo not know what to enter into a text area, you may click ``Insert test data``\nand parse it.\n\nIf something goes wrong, you will be prompted to confirm automatic creation of\nbug report which will be\n`listed on this page `_.\n\n\nKnown events\n------------\n\nThis library supports all known events produced by dedicated server\n(129 unique events).\n\nTo see their list, go to the `demo page`_ and click\n``See the list of supported events`` link.\n\n\nInstallation\n------------\n\nGet Python package from PyPI:\n\n.. code-block:: bash\n\n pip install il2fb-events-parser\n\n\nUsage\n-----\n\nIf you need to be able to parse all events this library knows about, use\n``EventsParser.parse_string()``:\n\nImport ``EventsParser`` and create its instance:\n\n.. code-block:: python\n\n from il2fb.parsers.events import EventsParser\n\n parser = EventsParser()\n\n\nParse a string to get an instance of event:\n\n.. code-block:: python\n\n event = parser.parse(\"[8:33:05 PM] User0 has connected\")\n\n\nExplore event's internal structure:\n\n.. code-block:: python\n\n print(event)\n # \n\n print(event.time)\n # datetime.time(20, 33, 5)\n\n print(event.actor)\n # \n\n print(event.actor.callsign)\n # User0\n\n\nConvert event into a dictionary:\n\n.. code-block:: python\n\n import pprint\n\n pprint.pprint(event.to_primitive())\n # {'actor': {'callsign': 'User0'},\n # 'name': 'HumanHasConnected',\n # 'time': '20:33:05',\n # 'verbose_name': 'Human has connected'}\n\n\nExceptions\n----------\n\nIf you try to parse unknown event, ``EventParsingError`` will be raised:\n\n.. code-block:: python\n\n parser.parse(\"foo bar\")\n # Traceback (most recent call last):\n # \u2026\n # EventParsingError: No event was found for string \"foo bar\"\n\nCurrent list of supported events is rather full, but ``EventParsingError`` is\nquite possible, because server's events are undocumented and this library may\ndo not know about all of them.\n\nIn case you need to catch this error, its full name is\n``il2fb.parsers.events.exceptions.EventParsingError``.\n\n\nSafe usage\n----------\n\nYou can set flag ``ignore_errors=True`` if you don't care about any exceptions:\n\n.. code-block:: python\n\n from il2fb.parsers.events import EventsParser\n\n parser = EventsParser()\n event = parser.parse(\"foo bar\", ignore_errors=True)\n print(event is None)\n # True\n\nAny error (except ``SystemExit`` and ``KeyboardInterrupt``) will be muted and\n``None`` will be returned.\n\n\n.. |unix_build| image:: https://travis-ci.org/IL2HorusTeam/il2fb-events-parser.svg?branch=master\n :target: https://travis-ci.org/IL2HorusTeam/il2fb-events-parser\n\n.. |windows_build| image:: https://ci.appveyor.com/api/projects/status/a47k677tr59bd5wg/branch/master?svg=true\n :target: https://ci.appveyor.com/project/oblalex/il2fb-events-parser\n :alt: Build status of the master branch on Windows\n\n.. |coverage_status| image:: http://codecov.io/github/IL2HorusTeam/il2fb-events-parser/coverage.svg?branch=master\n :target: http://codecov.io/github/IL2HorusTeam/il2fb-events-parser?branch=master\n :alt: Test coverage\n\n.. |codeclimate| image:: https://codeclimate.com/github/IL2HorusTeam/il2fb-events-parser/badges/gpa.svg\n :target: https://codeclimate.com/github/IL2HorusTeam/il2fb-events-parser\n :alt: Code Climate\n\n.. |codacy| image:: https://api.codacy.com/project/badge/c0385f01ffa545dea3a52a51cfc53221\n :target: https://www.codacy.com/app/oblalex/il2fb-events-parser\n :alt: Codacy Code Review\n\n.. |quality| image:: https://scrutinizer-ci.com/g/IL2HorusTeam/il2fb-events-parser/badges/quality-score.png?b=master\n :target: https://scrutinizer-ci.com/g/IL2HorusTeam/il2fb-events-parser/?branch=master\n :alt: Scrutinizer Code Quality\n\n.. |health| image:: https://landscape.io/github/IL2HorusTeam/il2fb-events-parser/master/landscape.svg?style=flat\n :target: https://landscape.io/github/IL2HorusTeam/il2fb-events-parser/master\n :alt: Code Health\n\n.. |code_issues| image:: https://www.quantifiedcode.com/api/v1/project/49c826961bd54c14a5ca1959e07d05c1/badge.svg\n :target: https://www.quantifiedcode.com/app/project/49c826961bd54c14a5ca1959e07d05c1\n :alt: Code issues\n\n.. |pypi_package| image:: http://img.shields.io/pypi/v/il2fb-events-parser.svg?style=flat\n :target: http://badge.fury.io/py/il2fb-events-parser/\n\n.. |pypi_downloads| image:: http://img.shields.io/pypi/dm/il2fb-events-parser.svg?style=flat\n :target: https://crate.io/packages/il2fb-events-parser/\n\n.. |python_versions| image:: https://img.shields.io/badge/Python-2.7,3.4,3.5,3.6-brightgreen.svg?style=flat\n :alt: Supported versions of Python\n\n.. |license| image:: https://img.shields.io/badge/license-LGPLv3-blue.svg?style=flat\n :target: https://github.com/IL2HorusTeam/il2fb-events-parser/blob/master/LICENSE\n\n.. |requirements| image:: https://requires.io/github/IL2HorusTeam/il2fb-events-parser/requirements.svg?branch=master\n :target: https://requires.io/github/IL2HorusTeam/il2fb-events-parser/requirements/?branch=master\n :alt: Requirements Status\n\n\n.. _demo page: http://il2horusteam.github.io/il2fb-events-parser/\n.. _visit project's demo page: `demo page`_\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/IL2HorusTeam/il2fb-events-parser", "keywords": "il2", "license": "LGPLv3", "maintainer": "", "maintainer_email": "", "name": "il2fb-events-parser", "package_url": "https://pypi.org/project/il2fb-events-parser/", "platform": "any", "project_url": "https://pypi.org/project/il2fb-events-parser/", "project_urls": { "Homepage": "https://github.com/IL2HorusTeam/il2fb-events-parser" }, "release_url": "https://pypi.org/project/il2fb-events-parser/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "Parse events from log produced by dedicated server of \u00abIL-2 Forgotten Battles\u00bb flight simulator", "version": "1.0.1" }, "last_serial": 3027140, "releases": { "0.10.1": [], "0.11.0": [ { "comment_text": "", "digests": { "md5": "a83d4c3d8887f652f2361443eac87c16", "sha256": "4d12523fe20dbfba616ec996be662dc862cfa8308db5b0ad8aea0af9bda1a617" }, "downloads": -1, "filename": "il2fb-events-parser-0.11.0.tar.gz", "has_sig": false, "md5_digest": "a83d4c3d8887f652f2361443eac87c16", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25134, "upload_time": "2015-01-17T17:36:48", "url": "https://files.pythonhosted.org/packages/33/0d/d975a2479045f484ae119f57d1e048543b2a12e2e8aeab0edbb6fb2e8ca2/il2fb-events-parser-0.11.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "963e3bb1e21d0109608cad682be0e13b", "sha256": "28410baf54b7f07362a7cb5b4eac70f7a2601ce6d18d50efa3fb701f94a8301a" }, "downloads": -1, "filename": "il2fb-events-parser-1.0.1.tar.gz", "has_sig": false, "md5_digest": "963e3bb1e21d0109608cad682be0e13b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23917, "upload_time": "2017-07-16T20:28:53", "url": "https://files.pythonhosted.org/packages/e3/ac/05103f4347ced349e5e792a1625abc26877e5c8782cc80ecdeccafaa4fa1/il2fb-events-parser-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "963e3bb1e21d0109608cad682be0e13b", "sha256": "28410baf54b7f07362a7cb5b4eac70f7a2601ce6d18d50efa3fb701f94a8301a" }, "downloads": -1, "filename": "il2fb-events-parser-1.0.1.tar.gz", "has_sig": false, "md5_digest": "963e3bb1e21d0109608cad682be0e13b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23917, "upload_time": "2017-07-16T20:28:53", "url": "https://files.pythonhosted.org/packages/e3/ac/05103f4347ced349e5e792a1625abc26877e5c8782cc80ecdeccafaa4fa1/il2fb-events-parser-1.0.1.tar.gz" } ] }