{ "info": { "author": "Derp Ston", "author_email": "derpston+pypi@sleepygeek.org", "bugtrack_url": null, "classifiers": [], "description": "pyEagleSCR\n----------\n\npyEagleSCR is a pure Python parser for the scripting language used by\n`AutoDesk/CADSoft Eagle\u2019s PCB schematic/layout\ntool `__.\n\nFor now, it aims to support only the functionality needed to parse\nsymbols and packages, to ease use of part specifications in other tools\nlike `KiCad `__.\n\nStatus\n------\n\nBasic functionality working, including (probably not quite full) support\nfor these commands:\n\n- Edit, with support for Symbols, Packages and Devices\n- Prefix\n- Pin\n- Wire\n- Layer\n- Connect\n- Description\n- Attribute\n- Add\n- Package\n- Smd\n- Grid\n- Set\n\nExample\n-------\n\nRunning this tool against the .SCR file found in `this ZIP on\nfarnell.com `__ (for the\ncomponent\n`STM32F405RGT6 `__,\nfarnell stock number 2064363) produces this result:\n\n.. code:: python\n\n {'devices': {'STM32F405RGT6': },\n 'grid': 'mil',\n 'layer': '96',\n 'packages': {'QFP50P1200X1200X160-64N': },\n 'settings': {'Wire_Bend': '2'},\n 'symbols': {'STM32F405RGT6': }}\n\nIt doesn\u2019t look like much, but this is a bare summary of the rich\ninformation inside this tree of objects. The parsed symbol here, a\n``STM32F405RGT6``, has a listing of all 64 pins, correctly mapped to the\n64 SMD pads in the ``QFP50P1200X1200X160-64N`` package via the\nconnections specified by the device ``STM32F405RGT6``.\n\nUsage\n-----\n\nCreate a Parser object, and feed the SCR in, line-by-line, then read the\ninformation you want out of the Parser.context object:\n\n.. code:: python\n\n scrparser = parser.Parser()\n\n for line in open(\"yourfile.scr\"):\n scrparser.handle_line(line)\n \n print scrparser.context['symbols']\n # {'STM32F405RGT6': }\n\nYou can fetch information about the pins on this symbol, like what type\nof pin it is, and the co-ordinates that the pin should be displayed at\nwhen drawing the symbol:\n\n.. code:: python\n\n pins = scrparser.context['symbols']['STM32F405RGT6'].pins\n print pins.keys()[:10]\n # ['PB11', 'PB10', 'PB13', 'PB12', 'PB15', 'PB14', 'VDDA', 'PC14', 'PC15', 'VSS_2']\n print pins['PB11']\n # \n print pins['VDDA']\n # \n\nIf this script file had information about the package and the device for\nthis symbol, you can also get the physical pad information for any pin\nby looking up the corresponding pin in the package spec:\n\n.. code:: python\n\n pin_number = pins['VDDA'].device_pin_number\n # '13'\n scrparser.context['packages']['QFP50P1200X1200X160-64N'].smd_pads[pin_number]\n # \n\nContributing\n------------\n\nContributions are welcome! Please open a PR!\n\nTODO\n----\n\n- The API is a little janky:\n\n - Names of attributes could be more obvious\n - Pins should have references to their corresponding pads on the\n package\n\n- Support more Eagle SCR commands, like:\n\n - Change (applies to Package and Symbol)\n - Text (applies to Package and Symbol)\n - Value (applies to Device?)\n - Pad (through hole components, applies to Package?)\n - Technology (applies to Device?)\n - Wire (four-tuple variant, probably for rectangles?)\n\n- Support stripping comments after the end of a command.\n\n - More examples in\n https://github.com/sparkfun/SparkFun_Eagle_Settings/blob/master/scr/eagle.scr\n\n- Set up sensible defaults in the context, to match what Eagle does.\n\n - layer\n - grid\n - Any other default settings that should be initialised here?\n\n- Support case-insensitive commands\n- Python 3 support\n- Tests!\n- Support for processing a whole file so we don\u2019t have to feed it in\n line-by-line, which is silly.\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/derpston/pyEagleSCR", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "EagleSCR", "package_url": "https://pypi.org/project/EagleSCR/", "platform": "", "project_url": "https://pypi.org/project/EagleSCR/", "project_urls": { "Homepage": "https://github.com/derpston/pyEagleSCR" }, "release_url": "https://pypi.org/project/EagleSCR/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "Parser for the Eagle scripting language", "version": "0.2.0" }, "last_serial": 3593660, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "23b774a8bfdcd883f5ce58af6a82695b", "sha256": "d37c954eead65acd281cb2bfe6928d6bc267d33b731fa44c6eff56fe5bed3332" }, "downloads": -1, "filename": "EagleSCR-0.0.1.tar.gz", "has_sig": false, "md5_digest": "23b774a8bfdcd883f5ce58af6a82695b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 656, "upload_time": "2018-02-18T13:56:03", "url": "https://files.pythonhosted.org/packages/ef/bf/f0a83a26f6484c6f5d75962d0fb6c9abe718e07839850a9d4a28ed879328/EagleSCR-0.0.1.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "2e475f41e57213fb117056522a27e0e2", "sha256": "11b35e70d1730e77bab828759f3dbac5f0d62060f6539497f6b6360e0355566e" }, "downloads": -1, "filename": "EagleSCR-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2e475f41e57213fb117056522a27e0e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5243, "upload_time": "2018-02-18T14:10:23", "url": "https://files.pythonhosted.org/packages/9f/15/e12a8c9470af08b01f91f0ee6a706cf0a50bd17a62b31a5d92f3c5f6c55c/EagleSCR-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "0b8f3023a79a3604db74086304bffce5", "sha256": "ef56764edadfbf0e34c3a2c861c10c27c729e7fb8dab2f33208a6c4399a1e34d" }, "downloads": -1, "filename": "EagleSCR-0.2.0.tar.gz", "has_sig": false, "md5_digest": "0b8f3023a79a3604db74086304bffce5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5276, "upload_time": "2018-02-18T17:00:06", "url": "https://files.pythonhosted.org/packages/35/96/ffdd4801429e5f10d74255557e340e62ace28495b33bc25395b45028d48c/EagleSCR-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0b8f3023a79a3604db74086304bffce5", "sha256": "ef56764edadfbf0e34c3a2c861c10c27c729e7fb8dab2f33208a6c4399a1e34d" }, "downloads": -1, "filename": "EagleSCR-0.2.0.tar.gz", "has_sig": false, "md5_digest": "0b8f3023a79a3604db74086304bffce5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5276, "upload_time": "2018-02-18T17:00:06", "url": "https://files.pythonhosted.org/packages/35/96/ffdd4801429e5f10d74255557e340e62ace28495b33bc25395b45028d48c/EagleSCR-0.2.0.tar.gz" } ] }