{ "info": { "author": "Daniel Schauenberg", "author_email": "d@unwiredcouch.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6" ], "description": "============\r\nfoodlist.py\r\n============\r\n\r\nExport YAML shopping lists into different formats.\r\n\r\nAbout\r\n------\r\n\r\nfoodlist converts simple yaml shopping lists into different formats. This can\r\nbe done in order to get a better layout or make them importable for other\r\napplications. Originally I built this to be able to write simple grocery lists\r\non my computer and import them into\r\nGroceries.app_, a wonderful iPhone application for shopping lists.\r\n\r\nI tried to built it as abstract as possible, so that new formats could be added\r\neasily.\r\n\r\nDependencies\r\n-------------\r\npyyaml for input parsing and pystache for filling the output template. If\r\npystache is not available or no template was given, the context object is\r\nsimply printed onto the screen.::\r\n\r\n pip install pyyaml\r\n pip install pystache\r\n\r\nInstallation\r\n-------------\r\nThe package itself can be installed via PyPi::\r\n\r\n pip install foodlist\r\n\r\nOr if you must::\r\n\r\n easy_install foodlist\r\n\r\nThis also installs the example data (template and base data) into\r\nthe data folder in site-packages.\r\n\r\nUsage\r\n------\r\nCreate a yaml list like this::\r\n\r\n aisle:\r\n - food\r\n - more food\r\n produce:\r\n - tomatoes\r\n - spinache\r\n\r\nThe executable can be given optional paths for base data needed to convert the\r\nlist and a mustache template for output generation.\r\n\r\nYou can also put your files in the default search location::\r\n\r\n ~/.foodlist/groceries.json\r\n ~/.foodlist/groceries.mustache\r\n\r\nSimple execution with groceries.app format and the default\r\nbase_data/template::\r\n\r\n export_foodlist.py list.yaml\r\n\r\nTemplate and base data paths given explicitly::\r\n\r\n export_foodlist.py -b groceries.json -t groceries.mustache list.yaml\r\n\r\nAdditionally it is possible to pass a name and the format::\r\n\r\n export_foodlist.py -n \"My awesome list\" -f \"groceries.app\" list.yaml\r\n\r\nExpansion\r\n----------\r\nAdding new formats is rather easy. Just add a new converter method with the\r\nsignature::\r\n\r\n def new_converter_method(self, groceries_list, **kwargs)\r\n\r\nThe parameters are:\r\n\r\n* groceries_list = the object parsed from the yaml list\r\n* \\*\\*kwargs additional arguments like base data path, etc\r\n\r\n::\r\n\r\n kwargs = {\r\n \"format\" : \"desired format\",\r\n \"name\" : \"name of the list\",\r\n \"base_data\" : \"path to base data file\"\r\n }\r\n\r\n\r\nThen add it to the listformats dict::\r\n\r\n listformats = {'keyword': self.new_converter_method}\r\n\r\nAnd that's about it.\r\n\r\nTODO\r\n-----\r\n* more (or any for that matter) test cases\r\n* more formats\r\n\r\nThanks\r\n-------\r\nSophia Teutschler for Groceries.app and letting me include the json\r\nbase data.\r\n\r\n.. _Groceries.app: http://www.sophiestication.com/groceries/\r\n\r\n\r\nHistory\r\n========\r\n\r\n0.1.1 (2010-06-01)\r\n-------------------\r\n* add groceries.json as package data\r\n\r\n0.1.0 (2010-05-23)\r\n-------------------\r\n* Initial release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/mrtazz/foodlist", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "foodlist", "package_url": "https://pypi.org/project/foodlist/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/foodlist/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/mrtazz/foodlist" }, "release_url": "https://pypi.org/project/foodlist/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Python tool to convert YAML shopping list into different formats", "version": "0.1.1" }, "last_serial": 792104, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "723dbdff91d29fb11fa242ed8da9d03d", "sha256": "22017b09325d0de0845dd860041777223a22f83d7c782ae46c67a4e40bcf2092" }, "downloads": -1, "filename": "foodlist-0.1.0.tar.gz", "has_sig": false, "md5_digest": "723dbdff91d29fb11fa242ed8da9d03d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4680, "upload_time": "2010-05-23T22:48:21", "url": "https://files.pythonhosted.org/packages/d4/7f/7b9897ee283a7377d73b4b0d0c086a39a4ec6a7465ac0908344847f8fdab/foodlist-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "407abdf007234eeab05398e9b989ec81", "sha256": "8d6feba2c6decdad6e6b5f8a12ba009ff79f11c28f4c3bd112b97c70c4712380" }, "downloads": -1, "filename": "foodlist-0.1.1.tar.gz", "has_sig": false, "md5_digest": "407abdf007234eeab05398e9b989ec81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5470, "upload_time": "2010-06-01T14:33:10", "url": "https://files.pythonhosted.org/packages/1e/2b/16f49319ba9c37281afb55f23758768c191fd2dd5a9b8205b1999bf365ed/foodlist-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "407abdf007234eeab05398e9b989ec81", "sha256": "8d6feba2c6decdad6e6b5f8a12ba009ff79f11c28f4c3bd112b97c70c4712380" }, "downloads": -1, "filename": "foodlist-0.1.1.tar.gz", "has_sig": false, "md5_digest": "407abdf007234eeab05398e9b989ec81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5470, "upload_time": "2010-06-01T14:33:10", "url": "https://files.pythonhosted.org/packages/1e/2b/16f49319ba9c37281afb55f23758768c191fd2dd5a9b8205b1999bf365ed/foodlist-0.1.1.tar.gz" } ] }