{ "info": { "author": "Johannes Loehnert", "author_email": "loehnert.kde@gmx.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: User Interfaces" ], "description": "ASCII Designer\n==============\n\nA library that:\n\n* creates GUI from ASCII-art (with well-defined syntax)\n* maps widgets to virtual class attributes\n* relieves you from the boring parts of Form building while leaving you in \n control.\n\nDid you ever design a form by scribbling something like this in your editor::\n\n Text to transform: [ Text_ ]\n\n Select transformation:\n\n (x) Uppercase\n ( ) Lowercase\n ( ) Title-case\n\n [ OK ] [ Cancel ]\n\n... and wished that you could be done with design and start coding? Wish no longer::\n\n from ascii_designer import AutoFrame\n\n class TextTransformer(AutoFrame):\n f_body='''\n | <-> |\n Text to transform: [ Text_ ]\n\n Select transformation:\n\n (x) Uppercase\n ( ) Lowercase\n ( ) Title-case\n\n [ OK ] [ Cancel ]~\n\n '''\n def ok(self):\n text = self.text\n if self.uppercase:\n text = text.upper()\n elif self.lowercase:\n text = text.lower()\n elif self.titlecase:\n text = text.title()\n print(text)\n self.close()\n\n def cancel(self):\n self.close()\n\n if __name__ == '__main__':\n TextTransformer().f_show()\n\nSome comments, incidentally highlighting the features of this library:\n\n* As you probably guessed, all the magic happens in ``AutoFrame``. The \n ``f_show`` call triggers rendering of the form. All the reserved attributes \n are prepended with ``f_`` to get out of your way when subclassing.\n* There is a **well-defined syntax** for how to get the usual widget types. In the \n example you can find labels (plain text), a text box, radio buttons and normal \n buttons.\n* The columns are defined by the **header row** with the pipe characters. The \n minus sign denotes stretching columns. (The ``<`` / ``>`` chars are just \n decoration.)\n* **Column-span** is easily done by having not-a-space underneath the pipe \n symbol. **Row-span** can also be done by prepending subsequent cells with a \n ``{`` character.\n* **Anchoring** is controlled by whether the cell is space-padded or not. For \n example, the Text box stretches, while the cancel button is centered. The \n tilde character can be used instead of a fragile trailing space.\n* **Widget IDs** are automatically generated by lowercasing and whitelisting the \n captions.\n* If a method exists with the same name as a widget id, it is **automatically \n bound** to the usually-wanted event (click in case of button, value-changed in \n case of basically anything else). Oh, and ``close`` and ``quit`` are already \n there for your convenience.\n* Otherwise, you can retrieve and set the widget's value by using its id like\n a class **attribute**.\n* ``f_show()`` captures all the usual boilerplate and simply f***ing shows \n the frame. It can be used for both the toplevel and additional frames.\n* Also note how the class name automatically turned into the window title. \n Override by setting ``.f_title``.\n* The created widgets are **\"raw\", native widgets**. You can configure the toolkit \n to use. Currently there is a Qt and a Tkinter implementation. The native \n widget can accessed using ``form[\"widget_id\"]`` (or \n ``form.f_controls[\"widget_id\"]``). \n\nThe general philosophy is to not paint everything over with wrappers. Instead, \nthe library focuses on specific tasks - building the layout, event-/value \nbinding - and lets you do everything else with the API you know and (maybe) love.\n\n\nINSTALLATION\n------------\n::\n\n pip install ascii_designer\n\nRequirements: Python >= 3, ``attrs``. Obviously, to use the Qt toolkit you need ``Pyqt4``.\n\n\nDOCUMENTATION\n-------------\n\nPlease proceed to http://ascii_designer.readthedocs.io/en/latest/index.html\n\nLICENCSE\n--------\n\nMIT License: https://github.com/loehnertj/ascii_designer/blob/master/LICENSE\n\nTODO\n----\n\nAlpha-state software, mostly working.\n\nTest coverage is lacking, politely spoken.\n\nThis is a hobby project. If you need something quick, open an issue or send a pull request.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/loehnertj/ascii_designer", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ascii-designer", "package_url": "https://pypi.org/project/ascii-designer/", "platform": "", "project_url": "https://pypi.org/project/ascii-designer/", "project_urls": { "Homepage": "http://github.com/loehnertj/ascii_designer" }, "release_url": "https://pypi.org/project/ascii-designer/0.2.0/", "requires_dist": null, "requires_python": ">3.0", "summary": "Builds dialogs from ASCII art definition.", "version": "0.2.0" }, "last_serial": 5874894, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "95e97c9ea15ed844c84ba7d61233f46a", "sha256": "6e53fd3899c6047ba7b34c0c5ce7387b4d338099b558ba680e0ea347db5f0707" }, "downloads": -1, "filename": "ascii_designer-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "95e97c9ea15ed844c84ba7d61233f46a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">3.0", "size": 25014, "upload_time": "2019-05-01T19:34:08", "url": "https://files.pythonhosted.org/packages/b1/ea/fe718a19a11b29f49ada7dae9ddbe8dd67a65553252129c20e858e85d4b0/ascii_designer-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "23768d93b696207912a493bf47a91726", "sha256": "ab9d53537576022425c35be460e61e26913e0738222b7cc68e51a252f0aa61a6" }, "downloads": -1, "filename": "ascii_designer-0.1.0.tar.gz", "has_sig": false, "md5_digest": "23768d93b696207912a493bf47a91726", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.0", "size": 18708, "upload_time": "2019-05-01T19:34:11", "url": "https://files.pythonhosted.org/packages/41/86/6a9699f76b74de96a849f6a2b5021c442da911deda815f3538219dd838fd/ascii_designer-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "d1fe4c33471818a3affa57514d517a9e", "sha256": "cd470506f46dd9577af1b6826d258bc43715c82cce59e32704aa5069f24e22c7" }, "downloads": -1, "filename": "ascii_designer-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d1fe4c33471818a3affa57514d517a9e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">3.0", "size": 27663, "upload_time": "2019-09-23T17:15:00", "url": "https://files.pythonhosted.org/packages/aa/6a/a4b7b0f43137fdc2e93afc36e9a78876a296db151f8c8804aac447e40ec7/ascii_designer-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2d187cb08c050c7bb3e19d73893c529a", "sha256": "080ef825d2bc781b829c8c10c73d48fa64c8d017d7578aa421a9c8d888c3b559" }, "downloads": -1, "filename": "ascii_designer-0.2.0.tar.gz", "has_sig": false, "md5_digest": "2d187cb08c050c7bb3e19d73893c529a", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.0", "size": 20907, "upload_time": "2019-09-23T17:15:03", "url": "https://files.pythonhosted.org/packages/ef/17/4c43bf77193b35bf66ed334fc0df40156549633bbb17e44bee52c08ad415/ascii_designer-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d1fe4c33471818a3affa57514d517a9e", "sha256": "cd470506f46dd9577af1b6826d258bc43715c82cce59e32704aa5069f24e22c7" }, "downloads": -1, "filename": "ascii_designer-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d1fe4c33471818a3affa57514d517a9e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">3.0", "size": 27663, "upload_time": "2019-09-23T17:15:00", "url": "https://files.pythonhosted.org/packages/aa/6a/a4b7b0f43137fdc2e93afc36e9a78876a296db151f8c8804aac447e40ec7/ascii_designer-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2d187cb08c050c7bb3e19d73893c529a", "sha256": "080ef825d2bc781b829c8c10c73d48fa64c8d017d7578aa421a9c8d888c3b559" }, "downloads": -1, "filename": "ascii_designer-0.2.0.tar.gz", "has_sig": false, "md5_digest": "2d187cb08c050c7bb3e19d73893c529a", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.0", "size": 20907, "upload_time": "2019-09-23T17:15:03", "url": "https://files.pythonhosted.org/packages/ef/17/4c43bf77193b35bf66ed334fc0df40156549633bbb17e44bee52c08ad415/ascii_designer-0.2.0.tar.gz" } ] }