{ "info": { "author": "Patrick Fournier", "author_email": "patrick@whiskyechobravo.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Topic :: Documentation", "Topic :: Software Development :: Documentation", "Topic :: Utilities" ], "description": "==========================================\r\nSpreadsheet directive for reStructuredText\r\n==========================================\r\n\r\nRegister a simplespreadsheet directive to do calculations in a table.\r\n\r\nInstall\r\n=======\r\n::\r\n\r\n pip install rst_simplespreadsheet # or\r\n easy_install rst_simplespreadsheet\r\n\r\nUsage\r\n=====\r\n\r\nUse it as an extension to rst2pdf::\r\n\r\n rst2pdf -e rst_simplespreadsheet ...\r\n\r\nSyntax\r\n======\r\n\r\nFormulae are pieces of text enclosed in ={...}. Only one formula\r\nper cell is supported.\r\n\r\nThe simplest formula is a number, like this::\r\n\r\n ={4}\r\n\r\nThis define the cell value to 4. A cell has value 0 (zero) unless it\r\ncontains a formula.\r\n\r\nYou can reference the value of other cells using alphanumerical\r\nidentifiers. Columns are identified using letters, from a to z then\r\nfrom aa to az, ba to bz and so on. Rows are identified using\r\nnumbers. The first row is 1 and header rows are not numbered (thus not\r\nreferenceable).\r\n\r\nFor example, the formula to calculate the product of cells a1 and a2 is::\r\n\r\n ={a1 * a2}\r\n\r\n\r\nThere are two special characters, # and @, used to reference the current\r\nrow and the current column, respectively.\r\n\r\nFor example, to calculate the product of cells b and f on the current row::\r\n\r\n ={b# * f#}\r\n\r\nand to calculate the sum of rows 1 and 2 in the current column::\r\n\r\n ={@1 + @2}\r\n\r\n\r\nFunctions\r\n---------\r\n\r\nThe spreadsheet can calculate cell values using Python\r\nfunctions. These functions have to be defined and registered in the\r\nSpreadSheet class first.\r\n\r\nFor now, only the function *sum* is defined::\r\n\r\n ={sum(\"a1:a20\")}\r\n\r\nExamples\r\n========\r\n\r\nYou can do a simple table with totals like this one:\r\n\r\n+------+--------+------------------+\r\n| Qty | Rate | Price |\r\n+======+========+==================+\r\n| 2 | 1 $ | 2 $ |\r\n+------+--------+------------------+\r\n| 4 | 3 $ | 12 $ |\r\n+------+--------+------------------+\r\n| 1 | 5 $ | 5 $ |\r\n+------+--------+------------------+\r\n| 3 | 7 $ | 21 $ |\r\n+------+--------+------------------+\r\n| *Total* | 40 $ |\r\n+------+--------+------------------+\r\n\r\n\r\nwith this code::\r\n\r\n .. simplespreadsheet::\r\n +------+--------+-------------------+\r\n | Qty | Price | Total |\r\n +======+========+===================+\r\n | ={2} | ={1} $ | ={a# * b#} $ |\r\n +------+--------+-------------------+\r\n | ={4} | ={3} $ | ={a# * b#} $ |\r\n +------+--------+-------------------+\r\n | ={1} | ={5} $ | ={a# * b#} $ |\r\n +------+--------+-------------------+\r\n | ={3} | ={7} $ | ={a# * b#} $ |\r\n +------+--------+-------------------+\r\n | *Total* | ={sum(\"c1:c4\")} $ |\r\n +------+--------+-------------------+\r\n\r\nAdding more functions\r\n=====================\r\n\r\nFor now, the only available function is sum(). You can easily add new\r\nfunctions by adding them to SpreadSheet.tools. Please share your\r\nimprovements by forking the project on github:\r\nhttps://github.com/patrickfournier/simplespreadsheet", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/patrickfournier/simplespreadsheet", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "rst_simplespreadsheet", "package_url": "https://pypi.org/project/rst_simplespreadsheet/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/rst_simplespreadsheet/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/patrickfournier/simplespreadsheet" }, "release_url": "https://pypi.org/project/rst_simplespreadsheet/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Simple spreadsheet extension for reStructuredText tables.", "version": "0.1.1" }, "last_serial": 929730, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "e967127dcf65d553b30644aa6aa73874", "sha256": "76ba149005a869319ad775de9bf6c73a8b8a6a2ecf6a3d740012bf7bbeca78a4" }, "downloads": -1, "filename": "rst_simplespreadsheet-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e967127dcf65d553b30644aa6aa73874", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3926, "upload_time": "2013-11-25T17:50:26", "url": "https://files.pythonhosted.org/packages/1a/52/eaacedeb865154f20a7bbef428a96c71f71124c07ac65d67b614aacf62ce/rst_simplespreadsheet-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "540d5d34be44d8949a03b16a0343a92f", "sha256": "b4c8e9fba97e1a796956ddf99e40b814f2ad81b7c5f0569393460800702a27b5" }, "downloads": -1, "filename": "rst_simplespreadsheet-0.1.1.tar.gz", "has_sig": false, "md5_digest": "540d5d34be44d8949a03b16a0343a92f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3983, "upload_time": "2013-11-25T17:55:26", "url": "https://files.pythonhosted.org/packages/56/c3/c65b7d3d80da33ef84a9092f02167b5760c4d6bcf1ba82b8214e4cb56860/rst_simplespreadsheet-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "540d5d34be44d8949a03b16a0343a92f", "sha256": "b4c8e9fba97e1a796956ddf99e40b814f2ad81b7c5f0569393460800702a27b5" }, "downloads": -1, "filename": "rst_simplespreadsheet-0.1.1.tar.gz", "has_sig": false, "md5_digest": "540d5d34be44d8949a03b16a0343a92f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3983, "upload_time": "2013-11-25T17:55:26", "url": "https://files.pythonhosted.org/packages/56/c3/c65b7d3d80da33ef84a9092f02167b5760c4d6bcf1ba82b8214e4cb56860/rst_simplespreadsheet-0.1.1.tar.gz" } ] }